//////////////////////////////////////////////Sliding CaptionVignetteRose/////////////////////////////////////////////
$(document).ready(function(){
//To switch directions up/down and left/right just place a "-" in front of the top/left attribute
//Full Caption Sliding (Hidden to Visible)
$('.masque').hover(function(){
$(".captionVignetteRose", this).stop().animate({top:'0px'},{queue:false,duration:500, easing: 'easeOutBounce'});
}, function() {
$(".captionVignetteRose", this).stop().animate({top:'170px'},{queue:false,duration:800, easing: 'easeOutBounce'});
});
});
//////////////////////////////////////////////Sliding CaptionVignetteJaune/////////////////////////////////////////////
$(document).ready(function(){
//To switch directions up/down and left/right just place a "-" in front of the top/left attribute
//Full Caption Sliding (Hidden to Visible)
$('.masque').hover(function(){
$(".captionVignetteJaune", this).stop().animate({top:'0px'},{queue:false,duration:500, easing: 'easeOutBounce'});
}, function() {
$(".captionVignetteJaune", this).stop().animate({top:'170px'},{queue:false,duration:800, easing: 'easeOutBounce'});
});
});
//////////////////////////////////////////////Sliding CaptionVignetteBleu/////////////////////////////////////////////
$(document).ready(function(){
//To switch directions up/down and left/right just place a "-" in front of the top/left attribute
//Full Caption Sliding (Hidden to Visible)
$('.masque').hover(function(){
$(".captionVignetteBleu", this).stop().animate({top:'0px'},{queue:false,duration:500, easing: 'easeOutBounce'});
}, function() {
$(".captionVignetteBleu", this).stop().animate({top:'170px'},{queue:false,duration:800, easing: 'easeOutBounce'});
});
});
//////////////////////////////////////////////Sliding CaptionVignetteNoir/////////////////////////////////////////////
$(document).ready(function(){
//To switch directions up/down and left/right just place a "-" in front of the top/left attribute
//Full Caption Sliding (Hidden to Visible)
$('.masque').hover(function(){
$(".captionVignetteNoir", this).stop().animate({top:'0px'},{queue:false,duration:500, easing: 'easeOutBounce'});
}, function() {
$(".captionVignetteNoir", this).stop().animate({top:'170px'},{queue:false,duration:800, easing: 'easeOutBounce'});
});
});


//////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////Sliding CaptionSans/////////////////////////////////////////////
$(document).ready(function(){
//To switch directions up/down and left/right just place a "-" in front of the top/left attribute
//Full Caption Sliding (Hidden to Visible)
$('.masqueGrand').hover(function(){
$(".captionsans", this).stop().animate({top:'0px'},{queue:false,duration:3000, easing: 'easeOutCirc'});
}, function() {
$(".captionsans", this).stop().animate({top:'620px'},{queue:false,duration:1000, easing: 'easeOutBounce'});
});
});
//////////////////////////////////////////////Sliding CaptionSans1/////////////////////////////////////////////
$(document).ready(function(){
//To switch directions up/down and left/right just place a "-" in front of the top/left attribute
//Full Caption Sliding (Hidden to Visible)
$('.masqueGrand').hover(function(){
$(".captionsans1", this).stop().animate({top:'0px'},{queue:false,duration:2000, easing: 'easeOutElastic'});
}, function() {
$(".captionsans1", this).stop().animate({top:'620px'},{queue:false,duration:1000, easing: 'easeOutBounce'});
});
});
//////////////////////////////////////////////Sliding CaptionSans2/////////////////////////////////////////////
$(document).ready(function(){
//To switch directions up/down and left/right just place a "-" in front of the top/left attribute
//Full Caption Sliding (Hidden to Visible)
$('.masqueGrand').hover(function(){
$(".captionsans2", this).stop().animate({bottom:'0px'},{queue:false,duration:2000, easing: 'easeOutElastic'});
}, function() {
$(".captionsans2", this).stop().animate({bottom:'620px'},{queue:false,duration:1000, easing: 'easeOutBounce'});
});
});
//////////////////////////////////////////////Sliding CaptionSans3/////////////////////////////////////////////
$(document).ready(function(){
//To switch directions up/down and left/right just place a "-" in front of the top/left attribute
//Full Caption Sliding (Hidden to Visible)
$('.masqueGrand').hover(function(){
$(".captionsans3", this).stop().animate({left:'0px'},{queue:false,duration:2000, easing: 'easeOutElastic'});
}, function() {
$(".captionsans3", this).stop().animate({left:'955px'},{queue:false,duration:1000, easing: 'easeOutBounce'});
});
});
//////////////////////////////////////////////Sliding CaptionSans4/////////////////////////////////////////////
$(document).ready(function(){
//To switch directions up/down and left/right just place a "-" in front of the top/left attribute
//Full Caption Sliding (Hidden to Visible)
$('.masqueGrand').hover(function(){
$(".captionsans4", this).stop().animate({right:'0px'},{queue:false,duration:2000, easing: 'easeOutElastic'});
}, function() {
$(".captionsans4", this).stop().animate({right:'955px'},{queue:false,duration:1000, easing: 'easeOutBounce'});
});
});



