//On Hover Over
function menuHoverOver(){	
	f_putScreen(true);
	$(this).find("a.menu").css({'background':'url('+menuHoverBGImage+')'});
	$(this).find("a.active").css({'background':'url('+menuHoverBGImage+')'});
	$(this).find("a.menu").css({'border-left':'1px solid #333333'});
	
    $(this).find(".menuItems").stop().fadeTo('fast', 0.85).show();	
	//$(this).find(".menuItems").stop().fadeTo('fast', 0.8).show();
	
	//Find menuItems and fade it in
    (function($) {
        //Function to calculate total width of all ul's
        jQuery.fn.calcSubWidth = function() {
            rowWidth = 0;
            //Calculate row
            $(this).find("ul").each(function() { //for each ul...
                rowWidth += $(this).width(); //Add each ul's width together
				rowWidth = 955;
            });
        };
    })(jQuery); 
    if ( $(this).find(".row").length > 0 ) { //If row exists...
        var biggestRow = 0;	
        $(this).find(".row").each(function() {	//for each row...
            $(this).calcSubWidth(); //Call function to calculate width of all ul's
            //Find biggest row
            if(rowWidth > biggestRow) {
                biggestRow = rowWidth;
            }
        });
        $(this).find(".menuItems").css({'width' :biggestRow}); //Set width
        $(this).find(".row:last").css({'margin':'0'});  //Kill last row's margin

    } else { //If row does not exist...
        $(this).calcSubWidth();  //Call function to calculate width of all ul's
        $(this).find(".menuItems").css({'width' : rowWidth}); //Set Width
    }
	$(this).find(".menuItems#menuItems1").css({'left' : -137}); 
	$(this).find(".menuItems#menuItems2").css({'left' : -255}); 
	$(this).find(".menuItems#menuItems3").css({'left' : -405}); 
	$(this).find(".menuItems#menuItems4").css({'left' : -523}); 
	$(this).find(".menuItems#menuItems5").css({'left' : -641}); 
	$(this).find(".menuItems#menuItems6").css({'left' : -759}); 
	$(this).find(".menuItems#menuItems7").css({'left' : -877}); 
}
//On Hover Out
function menuHoverOut(){	
  $(this).find(".menuItems").stop().fadeTo('fast', 0, function() { //Fade to 0 opactiy
      $(this).hide();   //after fading, hide it
  });
  $(this).find("a.menu").css({'background':'url('+menuBGImage+')'});
  $(this).find("a.active").css({'background':'url('+menuActiveBGImage+')'});
  $(this).find("a.menu").css({'border-left':'1px solid #056F99'});
  //$(this).find("a.active").css({'border-left':'1px solid #2c566f'});
  f_putScreen(false);
}
