// JavaScript Document

$(document).ready(function()
{
	
	//Hide (Collapse) the toggle containers on load
	$(".collapse-body:last").hide(); 
  
  //Switch the "Open" and "Close" state per click
	$("div.collapse-trigger").toggle(function(){
			//alert("add class ". $(this).next(".collapse-head") );  
			$(this).addClass("active");
		}, function () {
			//alert("removeClass ". $(this).next(".collapse-head") );
			$(this).removeClass("active");
	});

  	$("div.collapse-trigger:first").click();
	
	//Slide up and down on click
	$("div.collapse-trigger").click(function(){
		$(this).next(".collapse-body").slideToggle("slow");
	});
	
	
	$("span.show-more-celebs").toggle(function(){
		$(this).parent().find('.celebrity-tweets-wrap').animate({ height: 7200, }, 1500 );
		$(this).html("<strong>Show Less Celebrity Tweets</strong>");
		}, function () {
		$(this).parent().find('.celebrity-tweets-wrap').animate({ height: 1800, }, 500 );
		$(this).html("<strong>Show More Celebrity Tweets</strong>");	
	});
	
	/*
	$("span.show-more-celebs").click(function(){
		$(this).parent().find('.celebrity-tweets-wrap').animate({ height: 7200, }, 1500 );
		$(this).html("");
		});
	*/

});