//////////////////////////////////////////////Sliding Captionrose/////////////////////////////////////////////
$(document).ready(function(){
//To switch directions up/down and left/right just place a "-" in front of the top/left attribute
//Full Caption Sliding (Hidden to Visible)
$('.masqueGrand').hover(function(){
$(".captionrose", this).stop().animate({bottom:'480px'},{queue:false,duration:500, easing: 'easeOutCirc'});
}, function() {
$(".captionrose", this).stop().animate({bottom:'620px'},{queue:false,duration:1000, easing: 'easeOutBounce'});
});
});
//////////////////////////////////////////////Sliding CaptionBleu/////////////////////////////////////////////
$(document).ready(function(){
//To switch directions up/down and left/right just place a "-" in front of the top/left attribute
//Full Caption Sliding (Hidden to Visible)
$('.masqueGrand').hover(function(){
$(".captionbleu", this).stop().animate({bottom:'480px'},{queue:false,duration:500, easing: 'easeOutCirc'});
}, function() {
$(".captionbleu", this).stop().animate({bottom:'620px'},{queue:false,duration:1000, easing: 'easeOutBounce'});
});
});
//////////////////////////////////////////////Sliding CaptionJaune/////////////////////////////////////////////
$(document).ready(function(){
//To switch directions up/down and left/right just place a "-" in front of the top/left attribute
//Full Caption Sliding (Hidden to Visible)
$('.masqueGrand').hover(function(){
$(".captionjaune", this).stop().animate({bottom:'480px'},{queue:false,duration:500, easing: 'easeOutCirc'});
}, function() {
$(".captionjaune", this).stop().animate({bottom:'620px'},{queue:false,duration:1000, easing: 'easeOutBounce'});
});
});
//////////////////////////////////////////////Sliding CaptionNoir/////////////////////////////////////////////
$(document).ready(function(){
//To switch directions up/down and left/right just place a "-" in front of the top/left attribute
//Full Caption Sliding (Hidden to Visible)
$('.masqueGrand').hover(function(){
$(".captionnoir", this).stop().animate({bottom:'480px'},{queue:false,duration:500, easing: 'easeOutCirc'});
}, function() {
$(".captionnoir", this).stop().animate({bottom:'620px'},{queue:false,duration:1000, easing: 'easeOutBounce'});
});
});
//////////////////////////////////////////////Sliding CaptionPortrait/////////////////////////////////////////////
$(document).ready(function(){
//To switch directions up/down and left/right just place a "-" in front of the top/left attribute
//Full Caption Sliding (Hidden to Visible)
$('.masqueGrand').hover(function(){
$(".captionPortrait", this).stop().animate({bottom:'310px'},{queue:false,duration:100, easing: 'easeOutCirc'});
}, function() {
$(".captionPortrait", this).stop().animate({bottom:'620px'},{queue:false,duration:100, easing: 'easeOutBounce'});
});
});
//////////////////////////////////////////////Sliding CaptionTeteDe/////////////////////////////////////////////
$(document).ready(function(){
//To switch directions up/down and left/right just place a "-" in front of the top/left attribute
//Full Caption Sliding (Hidden to Visible)
$('.masqueGrand').hover(function(){
$(".captionTeteDe", this).stop().animate({bottom:'310px'},{queue:false,duration:100, easing: 'easeOutCirc'});
}, function() {
$(".captionTeteDe", this).stop().animate({bottom:'620px'},{queue:false,duration:100, easing: 'easeOutBounce'});
});
});
//////////////////////////////////////////////Sliding CaptionKonami/////////////////////////////////////////////
$(document).ready(function(){
//To switch directions up/down and left/right just place a "-" in front of the top/left attribute
//Full Caption Sliding (Hidden to Visible)
$('.masqueGrand').hover(function(){
$(".captionKonami", this).stop().animate({bottom:'310px'},{queue:false,duration:100, easing: 'easeOutCirc'});
}, function() {
$(".captionKonami", this).stop().animate({bottom:'620px'},{queue:false,duration:100, easing: 'easeOutBounce'});
});
});


