$(document).ready(function(){
	//Set the link to the current page as selected (white text, arrow underneath)
	var pageName = location.href;
	pageName = pageName.substring(pageName.lastIndexOf('/') + 1);
	if(pageName.indexOf('?') >= 0) {
		pageName = pageName.substring(0,pageName.indexOf('?'));
	}
	if(pageName.indexOf('#') >= 0) {
		pageName = pageName.substring(0,pageName.indexOf('#'));
	}
	if(pageName == '') { pageName = 'index.shtml'; }
	$("#nav a[href="+pageName+"]").attr('class','selected');

	$('#content').css({minHeight:($(window).height()-($('#head').height()+$('#nav').height()+$('#foot').height()+35))+'px'});
	$(window).bind('resize', function() {
		$('#content').css({minHeight:($(window).height()-($('#head').height()+$('#nav').height()+$('#foot').height()+35))+'px'});	
	});
});
