//Azure Snowball Game (Dec 2008)
//Azure Design
//A Graham 
//Notes: Jquery 1.2.6, nyroModals 1.2.8, hook on scoreboard pop, modal pop used from flash. swfObject as standard.

//Hook page loaded
$(document).ready(function()
{

	//We need to bind to the leader board button to override its default function (remember you can pop an exisitng href [accesible])
	$("#btn-lboard").bind("click", function(e)
	{
		//Prevent detault
		e.preventDefault();		
		//Show modal
		modal_pop();
		//Prevent default
		return false;
	});	

});

//Insert the actual game and inject required vars
swfobject.embedSWF("media/layout.swf", "flash-inner", "780", "450", "8.0.0", "#151B34", false, { menu:"false", wmode:"transparent"} );

function modal_pop()
{
	//Pop up a modal - we have hard coded cause we always require the given size- nyro is cool given the correct styling + it handles inline jq ajax wrap
	$.nyroModalManual({ bgColor: '#000000', width: 440, height: 530, minWidth: 440, minHeight: 530, autoSizable: false, resizeable: false, url: "index.php?lb=1" });
}