var bTimer=false;
$(document).ready(function(){ if (!bTimer) { bTimer=true; doUpdate(); }	$('#nav > ul > li > a').append($('<span class="border" />')); $('span.border',$('#nav > ul > li.active').prev()).remove();
	$('a[name=modal]').click(function(e) {
		e.preventDefault();
		var src=$(this).attr('href');
		$('#dialog > #dialog_image').attr ('src',src);
		var maskH=$(document).height();
		var maskW=$(window).width()+512;
		$('#mask').css({'width':maskW,'height':maskH});
		$('#mask').fadeIn(50);
		$('#mask').fadeTo("slow",0.5);
		var winH=$(window).height();
		var winW=$(window).width();
		$('#dialog').css('top',winH/2-$('#dialog').height()/2+$(window).scrollTop());
		$('#dialog').css('left',winW/2-$('#dialog').width()/2);
		$('#dialog').fadeIn(500);
	});
	$('.window .close').click(function (e) {
		e.preventDefault();
		$('#mask').hide();
		$('.window').hide();
	});
	$('#mask').click(function () {
		$(this).hide();
		$('.window').hide();
	});
})
function doUpdate() { $.ajax ({ url:"/msg/recentupdates.html", cache: false, success: function(html){/*$("#todaysupdates").attr({ height: $("#todaysupdates").height() });*/$("#todaysupdates").html(html);/*$("#todaysupdates").attr({ height: "auto" });*/} }); setTimeout ("doUpdate()",60000); }

