/*************************
*Event Handling Functions*
**************************/

//////////////////////////////////////////////////////////////
//Creates the drop down event function for the blog entries.//
//////////////////////////////////////////////////////////////

var dropdownEvent = function(e){
			$(".content_drop").unbind("click");
			var contentObj = $(this);
			var blog = contentObj.children(".content_blog");

			if(!blog.is(':visible')){ //the logic in visibility in this case is reversed hice the [not visisble] actually means visible and vice-versa.
				contentObj.children("img")[0].src = "assets/images/round_minus.png";
			}
			else{
				contentObj.children("img")[0].src = "assets/images/round_plus.png";
			}

			contentObj.children(".content_blog").slideToggle("fast", function(){
				$(".content_drop").bind("click", dropdownEvent);
			});
}

/***************
*Document Ready*
****************/

$(document).ready(function(){

	/**********************************
	*Event Handling For Blog Drop-Down*
	**********************************/
	
	$(".content_drop").bind("click", dropdownEvent);

	var meetDate = new Date( 2012, 2, 28, 12, 0, 0, 0 );
	meetDate = new Date( meetDate.getTime() );
	$("#meetCountDown").countdown({until: meetDate});
});

