// remap jQuery to $
(function($){})(window.jQuery);


var $mainNav;

/* trigger when page is ready */
$(document).ready(function (){
	
	$mainNav = $('.mainNav > li');
	
	$('.header').animate({
		top: '0'
	},200);

	$mainNav.mouseenter(function(){
		$(this).addClass('active');
		$(this).find('ul').animate({
			top: '48px',
			leaveTransforms: true
		},300,function(){
			
		});
	});
	$mainNav.mouseleave(function(){
		
		if(!$(this).hasClass('fixed')){
			$(this).removeClass('active');
		}
		
		$dropList = $(this).find('ul');
		var shiftUp = $dropList.attr('rel');

		$dropList.animate({
			top: '-='+shiftUp+'px',
			leaveTransforms: true,
			useTranslate3d: false
		},300,function(){
			
		});
	})

});


