//Home page box reveals
$(document).ready(function(){
	$(".reveal").hide();
	
	$("#teasers li").hover(
		function(e){
			$(".image-heading.reverse span", this).css("border-top-color", "#fff");
			var $target = $(e.target);
			if ($target.is(".reveal")) { return false; }
			else {
				var containerHeight = $(".reveal", this).parent().height();
				var revealHeight = $(".reveal", this).height();
				var theReveal = $(".reveal", this);
				//theReveal.queue(function(){
					//theReveal.parent().animate({ height: "+="+revealHeight, easing: "easeOutExpo" }, 500);
					theReveal.show("slide", { direction:"down", easing: "easeOutExpo" }, 500);
				//	theReveal.dequeue();
				//});
			}			
		},
		function(e){
			var containerHeight = $(".reveal", this).parent().height();
			var revealHeight = $(".reveal", this).height();
			var theReveal = $(".reveal", this);
			
			

			//theReveal.queue(function(){
				//theReveal.parent().animate({ height: "-="+revealHeight, easing: "easeOutExpo" }, 250);
			theReveal.hide("slide", { direction:"down", easing: "easeOutExpo" }, 250);
			var bloody = theReveal.parent().siblings("span");
			theReveal.queue(function(){
				bloody.css("border-top-color", "#C51B8A");
				theReveal.dequeue();
			});
			//theReveal.siblings(".image-heading span").css("border-top-color", "#C51B8A");
			//	theReveal.dequeue();
			//});
			
		}
	);

});
