var m1 = "mail";
var m2 = "to";
var m3 = ":";
var m4 = "@";
var m5 = "pomoto";
var m6 = ".com";

function nosubmit() {
	return false;
}

window.addEvent('domready', function() {

	var menuFx = { };
	$$('div.item').each(function(element,i) {
		menuFx[i] = new Fx.Style(element, 'background-color', {duration: 500});
		element.setStyle('background-color', '#e8e8e8').set({
			'events': {
				'mouseenter': function(e) {
					menuFx[i].stop();
					menuFx[i].start('#f8f8f8');
				},
				'mouseleave': function(e) {
					menuFx[i].stop();
					menuFx[i].start('#e8e8e8');
				}
			}
		});
	});
		
	$$('a.info').setProperty('href', m1 + m2 + m3 + 'info' + m4 + m5 + m6);
	$$('a.support').setProperty('href', m1 + m2 + m3 + 'support' + m4 + m5 + m6);	
	$$('a.sales').setProperty('href', m1 + m2 + m3 + 'sales' + m4 + m5 + m6);

	/* In order to switch type to 'search', first have to figure out how to notice when
	   user presses the 'clear' button. A polling technique while in focus might do the trick 
	*/
	//if (window.webkit) {
	//	$$('input[name=search]').setProperty('type', 'search');
	//}
	
});
