// JavaScript Document
$(document).ready(function(){
		//$("img#leftFlyout").css("opacity",0);
		$("div#nav_hover").css("display","none");
		$("#leftBar > div:not(#searchHolder,.betaSM)").css({"marginBottom":"3px","clear":"left","position":"relative","float":"left"});
		$("#rightBar > div").css("margin-bottom","4px");
		$("#fire").css({"left":(($(window).width() / 2) - 218),"top":160});
		$(window).bind("resize", adjustLayout);
		
		
		adjustLayout();
		
		
		
		var betaCopy = "<div class=\"betaSM\" id=\"1\"></div>";
		
		
		////////////////////////////
		function adjustLayoutHandler(e) {
			adjustLayout();
		}
		function adjustLayout() {
			var offs = $("div#footer").offset().top;
			var offsB = $("div#tracer").offset().top;
			
			var leftTot = $('#leftBar').offset().top + $('#leftBar').height(); // left column height plus offset from top of screen
			var rightTot = $('#rightBar').offset().top + $('#rightBar').height();  // right column height plus offset from top of screen
			
			if((offsB - 140) <= leftTot || (offsB - 140) <= rightTot) {
				$("div#footer").css("position","relative");	
			} else {
				$("div#footer").css({"position":"fixed","bottom":"0px"});
			} 
		}
	});
