/* Partenaires */
$.fn.cycle.defaults.timeout = 3000;
$(function() {
$('#effect1').cycle({ 
    fx:      'custom', 
    cssBefore:{  
        left: 130,   
        top: -100,  
        display: 'block' 
    }, 
    animIn: {  
        left: 0, 
        top: 0  
    }, 
    animOut: {  
        left: 130,   
        top: 100   
    }, 
    delay: -2000
});
$('#effect2').cycle({
    fx:      'turnDown',
    delay:   -2000
});
$('#effect3').cycle({
   fx:     'toss',
   easing: 'easeOutExpo',
   delay:  -2000
});
});


// jQuery Tools
$(document).ready(function() {
	//Ajouter les pages dans le if ou on veut une galerie (ne pas en mettre d'autres sinon bug. pas compris pourquoi
	if ($("#pageEnCours").val() == "galerie" || $("#pageEnCours").val() == "equipes" ){
		// select the thumbnails and make them trigger our overlay
		if ($("#triggers a")){
			$("#triggers a").overlay({
			 
				// each trigger uses the same overlay with the id "gallery"
				target: '#gallery',
			 
				// optional exposing effect
				expose: '#f1f1f1'
			 
			// let the gallery plugin do its magic!
			}).gallery({
			 
				// the plugin accepts its own set of configuration options
				speed: 800
			});
		}
	}
	$("ul.css-tabs").tabs("div.css-panes > div").history();
	$("#contactform").validate();
});

/* FONCTIONS POUR LE FORMULAIRE DE CONNEXION RAPIDE */
var fc_username_clicked = false;
var fc_password_clicked = false;
function fc_username () {
	if (!fc_username_clicked) {
		document.getElementById("fcf_login").value = "";
		fc_username_clicked = true;
	}
}
function fc_password () {
	if (!fc_password_clicked) {
		document.getElementById("fcf_password").value = "";
		fc_password_clicked = true;
	}
}
