// overlay
// define function that opens the overlay
/*
function openOverlay() {
	// get access to the overlay API
	var api = $("#videoOverlay").overlay();
	// call it's open() method		
	api.load();			
}
*/

function startGame(movie){
	var flashvars = {};
	flashvars.path = path+'flv/';
	flashvars.file = movie;
	var params = {};
	params.play = "true";
	params.menu = "false";
	params.wmode = "transparent";
	$("#template_content_completestart").html('<div id="flashGameContainer"><div id="flashGame"><h3>U heeft geen juiste Flash player</h3>U heeft niet de juiste Flash player om deze game te kunnen spelen.<br>Wil je een jaar lang Complete Start winnen, klik dan op ondertaande link.<br><a href="http://www.adobe.com/go/getflash" target="_blank">Installeer de nieuwste Flash player</a></div></div>');
	swfobject.embedSWF("/completestart/flashfacebook/CompleteStart.swf", "flashGame", "760", "500", "10.0.0", false, flashvars, params);
}

var path = '/';

function openOverlay(movie) {
	//fill overlay with given content
	var flashvars = {};
	flashvars.path = path+'flv/';
	flashvars.file = movie;
	var params = {};
	params.play = "true";
	params.menu = "false";
	params.wmode = "transparent";
	//swfobject.embedSWF("../flash/CompleteStart.swf", "overLayMovie", "712", "513", "8.0.0", false, flashvars, params);
	swfobject.embedSWF("/completestart/flashfacebook/CompleteStart.swf", "overLayMovie", "760", "500", "13.0.0", false, flashvars, params);
	
	/*
	$("#overLayMovie").flashembed(path + "swf/videoplayerOverlay.swf", {
	 	// these properties are given for the Flash object
	 	path: path+'flv/',
		file: movie
	});
	*/
	
	// get access to the overlay API
	var api = $("#videoOverlay").overlay();
	// call it's open() method
	api.load();
}

$(function() {
	$("#videoOverlay").overlay({
		close: 'a.close' ,
		speed: 50,
		// start exposing when overlay starts to load
		onBeforeLoad: function() {
			// this line does the magic. it makes the background image sit on top of the mask
			this.getBackgroundImage().expose({opacity: 0.75 ,color: '#000000'});
		}, 
		
		// when overlay is closed take the expose instance and close it as well
		onClose: function() {
			$.expose.close();
		}
	});
});

function hideFlashOverlay() {
	// close overlay
	$("#videoOverlay").overlay().close();	
}

$(document).ready(function() {
	initEmptyToggler();
	
	$('a.overheerlijkKrijtbord').click(function() {
		$('.active1').removeClass('active1');
		$(this).parent().addClass('active1');
		return false;
	});
});


// EmptyTogglers
function emptyToggler(a){if($(a).attr("id")!=""){if($(a).val()==emptyTogglers[$(a).attr("id")]){$(a).val("");$(a).addClass("enabled")}else{if($(a).val()==""){$(a).val(emptyTogglers[$(a).attr("id")]);$(a).removeClass("enabled")}}}}function initEmptyToggler(){$(".emptyToggler").each(function(){var a=$(this).attr("id");if(a!=""){emptyTogglers[a]=$(this).val()}$(this).focus(function(){emptyToggler($(this))});$(this).blur(function(){emptyToggler($(this))})})}var emptyTogglers={}


