/* ==== Settings ==== */
var timeTillAppears 		= .5,
	openTransitionDuration 	= 1.2,
	closeTransitionDuration = 1.2;


/* ==== Code - Off Limits!!!! ==== */
(function($) {
	$(window).load(function() {
		setTimeout(function() {
			var shown = false;
			var banner = $('#met_accordian');
			var height = banner.height();
			
			$('#met_accordian .close').click(function() {
				banner.animate({height: 0, opacity: 1}, closeTransitionDuration * 1000, 'swing', function() { shown = false });
				return false;
			});
			$('#met').mouseover(function() {
				if (shown) return;
				shown = true;
				
				banner.css({
					display: 'block',
					height: 0,
					overflow: 'hidden',
					opacity: 1
				}).animate(
					{height: height
				}, openTransitionDuration * 1000, 'swing');
				
			});
			
			// Only want it to auto-appear on the homepage
			if (document.location.href == 'http://www.dlfprojects.org/') {
				$('#met').mouseover();
			}
		}, timeTillAppears * 1000);

	});
})(jQuery);

