$(document).ready(function(){
	 //Adding "feature" class to news stories to display in full.
	 $("ul li.entry:nth-child(1)").addClass("feature").removeClass("normal");
	 $("ul li.entry:nth-child(2)").addClass("feature").removeClass("normal");
	 
	 //Margin fix for floating news entries.
	 $(".entry.normal").each(function(index){
		if(index%2==1) $(this).addClass("fix");
	});
	 
	 //News archives hover effect for li (IE6 fix)
	 $("#news.archives ul li.clearfix").hover(
		function() {
			$(this).css("background", "#ede7c7");
		},
		function() {
			$(this).css("background", "none");	
		}
	);
	 
	 //News Archive Month Formatting
	$('.date.month').each(function(){					
		var month = parseInt($(this).text()) - 1; // Subtracting one from the month because array is base 0
		var months = new Array('January','February','March','April','May','June','July','August','September','October','November','December');
		
		if(month + 1 > 9) {
			var year = parseInt($(this).text().substring(3));
		} else {
			var year = parseInt($(this).text().substring(2));
		}
		$(this).text(months[month] + " " + year); 
	});
	
	//Counting stories
	$('.archivedMonth').each(function() {
		var size = $(this).find('ul').children().size();
		if (size == 1) {
			$(this).find('.count').text("(" + size + " entry)");	
		} else {
			$(this).find('.count').text("(" + size + " entries)");
		}
	});
	
	$(document).ready(function() {
		$('ul.socialLinks').removeClass('large');							  
	});

	
}); 

