$(function(){
	
	$('.fade-in').hide().fadeIn(3000);
		
	// setup overlay actions to buttons
	$("a[rel]").overlay({

		// setup exposing (optional operation);
		onBeforeLoad: function() {
			this.getBackgroundImage().expose({api: true}).load();	
		},				
		
		onLoad: function(content) {
			// find the player contained inside this overlay and load it
			this.getContent().find("a.test-video").flowplayer(0).load();
		},
		
		onClose: function(content) {
			$f().unload();
			
			// close exposing
			this.getBackgroundImage().expose().close();
		}
	});				
	
	// install flowplayers
	$("a.test-video").flowplayer("../videos/flowplayer.commercial-3.1.5.swf", { key: '#@6a5d13267ed6a9c898c', clip: { scaling: "scale"} });	

	$('#selectLang').flash({
		src: '/images/WhyAmbitWorks_V3.swf',
		width: 595,
		height: 367,
		wmode: 'transparent'
	});
});

