//JS Document

$(document).ready(function(){
	$('#links-module').find('a').next().css({'display' : 'none'});
	
	$('#links-module').find('a').click(function(){
		$(this).next().slideToggle('slow');
		if( $(this).attr('href') == '#' )
			return false;
	});
	
	//Show the current month in the blog archive
	var currentYear = (new Date).getFullYear();
	var currentMonth = (new Date).getMonth() + 1;
	$(".year_"+currentYear).show();
	$(".year_"+currentYear).find(".month_"+currentMonth).show();
	
	// Blog Archive Control: Count the number of postings in a year and add it to the html. 
	$('.mainYearUL').each(function(index) {
		var numPosts = $(this).find(".posting_li").size();
		$("#yearHeader_"+$(this).attr("name")).html("&nbsp;("+numPosts+")&nbsp;");
	  });
});
