$(window).bind("load", function() { 

	var headerHeight = 0,
	mainHeight = 0,
	footerHeight = 0,	
	mainNewHeight=0;
	headerHeight = $("#header").height();
	mainHeight = $("#main").height();
	footerHeight = $("#footer").height();
	positionFooter();
	
	function positionFooter() {
		
		if ( (headerHeight+mainHeight+footerHeight) < ($(window).scrollTop()+$(window).height()) ) {
			mainNewHeight = ($(window).scrollTop()+$(window).height()-footerHeight-headerHeight)+"px";
				$('#main .container').css({
				height: mainNewHeight
			})
		} 
	}

	$(window).resize(positionFooter)
});
$(document).ready(function() {
	$("body#home #content .col").click(function(event){
		event.preventDefault();
		window.location = $(this).find("h3:first a:first").attr("href");  
	});
	$("body#home #content .col").hover( function() { 
		$(this).addClass("hover"); 
	},function() {
		$(this).removeClass("hover");
	});
});
