
jQuery.fn.fadeIn = function(speed, callback) { 
    return this.animate({opacity: 'show'}, speed, function() { 
        if (jQuery.browser.msie)  
            this.style.removeAttribute('filter');  
        if (jQuery.isFunction(callback)) 
            callback();  
    }); 
}; 

jQuery.fn.fadeOut = function(speed, callback) { 
    return this.animate({opacity: 'hide'}, speed, function() { 
        if (jQuery.browser.msie)  
            this.style.removeAttribute('filter');  
        if (jQuery.isFunction(callback)) 
            callback();  
    }); 
}; 

jQuery.fn.fadeTo = function(speed,to,callback) { 
    return this.animate({opacity: to}, speed, function() { 
        if (to == 1 && jQuery.browser.msie)  
            this.style.removeAttribute('filter');  
        if (jQuery.isFunction(callback)) 
            callback();  
    }); 
};

$(document).ready(function(){

	$("#globalNav").hoverIntent(function() {
			$(this).stop().animate({ 
				height: '52px',
				paddingTop: '8px'
				}, 'fast');
				$("#globalNav li p").stop().fadeIn('slow');
				$("#globalNav li a").stop().animate({
				}, 'fast');
				$("#globalNav li#crossfit").stop().animate({
					marginTop: '0px'
				}, 'fast');
			}, function() {
			$(this).stop().animate({ 
				height: '20px',
				paddingTop: '0'
			 }, 'fast');
				$("#globalNav li a").stop().animate({
				}, 'fast');
				$("#globalNav li#crossfit").stop().animate({
					marginTop: '-7px'
				}, 'fast');
			$("#globalNav li p").fadeOut('fast');
  		});

});
