// Vous pouvez changer la vitesse (speed) (1 == tres rapide)
// Vous pouvez changer la qualité de la transition (1 == best)
// Plus la transition est de qualité, plus la rapidité ralenti et doit être augmenté
var speed = 30;
var transition = 30;
 
// Dimensions du preloader en GIF animé
var GIFpreloadLargeur = 30;
var GIFpreloadHauteur = 30;
 
var timer= 0;
var opaciT = 100; 
 
function opacity()
{
    opaciT = opaciT - transition;
 
    var object = document.getElementById("preloader").style;
    object.opacity = (opaciT / 100);
    object.MozOpacity = (opaciT / 100);
    object.KhtmlOpacity = (opaciT / 100);
    object.filter = "alpha(opacity=" + opaciT + ")"; 
 
	if (opaciT <= 0)
	{
		document.getElementById("preloader").style.visibility="hidden";
		clearInterval(timer);
	}
 
}
 
function preload()
{
	if (document.getElementById)
	{
		document.getElementById("preloadIMG").style.visibility="hidden";
		timer = setInterval("opacity()",speed);
	}
 
	else
	{
	   	if (document.layers)
		{
			document.preloadIMG.visibility = "hidden";
			timer = setInterval("opacity()",speed);
	    }
	        else
		{
			document.all.preloadIMG.style.visibility = "hidden";
			timer = setInterval("opacity()",speed);
		}
	}
}
 
// GÉNÉRER LE CSS POUR LE PRELOADER
var myCSS;
myCSS = "<style type=\"text/css\">";
 
myCSS += "html, body { height:auto; margin:0px; padding:0px;}";
 
myCSS += "#preloader {";
myCSS += "position:fixed;";
myCSS += "background-color:white;";
myCSS += "width:950px;";
myCSS += "height:240px; ";
myCSS += "display:block;";
myCSS += "z-index:100000;";
myCSS += "}";
 
myCSS += "#preloadIMG {";
myCSS += "position:absolute;";
myCSS += "left:50%;";
myCSS += "width:" + GIFpreloadLargeur + "px;";
myCSS += "height:" + GIFpreloadHauteur + "px;";
myCSS += "margin-left:-" + (GIFpreloadLargeur / 2) + "px;";
myCSS += "top:100px;";
myCSS += "}";
 
myCSS += "</style>";
 
// ÉCRITURE DES CSS
window.document.write(myCSS);
 
// ÉXÉCUTION
window.onload = function() { preload(); }





$(document).ready(function(){
		
	$("#carousel").CloudCarousel( { 
		reflHeight: 20,
		reflGap:-2,
		titleBox: $('#titre-slider'),
		buttonLeft: $('#gauche'),
		buttonRight: $('#droit'),
		yRadius:40,
		xPos: 475,
		yPos: 35,
		speed:0.15,
		mouseWheel:true
	});
		
});
$(document).ready(function(){
		
	$(".carouselGalerie").CloudCarousel( { 
		reflHeight: 40,
		reflGap:-2,
		titleBox: $('#titre-slider'),
		buttonLeft: $('.carouselLeft2'),
		buttonRight: $('.carouselRight2'),
		yRadius:30,
		xPos: 455,
		yPos: 86,
		speed:0.1,
		mouseWheel:true
	});

		
});
