$.fn.pause = function(duration) {
	$(this).stop().animate({ dummy: 1 }, duration);
	return this;
};

function mouseleft() {
	$("#nav-bar").triggerHandler("mouseleave");
	//$("#passos").triggerHandler("mouseleave");
}

$(document).ready(function(){
	var selectedInput = null;
	
	var maxLI = 0;
	$("#nav li ul").each(function(){
	   var h = $(this).height();
	   if(h > maxLI)
	        maxLI = h;
	});
	
	// FOOTER HEIGHT
	$("#footer").css( "height",maxLI+60);


	$("#nav-bar").mouseenter(
		function () {
			$(this).stop().pause(60).animate({ height: (maxLI+50)+"px" }, 400, "easeOutQuart" );
	}).mouseleave(
		function () {
			if (selectedInput == null) {
				$(this).stop().pause(60).animate({ height:"30px" }, 400, "easeOutQuart" );
			}
		}
	);

/*
	$('#passos').mouseenter(
		function () {
			$(this).children("#txtBox").fadeIn(400, "easeOutQuart" );
	}).mouseleave(
		function () {
			$(this).children("#txtBox").fadeOut(400, "easeOutQuart" );
		}
	);

	$("#passos").hover(function () {
		$(this).children("#txtBox").fadeIn(400, "easeOutQuart" );
	}, function () {
	    $(this).children("#txtBox").fadeOut(400, "easeOutQuart" );
	});	
*/
});
