$(function()
{
	$("a.modal").each(function(i)
	{
		addr = $(this).attr("href");
		$(this).attr("rel", addr).attr("href", "#");
	});
	$("a.modal").click(function()
	{
		$("body").append('<div id="modal-layer"></div>');
		$("#sitewrapper").append('<div id="modal" style="width: 420px; left: 267px;"></div>');
		$("#modal").html('<table width="100%" align="center"><tr><td valign="top" align="center"><object id="MediaPlayer1" width="400" height="360" classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715" standby="Loading Microsoft® Windows® Media Player components..." type="application/x-oleobject"><param name="AutoStart" value="True"><param name="FileName" value="' + $(this).attr("rel") + '"><param name="ShowControls" value="true"><param name="ShowStatusBar" value="true"><embed type="application/x-mplayer2" src="' + $(this).attr("rel") + '" name="MediaPlayer1" width="400" height="360" autostart="1" showcontrols="1"></embed></object></td></tr><tr><td><p><strong>' + $(this).prev().prev().text() + '</strong><br /><br />The camera system is being upgraded. There are only a limited amount of connections available. Try to get on as early as possible to get a viewing spot. If you are not able to connect, we apologize for the inconvenience<br /><br /><a class="btn_close" href="#">Close</a></td></tr></table>');
		$("#modal, #modal-layer").fadeIn(300);
		scrollTo(0, 0);
		return false;
	});
	$("#modal-layer, #modal a.btn_close").live("click", function()
	{
		$("#modal-layer, #modal").fadeOut(300, function() { $(this).remove(); } );
		return false;
	});
	
});