// Main Nav
function panelOut () {
		$('#leftNavigationWrapper').animate({"width":"280px"}, "slow");
		$('#leftMenuIcons').animate({"left":"200px"}, "slow");
		$("#leftMenuText").show(500);															
}

function panelIn() {
		$('#leftNavigationWrapper').animate({"width":"80px"}, "slow");
		$('#leftMenuIcons').animate({"left":"0px"}, "slow");
		$("#leftMenuText").hide(200);															
}

function topNavOut () {
		$("div#panel").animate({ height: $('#menu li').size() * 39+"px" }, "slow");
		$("div.hideFlash").css({'visibility':'hidden'});
		$("div#panel").css({'border-bottom':'1px solid #444444'});
		$(".panel_button").css({'top':'-3px'});
}

function topNavIn () {
	if (hoverToggle) {
		$("div#panel").animate({ height: "0px" }, "slow");
		$("div.hideFlash").css({'visibility':'visible'});
		$("div#panel").css({'border-bottom':'none'});
		$(".panel_button").css({'top':'-2px'});
	}
}

function topNavInFromDropdown () {
	$("div#panel").animate({ height: "0px" }, "slow");
	$("div.hideFlash").css({'visibility':'visible'});
		$("div#panel").css({'border-bottom':'none'});
		$(".panel_button").css({'top':'-2px'});
	hoverToggle=true;
}


function doNothing () {};

var hoverToggle = true;

$(document).ready(function() {
    $('#leftNavigationWrapper').css({'height':$('div.leftHoldIcon').size() * 74+'px'});
	$("#leftMenuText").hide();
	$('#leftMenuIcons').hoverIntent(panelOut, doNothing);  
	$("#leftNavigationWrapper").hoverIntent(doNothing, panelIn);

   $(".dropButton").hoverIntent(topNavOut, topNavIn);    
   $("#menu").hover(doNothing, topNavInFromDropdown);
   $("#menu").hover(function () {
   		hoverToggle = false;	
   });
});



   
  


   
   