jQuery(document).ready(function($) {

	//Fix Errors - http://www.learningjquery.com/2009/01/quick-tip-prevent-animation-queue-buildup/

	//Remove outline from links
	$("a").click(function(){
		$(this).blur();
	});
	// no spaces in the classname, and include the dot. it's used in the
	// mouseover and mouseout selector
	$.each([".aboutlaneway",".showday",".currentaboutlaneway",".currentshowday",".mydates",".currentmydates",".venues",".currentvenues"], function () {

		var h = 0,
			cls = this + "";

		$((cls + " ul li")).each(function () {
			h += ($(this).height() || 0) + 2;
		});

		//When mouse rolls over
		$(cls).mouseover(function(){
			$("ul#mainNav li" + cls + " ul").stop().animate({height:(h + "px"), width:'170px'},{queue:false, duration:600, easing: 'easeOutBounce'});
		});

		//When mouse is removed
		$(cls).mouseout(function(){
			$("ul#mainNav li" + cls + " ul").stop().animate({height:'0px', width:'170px'},{queue:false, duration:600, easing: 'easeOutBounce'});
		});
	});

	$(".emailUpdates").mouseover(function(){
		$("#signUpForm").stop().animate({height:'260px', width: '250px'},{queue:false, duration:600, easing: 'easeInQuint'})
	});

	$(".emailUpdates").mouseout(function(){
		$("#signUpForm").stop().animate({height:'0px', width: '250px'},{queue:false, duration:600, easing: 'easeOutQuint'})
	});

});