// JavaScript Document

$(function() {	

	/*if($("#leftbar").height() - $("#footer").outerHeight() > $("#wrapper").height())
	{
		var newHeight = $("#leftbar").height() - $("#footer").outerHeight();
		var subtractPadding = 40;
		$("#wrapper").css("height",	newHeight);
		$("#content-wrapper").css("min-height", newHeight - subtractPadding);
		$("#content").css("min-height", newHeight - subtractPadding);
		$("#interior-sidebar").css("min-height", newHeight - 20);
		$("#interior-content").css("min-height", newHeight);
	}
	
	$(window).resize(function(){
  	if($("#leftbar").height() - $("#footer").outerHeight() > $("#wrapper").height())
		{
			var newHeight = $("#leftbar").height() - $("#footer").outerHeight();
			var subtractPadding = 40;
			$("#wrapper").css("height",	newHeight);
			$("#content-wrapper").css("min-height", newHeight - subtractPadding);
			$("#content").css("min-height", newHeight - subtractPadding);
			$("#interior-sidebar").css("min-height", newHeight - 20);
			$("#interior-content").css("min-height", newHeight);
		}
	});*/

		
	if($("#interior-sidebar").outerHeight() < $("#interior-main").outerHeight())
	{
	  var newHeight = $("#interior-main").outerHeight();
		$("#interior-sidebar").css("height", newHeight);
	}
		
	$(".feed_item .feed_preview_content a").each(function() {
		$(this).text($(this).text().replace(/ ... /, ""));
	});
	
	/*$(".feed_item .feed_preview_date").each(function() {
		var thisDay = parseInt($(this).children(".day").text(), 10);
		var thisMonth = parseInt($(this).children(".month").text(), 10) - 1;
		var thisYear = parseInt($(this).children(".year").text(), 10) + 2000;
		$(this).text($.datepicker.formatDate('MM dd, yy', new Date(thisYear,thisMonth,thisDay)));
	});*/
	
	$(".feed_item .feed_preview_image").each(function() {
		$(this).css("height",	$(this).parent().height());
	});
		
});
