/**
 * @author leigh@hoppermagic
 * monitors the size of the browser area
 * if the navigation length is greater than the browser area
 * turn off the fixed property
 */

$(document).ready(function(){
	
	checkNavHeight();
	
	$(window).resize(function(){
 		checkNavHeight();
	});
});


 function checkNavHeight(){
	
	var navBottomEdge = $("#left").height() + parseFloat($("#left").css("top"), 10);
		
	if ( $(window).height() < navBottomEdge){
		
		$("#left").css("position", "relative");
	}else{
		
		$("#left").css("position", "fixed");
	}
}
