$(document).ready(function(){
	setSize();
	
	var  test = window.location.search;
	test = test.replace('?jury=','');
	var flashvars = {
		w: $(window).height(),
		h: $(window).height(),
		jury: test
	};
	var params = {
		scale: "noscale",
		allowFullScreen: "true",
		wmode:"window",
		bgcolor:"#000000"
	};
	var attributes = {
	};

	swfobject.embedSWF("Zeddle_Main.swf", "flashcontainer", $(window).width(), $(window).height(), "10.0.0","expressinstall.swf",flashvars, params, attributes);
	if($("#flashcontainer_debug").length != 0) {
		swfobject.embedSWF("Zeddle_Debug.swf", "flashcontainer_debug", $(window).width(), $(window).height(), "10.0.0","expressinstall.swf",flashvars, params, attributes);
	}
});

window.onresize = setSize;

function setSize() {
	var winheight = $(window).height();
	var winwidth = $(window).width();
	if($("#flashcontainer_debug").length != 0) {
		$("#flashcontainer_debug").css("width",winwidth+"px");
		$("#flashcontainer_debug").css("height",winheight+"px");
	}
	$("#flashcontainer").css("width",winwidth+"px");
	$("#flashcontainer").css("height",winheight+"px");
}
