$(document).ready(function() {
	
	
	$('.source-image').bind("load", function() {
		     $('.source-image').fadeIn("slow");  
		     $("div[class=contentBox]:first").animate({"height" : "300px"}, "slow");
		     $("div[class=openCloseButton]:first").html("-");
		     $("div[class=slider]:first").slideDown();
	});
	
	$("div[class=openCloseButton]").click(function() {
		var $this = $(this);
		var tempid = $this.attr("id");
		var id = tempid.split("_");
		//$("#output").html(id[1]);
		
		//Make all buttons a + 
		$("div[class=openCloseButton]").html("+");
		
		//Pull up all sliders
		$("div[class=slider]").slideUp();
		
		//Close the current box and then open the selected box
		$("div[class=contentBox]").animate({"height" : "25px"}, "slow");
		$("#contentBox_"+id[1]).animate({"height" : "300px"}, "slow");
		
		//Now pull open the selected slider and change the button to negative. 
		$("#slider_"+id[1]).slideDown();
		$("#openCloseButton_"+id[1]).html("-");
	});
	
	$("#searchTab").click(function(){
		$("#searchBox").animate({"top" : "+=140px"}, "slow"); 
	});
		
		
});


