// Hides the content area, then set a timeout to show it again after a delay
// 
// Flash animation calls the init function to disable the default timeout, then calls the done function to show
// the content in sync with the animation.
//
// Visitor can speed up content showing by clicking where the content will come.
//
// Pierre Rossel / Prossel Software - 14.07.2009


jQuery(document).ready(function(){
																
	jQuery('#contenu').css('z-index', '-1');
	
	// set a timeout to show the content again
	idTimeoutShowContent = setTimeout('showContent()', 3000);
	
	jQuery("#conteneur").click(function(event){
		showContent();
	});
	
});

function showContent() {
	//jQuery("#conteneur").click(function(event){});
	jQuery("#conteneur").unbind('click');

	cancelShowTimeout();

	jQuery('#contenu').hide();
	jQuery('#contenu').css('z-index', 'auto');
	jQuery('#contenu').fadeIn();

	//jQuery('#contenu').show();
	 //alert("hello");
}

function cancelShowTimeout() {
	if (idTimeoutShowContent != undefined) {
		idTimeoutShowContent = clearTimeout(idTimeoutShowContent);
	}
}

// Called by flash 
function onFlashAnimationInit() {
	cancelShowTimeout();
}

// Called by flash 
function onFlashAnimationDone() {
	showContent();
}




