var enableMouseOver = true;
var showInterval	= 400;
var tInterval		= null;			// Timer object

function initMenu()
{
	$(document).ready(function()
	{
		
		$(".products").hover(
			// mouseover
			function () 
			{
				if( enableMouseOver )
				{
					tInterval = window.setInterval("displayMenu('.sub_prod')", showInterval);					
				}
			},
			
			// mouseout
			function () 
			{
				window.clearInterval(tInterval);
				$(".sub_prod").fadeOut("slow");
			}
		); // end hover
		
		$(".downloads").hover(
				// mouseover
				function () 
				{
					if( enableMouseOver )
					{
						tInterval = window.setInterval("displayMenu('.sub_down')", showInterval);		
						//$(".sub_down").fadeIn("slow", function() { enableMouseOver = true });
						//enableMouseOver = false;
					}
				},
				
				// mouseout
				function () 
				{
					window.clearInterval(tInterval);
					$(".sub_down").fadeOut("slow");
				}
			); // end hover
		
	  });
}

function displayMenu(sObj)
{
	$(sObj).fadeIn("slow", reEnableMouse);
	enableMouseOver = false;
	window.clearInterval(tInterval);
}

function reEnableMouse()
{
	enableMouseOver = true;
}