/************************************************ * PHOTORAMA                                    * ***********************************************/// Paramètresvar pause = 2500; // temps de pausevar fadeDuration = "slow"; // durée de la transitionvar actual = 0;var next = 1;var count = 0;var pass = true;/* * c'est ici que l'on lance le photorama */function initPhotorama(){		$("#Home_Photorama li").css({'opacity':'0', 'position':'absolute'});	$("#Home_Photorama li").eq(actual).css({'opacity':'1'});	$(".home #Home_ListePhotos").css({'left':'0px'});	$(".home #Home_ListePhotos img").removeAttr('width').removeAttr('height').css({'height':'31px'});	$(".portail #Home_ListePhotos img").removeAttr('width').removeAttr('height').css({'height':'50px'});	$(".description").css({'opacity':'0', 'position':'absolute', 'height':'200px'});	$(".description").eq(actual).css({'opacity':'1'});	count = $("#Home_Photorama li").size();	photoramaEngine(actual, next, count);		$("#Home_ListePhotos li").click(function(event){		pass = false;		var idx = 0;		var cpt = $("#Home_Photorama li").size();		for(var i=0; i<count; i++){			if($(this).html()==$("#Home_ListePhotos li").eq(i).html()){				idx = i;			}		}		switchPhoto(actual, idx);		actual = idx;			});}/* * c'est le moteur du photorama */function photoramaEngine(){	if(pass){		//alert(actual+"-"+next);		actual = switchPhoto(actual, next);		next = next+1;		if(next==count) next = 0;		setTimeout("photoramaEngine()", pause);	}else{		pass = true;		setTimeout("photoramaEngine()", 6000);	}}/* * c'est ici que se passe la transition */function switchPhoto(actualPic, nextPic){	$("#Home_Photorama li").eq(actualPic).animate({'opacity':'0'}, fadeDuration);	$("#Home_Photorama li").eq(nextPic).animate({'opacity':'1'}, fadeDuration);	$("#Home_ListePhotos li").eq(actualPic).children("a").animate({'opacity':'0.5'}, fadeDuration);	$("#Home_ListePhotos li").eq(nextPic).children("a").animate({'opacity':'1'}, fadeDuration);	$(".description").eq(actualPic).animate({'opacity':'0'}, fadeDuration);	$(".description").eq(nextPic).animate({'opacity':'1'}, fadeDuration);	return nextPic;}
