
$(document).ready(function() {
       
       //Function used to show and hide the main menu drop down.
        function megaHoverOver() {
                $(this).find(".sub").stop().fadeTo('fast', 1).show();													
        }
        function megaHoverOut() {                              
                $(this).find(".sub").stop().fadeTo('fast', 0, function() {
                        $(this).hide();
                });
        }

        //Set custom configurations for hover delay **REQUIRES THE HOVER INTENT PLUGIN**
        var config = {
             sensitivity: 2, // number = sensitivity threshold (must be 1 or higher)
             interval: 10, // number = milliseconds for onMouseOver polling interval
             over: megaHoverOver, // function = onMouseOver callback (REQUIRED)
             timeout: 200, // number = milliseconds delay before onMouseOut
             out: megaHoverOut // function = onMouseOut callback (REQUIRED)
        };

        //$("ul#mainMenu li .sub").css({'opacity':'0'}); //Fade sub nav to 0 opacity on default
        $("#mainMenu li").hoverIntent(config); //Trigger Hover intent with custom configurations
		
		
		
		
          
}); 
