$(function(){
	
	var win = $(window)
	,con = $("#container")
	,m_top = -136
	,m_left = -264
	,w_hei
	,w_wid;
	
	function start(){
		w_wid = (win.width()>>1)+m_left;
		w_hei = (win.height()>>1)+m_top;
		con.css({"left":w_wid})
		con.css("top",win.height()+100).animate({"top":w_hei},800,"easeOutBack",function(){$("h1",con).fadeIn(500);});

		if(navigator.userAgent.indexOf("MSIE") != -1) {
			$('em img',con).each(function() {
				if($(this).attr('src').indexOf('.png') != -1) {
					$(this).css({
						'filter': 'progid:DXImageTransform.Microsoft.AlphaImageLoader(src="' +
						$(this).attr('src') +
						'", sizingMethod="scale");'
					});
				}
			});
		}

	}
	
	win.resize(
		function(e) {
			w_wid = (win.width()>>1)+m_left;
			w_hei = (win.height()>>1)+m_top;
			con.stop().animate({"top":w_hei,"left":w_wid},1200,"easeOutElastic");
		}
	);
		
	win.load(start);

})