//////////////////////////////////////////////LoopedSlider/////////////////////////////////////////////
$(document).ready(function(){
$('#loopedslider').loopedSlider({
autoStart: 5000,
});

$('#newslider').loopedSlider({
		containerClick: true, // Click container for next slide
});
});


//////////////////////////////////////////////Formulaire/////////////////////////////////////////////
function verification()
{
 if(document.formulaire.nom.value == "")  {
   alert("Veuillez entrer votre nom svp");
   document.formulaire.nom.focus();
   return false;
  }
   else
 if(document.formulaire.prenom.value == "") {
   alert("Veuillez entrer votre prénom svp");
   document.formulaire.prenom.focus();
   return false;
  }
   else
 if(document.formulaire.objet.value == "") {
   alert("Veuillez entrer un objet à votre message svp");
   document.formulaire.objet.focus();
   return false;
  }
   else
    if(document.formulaire.message.value == "") {
   alert("Veuillez entrer votre message svp");
   document.formulaire.message.focus();
   return false;
  }
   else

 if(document.formulaire.mail.value == "") {
   alert("Veuillez entrer votre adresse électronique svp");
   document.formulaire.mail.focus();
   return false;
  }
  else
 if(document.formulaire.mail.value.indexOf('@') == -1) {
   alert("Ceci n'est pas une adresse électronique, vérifiez la svp");
   document.formulaire.mail.focus();
   return false;
  }
return true
}

//////////////////////////////////////////////KONAMI/////////////////////////////////////////////
if ( window.addEventListener ) { 
  var state = 0, konami = [38,38,40,40,37,39,37,39,66,65]; 
window.addEventListener("keydown", function(e) { 
    if ( e.keyCode == konami[state] ) state++; 
    else state = 0; 
    if ( state == 10 ) 
window.location = "http://www.les-mouches.com/pages/Fly_konami.php"; 
    }, true); 
}

//////////////////Accordeon
ddaccordion.init({
	headerclass: "bouton", //Shared CSS class name of headers group
	contentclass: "accordeon", //Shared CSS class name of contents group
	revealtype: "click", //Reveal content when user clicks or onmouseover the header? Valid value: "click", "clickgo", or "mouseover"
	mouseoverdelay: 200, //if revealtype="mouseover", set delay in milliseconds before header expands onMouseover
	collapseprev: true, //Collapse previous content (so only one open at any time)? true/false 
	defaultexpanded: [2], //index of content(s) open by default [index1, index2, etc]. [] denotes no content.
	onemustopen: false, //Specify whether at least one header should be open always (so never all headers closed)
	animatedefault: false, //Should contents open by default be animated into view?
	persiststate: true, //persist state of opened contents within browser session?
	toggleclass: ["enplusclosed", "enplus2open"], //Two CSS classes to be applied to the header when it's collapsed and expanded, respectively ["class1", "class2"]
	togglehtml: ["prefix"], //Additional HTML added to the header when it's collapsed and expanded, respectively  ["position", "html1", "html2"] (see docs)
	animatespeed: "fast", //speed of animation: integer in milliseconds (ie: 200), or keywords "fast", "normal", or "slow"
	oninit:function(expandedindices){ //custom code to run when headers have initalized
		//do nothing
	},
	onopenclose:function(header, index, state, isuseractivated){ //custom code to run whenever a header is opened or closed
		//do nothing
	}
})

