$(document).ready(function(){

 // fixed layout from http://designm.ag/tutorials/sticky-sidenav-layout/
function staticNav() {
		var sidenavHeight = $(".A").height(); //Get height of column A
		var winHeight = $(window).height(); //Get height of viewport
		var winWidth = $(window).width();
 
		if (!($.browser.msie && $.browser.version.substr(0,1)<7)) { //if not IE6...
			$(".fixed").css({'position' : 'fixed'});  //reset the sidenav to be absolute
		}

		if (sidenavHeight > winHeight || winWidth < 960) { //If sidenav is taller than viewport...
			$(".fixed").css({'position' : 'absolute'}); 
		}
	}
	
	staticNav();

	$(window).resize(function () { //Each time the viewport is adjusted/resized, execute the function
		staticNav();
	});
	


});