//-->> FANCYBOX
$(document).ready(function() {

    $(".fichePortraits").fancybox({

        'autoDimensions'	: 'true',
        'autoScale'     	: false,
        'transitionIn'		: 'none',
        'transitionOut'		: 'none',
        'type'				: 'iframe'
    });
    
    $(".fiche").fancybox({
        
        'autoDimensions'	: true,
        'autoScale'     	: false,
        'transitionIn'		: 'none',
        'transitionOut'		: 'none'

    });

});




	function fenetreCent(url,nom,largeur,hauteur,options) {
	var haut=(screen.height-hauteur)/2;
	var Gauche=(screen.width-largeur)/2;
	fencent=window.open(url,nom,"top="+haut+",left="+Gauche+",width="+largeur+",height="+hauteur+","+options);
	}




	$(document).ready(function() {
		$("#commentForm").validate();
	});









$(document).ready(function(){
	$("#nav-one li").hover(
		function(){ $("ul", this).fadeIn("fast"); }, 
		function() { } 
	);
if (document.all) {
		$("#nav-one li").hoverClass ("sfHover");
	}
});




$.fn.hoverClass = function(c) {
	return this.each(function(){
		$(this).hover( 
			function() { $(this).addClass(c);  },
			function() { $(this).removeClass(c); }
		);
	});
};	  





//-->> POPUP
function OuvrirPopup(page,nom,option) {
   window.open(page,nom,option);
}





function toggleDiv(id,flagit) {

if (flagit=="1"){

if (document.layers) document.layers[''+id+''].visibility = "show"

else if (document.all) document.all[''+id+''].style.visibility = "visible"

else if (document.getElementById) document.getElementById(''+id+'').style.visibility = "visible"

}

else

if (flagit=="0"){

if (document.layers) document.layers[''+id+''].visibility = "hide"

else if (document.all) document.all[''+id+''].style.visibility = "hidden"

else if (document.getElementById) document.getElementById(''+id+'').style.visibility = "hidden"

}

}



//-->> ERREURS
$(document).ready(function() {
		   $("#messageOk").fadeOut(3000);
		    $("#messageErreur2").fadeOut(5000);
		   $("#newsletterOk").fadeOut(3000);
		   });





//-->> SLIDELOCK
$(document).ready(function() {
	
	// call the plugin on the desired form
	$("#test_form").slideLock({
	
		// set the options - all are given, not all are required
		labelText: "<span class=\"rouge\">Faites glisser le curseur &agrave; droite pour activer le formulaire</span>",
		noteText: "<strong>Formulaire prot&eacute;g&eacute; par un syst&egrave;me anti-spam</strong>",
		lockText: "Verrouill&eacute;",
		unlockText: "D&eacute;verrouill&eacute;",
		iconURL: "images/chrome/arrow_right.png",
		inputID: "sliderInput",
		onCSS: "#333",
		offCSS: "#aaa",
		inputValue: 1,
		saltValue: 9,
		checkValue: 10,
		js_check: "js_check",
		submitID: "#submit"
	
	});
	
});

