 //jQuery.noConflict();
 jQuery(document).ready(function() {
								 

	var twitterHeight = jQuery('div#twitterContentWrapper').height();
	//jQuery('div#twitterContentWrapper').css({height:"0px"});
	jQuery('a#twitterHeader').click(function() {
		
		if (jQuery('div#twitterContentWrapper').height() > 0) {
			jQuery('div#twitterContentWrapper').animate({
				height: "0px"
			}, 1000);
			jQuery('img#twitterDirectionImage').attr("src", "/wp-content/themes/reckittbenckiser/images/sidebarContainerDown.jpg");
			
			
		}
		else {
			//now animate the width/height growth and appearance!
			 jQuery('div#twitterContentWrapper').animate({
				height: twitterHeight+"px"
			}, 1000);
			jQuery('img#twitterDirectionImage').attr("src", "/wp-content/themes/reckittbenckiser/images/sidebarContainerUp.jpg");

		}
			
		return false;
		
	});
	
	
	var didYouKnowHeight = jQuery('div#didYouKnowContent').height();
	jQuery('div#didYouKnowContent').css({height:"0px"});
	jQuery('a#didYouKnowHeader').click(function() {
		
		if (jQuery('div#didYouKnowContent').height() > 0) {
			jQuery('div#didYouKnowContent').animate({
				height: "0px"
			}, 1000);
			jQuery('img#didYouKnowDirectionImage').attr("src", "/wp-content/themes/reckittbenckiser/images/sidebarContainerDown.jpg");
		}
		else {
			//now animate the width/height growth and appearance!
			 jQuery('div#didYouKnowContent').animate({
				height: didYouKnowHeight+"px"
			}, 1000);
			jQuery('img#didYouKnowDirectionImage').attr("src", "/wp-content/themes/reckittbenckiser/images/sidebarContainerUp.jpg");
		}
			
		return false;
		
	});
	
	
	var rbPollsHeight = jQuery('div#rbPollsContent').height();
	jQuery('div#rbPollsContent').css({height:"0px"});
	jQuery('a#rbPollsHeader').click(function() {
		
		if (jQuery('div#rbPollsContent').height() > 0) {
			jQuery('div#rbPollsContent').animate({
				height: "0px"
			}, 1000);
			jQuery('img#rbPollsDirectionImage').attr("src", "/wp-content/themes/reckittbenckiser/images/sidebarContainerDown.jpg");
		}
		else {
			//now animate the width/height growth and appearance!
			 jQuery('div#rbPollsContent').animate({
				height: rbPollsHeight+"px"
			}, 1000);
			jQuery('img#rbPollsDirectionImage').attr("src", "/wp-content/themes/reckittbenckiser/images/sidebarContainerUp.jpg");
		}
			
		return false;
		
	});
	
	var bloggersHeight = jQuery('div#featuredBloggers').height();
	jQuery('div#featuredBloggers').css({height:"0px"});
	jQuery('a#FeaturedBloggersHeader').click(function() {
		
		if (jQuery('div#featuredBloggers').height() > 0) {
			jQuery('div#featuredBloggers').animate({
				height: "0px"
			}, 1000);
			jQuery('img#bloggersDirectionImage').attr("src", "/wp-content/themes/reckittbenckiser/images/sidebarContainerDown.jpg");
		}
		else {
			//now animate the width/height growth and appearance!
			 jQuery('div#featuredBloggers').animate({
				height: bloggersHeight+"px"
			}, 1000);
			jQuery('img#bloggersDirectionImage').attr("src", "/wp-content/themes/reckittbenckiser/images/sidebarContainerUp.jpg");
		}
			
		return false;
		
	});
	
	var opportunitiesHeight = jQuery('div#latestRBOpportunities').height();
	jQuery('div#latestRBOpportunities').css({height:"0px"});
	jQuery('a#latestRBOppHeader').click(function() {
		
		if (jQuery('div#latestRBOpportunities').height() > 0) {
			jQuery('div#latestRBOpportunities').animate({
				height: "0px"
			}, 1000);
			jQuery('img#rbOpportunitiesDirectionImage').attr("src", "/wp-content/themes/reckittbenckiser/images/sidebarContainerDown.jpg");
			
		}
		else {
			//now animate the width/height growth and appearance!
			 jQuery('div#latestRBOpportunities').animate({
				height: opportunitiesHeight+"px"
			}, 1000);
			jQuery('img#rbOpportunitiesDirectionImage').attr("src", "/wp-content/themes/reckittbenckiser/images/sidebarContainerUp.jpg");
		}
			
		return false;
		
	});
	
	
	/* new bloggers navigation (in blue) */
	
	var currentBloggersHeight = jQuery('ul#currentBloggersContainer').height();
	//jQuery('ul#currentBloggersContainer').css({height:"0px"});
	jQuery('a#currentBloggersSliderLink').click(function() {
		
		if (jQuery('ul#currentBloggersContainer').height() > 0) {
			jQuery('ul#currentBloggersContainer').animate({
				height: "0px"
			}, 1000);
			jQuery('img#currentBloggersDirectionImage').attr("src", "/wp-content/themes/reckittbenckiser/images/sidebarContainerDownBlue.jpg");
			
		}
		else {
			//now animate the width/height growth and appearance!
			 jQuery('ul#currentBloggersContainer').animate({
				height: currentBloggersHeight+"px"
			}, 1000);
			jQuery('img#currentBloggersDirectionImage').attr("src", "/wp-content/themes/reckittbenckiser/images/sidebarContainerUpBlue.jpg");
		}
			
		return false;
		
	});
	
	
	var archiveBloggersHeight = jQuery('div#archiveBloggersContainer').height();
	jQuery('div#archiveBloggersContainer').css({height:"0px"});
	jQuery('a#archiveBloggersSliderLink').click(function() {
		
		if (jQuery('div#archiveBloggersContainer').height() > 0) {
			jQuery('div#archiveBloggersContainer').animate({
				height: "0px"
			}, 1000);
			jQuery('img#archiveBloggersDirectionImage').attr("src", "/wp-content/themes/reckittbenckiser/images/sidebarContainerDownBlue.jpg");
			
		}
		else {
			//now animate the width/height growth and appearance!
			 jQuery('div#archiveBloggersContainer').animate({
				height: archiveBloggersHeight+"px"
			}, 1000);
			jQuery('img#archiveBloggersDirectionImage').attr("src", "/wp-content/themes/reckittbenckiser/images/sidebarContainerUpBlue.jpg");
		}
			
		return false;
		
	});
	
	var guestBloggersHeight = jQuery('div#guestBloggersContainer').height();
	//jQuery('div#guestBloggersContainer').css({height:"0px"});
	jQuery('a#guestBloggersSliderLink').click(function() {
		
		if (jQuery('div#guestBloggersContainer').height() > 0) {
			jQuery('div#guestBloggersContainer').animate({
				height: "0px"
			}, 1000);
			jQuery('img#guestBloggersDirectionImage').attr("src", "/wp-content/themes/reckittbenckiser/images/sidebarContainerDownBlue.jpg");
			
		}
		else {
			//now animate the width/height growth and appearance!
			 jQuery('div#guestBloggersContainer').animate({
				height: guestBloggersHeight+"px"
			}, 1000);
			jQuery('img#guestBloggersDirectionImage').attr("src", "/wp-content/themes/reckittbenckiser/images/sidebarContainerUpBlue.jpg");
		}
			
		return false;
		
	});  
	
	
	var cbmBloggersHeight = jQuery('div#cbmBloggersContainer').height();
	jQuery('div#cbmBloggersContainer').css({height:"0px"});
	jQuery('a#cbmBloggersSliderLink').click(function() {
		
		if (jQuery('div#cbmBloggersContainer').height() > 0) {
			jQuery('div#cbmBloggersContainer').animate({
				height: "0px"
			}, 1000);
			jQuery('img#cbmBloggersDirectionImage').attr("src", "/wp-content/themes/reckittbenckiser/images/sidebarContainerDownBlue.jpg");
			
		}
		else {
			//now animate the width/height growth and appearance!
			 jQuery('div#cbmBloggersContainer').animate({
				height: cbmBloggersHeight+"px"
			}, 1000);
			jQuery('img#cbmBloggersDirectionImage').attr("src", "/wp-content/themes/reckittbenckiser/images/sidebarContainerUpBlue.jpg");
		}
			
		return false;
		
	});  
  
});
