function initMainmenu()
{	
	$("ul.mainmenu > li").each(function() 
	{
		var li = $(this);
		var submenus = $(this).children("ul.submenus");
		
		function showMenu()
		{
			li.children("a").children("span").animate(
				{
					"paddingTop": "100px"
				}, 
				500, 
				"swing", 
				function() 
				{
					submenus.animate(
						{
							"height": "236px"
						}, 
						500, 
						"swing", 
						function() 
						{
							submenus.animate(
								{
									"width": 		"930px", 
									"marginLeft":	"-372px"
								}, 
								500, 
								"linear", 
								null
							);
						}
					);
				}
			);
		}
		
		function hideMenu()
		{
			submenus.animate(
				{
					"width": 		"186px", 
					"marginLeft": 	"0px"
				}, 
				500, 
				"linear", 
				function() 
				{
					submenus.animate(
						{
							"height": "0px"
						}, 
						500, 
						"swing", 
						function() 
						{
							li.children("a").children("span").animate(
								{
									"paddingTop": "20px"
								}, 
								500, 
								"swing", 
								null
							);
						}
					);
				}
			);		
		}
		
		var config = {    
			sensitivity: 3, // number = sensitivity threshold (must be 1 or higher)    
			interval: 200, // number = milliseconds for onMouseOver polling interval    
			over: showMenu, // function = onMouseOver callback (REQUIRED)    
			timeout: 1000, // number = milliseconds delay before onMouseOut    
			out: hideMenu}; // function = onMouseOut callback (REQUIRED)    
		
		if (submenus.length == 1) li.hoverIntent(config);
	});
}