// Dropdown using jQuery with mods for easing

//easing
	jQuery.easing['swingOld'] = jQuery.easing['swing']; //rename the swing function
	jQuery.extend(jQuery.easing,{
		easingFunc: function (x, t, b, c, d) {
		return -c *(t/=d)*(t-2) + b;
	}
	});
	
	$(document).ready(function(){
		jQuery.fn.slideDownFade = function(speed, easing) {
			return this.animate({height: 'show'}, speed, easing);	
		};
		//Display conditions 
		$('#pgTopNav > ul > li:last-child').addClass('lastNav');
		//Hover Menu		
		var $navLi = $('#pgTopNav > ul > li');
		var $navDetails = $('#pgTopNav ul li ul');
		var hoverConfig = {sensitivity: 3, interval: 50, over: showMenu, timeout: 300, out: hideMenu };
		//animation functions
		function showMenu() {
			$(this).children('ul').slideDownFade(250, 'swing');
			$(this).addClass('navLiHover');
		};
		function hideMenu() {
			$(this).children('ul').slideUp('fast');
			$(this).removeClass('navLiHover');
		};
		//animate menu with delay
		$navLi.hoverIntent(hoverConfig);
		/*$($navDetails).each(function(){
			var menuHeight = $(this).parent('li').outerHeight();
			$(this).css('margin-top',menuHeight);
		});
		*/
	});
