$(function() {
 	$("body").addClass("js")
	
	$(window).bind('load resize',function(){
		$t = $("#container")
		$t.css({"position":"absolute"})
		/*if($(window).height()<$t.height()){
			$t.css({"marginTop":"5px","top":"5px"})
			//$("#top_bg, #bottom_bg").show()
			//$("body").removeClass("bgimage")
		}else{
			var margintop = "-"+String($t.height()/2)+"px"
			$t.css({"marginTop":margintop,"top":"50%"})
			//$("#top_bg, #bottom_bg").hide()
			//$("body").addClass("bgimage")
		}*/
		if($(window).width()<$t.width()){
			$t.css({"marginLeft":"5px","left":"5px"})
			$("#top_bg, #bottom_bg").show()
			$("body").removeClass("bgimage")
		}else{
			var marginleft = "-"+String($t.width()/2)+"px"
			$t.css({"marginLeft":marginleft,"left":"50%"})
			$("#top_bg, #bottom_bg").hide()
			$("body").addClass("bgimage")
		}
	});
	
	if ($.browser.msie && $.browser.version < 7) {
		$('img[@src$=.png]').ifixpng();
	}
	$("a").each(function() {
		var atitle = String($(this).attr('title'))
		if(atitle.indexOf("New Window: ")==0){
			$(this).click(function() { newwin = window.open(this.href,'newwindow'); newwin.focus(); return false; })
			$(this).attr('title',atitle.substring(String("New Window: ").length))
		}
	})
//	$("#navigation a").css().hover(function() { $(this).animate({background:"#0080c0"},200) },function() { $(this).animate({background:"#006FB7"},200) })
	
 })