$(document).ready(function(){
	
	$('a').focus(function(){ $(this).blur()}); // remove focus rectangle, usablility issue?

	// dirty hack to set footer to bottom if content is to small
	function footerThing()
	{
		var wh = $(window).height();
		if( $("#content_home").length )
		{
			var eh = $('#header').height() + $('.path').height() + $('#content_home').height() + $('#footer').height();
		}
		else if( $("#content_wide").length )
		{
			var eh = $('#header').height() + $('.path').height() + $('#content_wide').height() + $('#footer').height();
		}
		else
			var eh = $('#header').height() + $('.path').height() + $('#content').height() + $('#footer').height();
		
		var diff = wh - eh;
		//console.log(wh,eh,diff);
		if( diff > 0 )
		{
			//console.log($('#content').height());
			if( $("#content_home").length )
				$('#content_home').height( $('#content_home').height() + diff );
			else if( $("#content_wide").length )
				$('#content_wide').height( $('#content_wide').height() + diff );
			else
				$('#content').height( $('#content').height() + diff );
	
			//console.log($('#content').height());
		}
	}
	
	$(window).resize(function(){
		footerThing();
	});
	
	footerThing();
	
});
