$(document).ready(function()
	{
		
		var hidden = false;
		
		$('li.navLink').mouseover(
			//over
			function()
			{
				$("#outerWrapper").stop();
				
				if( !hidden )
				{
					$("#outerWrapper").animate({ opacity: 0.2 }, 200 );
					hidden = true;
				}
			}
				
		);
		
		$('li.navLink').mouseout(
			//out
			function()
			{
				$("#outerWrapper").stop();
				
				if ( hidden )
				{
					$("#outerWrapper").animate({ opacity: 1 }, 200 );
					hidden = false;
				}
			}
			
		);
		
     function addMega(){ $($(this).find("h2")).addClass("active"); $($(this).find("div.container")).show(); $(this).addClass("hovering"); } function removeMega(){ $($(this).find("h2")).removeClass("active"); $($(this).find("div.container")).hide(); $(this).removeClass("hovering"); } 

    var megaConfig = {
         interval: 0,
         sensitivity: 8,
         over: addMega,
         timeout: 50,
         out: removeMega
    };
    $("li.mega").hoverIntent(megaConfig)
});