$(document).ready( function()
{
	var backgroundColor_init = "#ffffff"; // Couleur de fond initiale
	var borderColor_init = "#cccccc"; // Couleur de bordure initiale
	
	var backgroundColor_modif = "#ffeef8"; // Couleur de fond modifiée
	var borderColor_modif = "#ba2119"; // Couleur de bordure modifiée
	
	
	// Effets sur les formulaires du site :
	// ------------------------------------------
	
	$("#date_h").datepicker();

	$('#date_h').datepicker('option', {
		dateFormat: 'dd/mm/yy',
		dayNames: ['Dimanche', 'Lundi', 'Mardi', 'Mercredi', 'Jeudi', 'Vendredi', 'Samedi'],
		dayNamesMin: ['Di', 'Lu', 'Ma', 'Me', 'Je', 'Ve', 'Sa'],
		monthNames: ['Janvier','Fevrier','Mars','Avril','Mai','Juin','Juillet','Aout','Septembre','Octobre','Novembre','Decembre'],
		monthNamesShort: ['Jan','Fev','Mar','Avr','Mai','Jui','Jui','Aou','Sep','Oct','Nov','Dec']
	});
		
	$("input, textarea").focus(function(){
		$(this).animate({ 
			backgroundColor: backgroundColor_modif,
			borderLeftColor: borderColor_modif,
			borderRightColor: borderColor_modif,
			borderTopColor: borderColor_modif,
			borderBottomColor: borderColor_modif
		  }, 250 );
	});
	 
	$("input, textarea").blur(function(){
		$(this).animate({ 
			backgroundColor: backgroundColor_init,
			borderLeftColor: borderColor_init,
			borderRightColor: borderColor_init,
			borderTopColor: borderColor_init,
			borderBottomColor: borderColor_init
		  }, 250 );
	});
	
	$(".submit").mouseover(function(){
		$(this).animate({ 
			backgroundColor: backgroundColor_modif,
			borderLeftColor: borderColor_modif,
			borderRightColor: borderColor_modif,
			borderTopColor: borderColor_modif,
			borderBottomColor: borderColor_modif
		  }, 250 );
	});
	 
	$(".submit").mouseout(function(){
		$(this).animate({ 
			backgroundColor: backgroundColor_init,
			borderLeftColor: borderColor_init,
			borderRightColor: borderColor_init,
			borderTopColor: borderColor_init,
			borderBottomColor: borderColor_init
		  }, 250 );
	});
	
	// Effets sur les liens du site :
	// ------------------------------------------
	/*
	$("p a").mouseover(function(){
		$(this).fadeOut(100);
		$(this).fadeIn(400);
	});*/
	
	// Permet de remonter en haut de la page :
	// ------------------------------------------
	$('#haut_de_page a').click(function(){
		jQuery('html').animate({ scrollTop: 0 }, "slow");
		return false;
	});
	
	// Effets sur les images des galeries de photos :
	// ------------------------------------------
	$(".galerie_photos img").mouseover(function(){
	   $(this).animate({
		opacity: 0.8
	  }, 200 );
	});

	$(".galerie_photos img").mouseout(function(){
	   $(this).animate({
		opacity: 1
	  }, 200 );
	});
	
	// Effets sur les réalisations dans la partie droite du site Internet :
	// ------------------------------------------
	$("#conteneur_exemples_realisation img").mouseover(function(){
	   $(this).animate({
		opacity: 0.7
	  }, 300 );
	});

	$("#conteneur_exemples_realisation img").mouseout(function(){
	   $(this).animate({
		opacity: 1
	  }, 300 );
	});
	
	// ------------------------------------------
	
	$(".tableau_de_bord, .pb_droit, .confirme, .erreur, .informations, .chargement, .ajoute, .mots_cles").corner("5px");
	$("#conteneur_opacite").corner("50px");
	$(".template_realisation, .template_realisation_admin").corner("10px");
	$("#c_contenu").corner("bottom 20px");
	$("#menu_haut ul li a").corner("top 18px");
		
	// Effets sur les liens du menu du bas :
	// ------------------------------------------
	
	/*
	$("#pied a").mouseover(function(){
	   $(this).animate({
		opacity: 0.5
	  }, 300 );
	});
	
	$("#pied a").mouseout(function(){
	   $(this).animate({
		opacity: 1
	  }, 300 );
	});*/
	
	// Effets sur les liens dans la bannière :
	// ------------------------------------------
	
	$("#l_agence").mouseover(function(){
	   $("#l_agence_txt").animate({
		fontSize: "1.4em"
	  }, 100 );
	});
	
	$("#l_agence").mouseout(function(){
	   $("#l_agence_txt").animate({
		fontSize: "1.2em"
	  }, 100 );
	});
	
	// ------------------------------------------
	
	$("#nos_realisations").mouseover(function(){
	   $("#nos_realisations_txt").animate({
		fontSize: "1.4em"
	  }, 100 );
	});
	
	$("#nos_realisations").mouseout(function(){
	   $("#nos_realisations_txt").animate({
		fontSize: "1.2em"
	  }, 100 );
	});
	
	// ------------------------------------------
	
	$("#nous_contacter").mouseover(function(){
	   $("#nous_contacter_txt").animate({
		fontSize: "1.4em"
	  }, 100 );
	});
	
	$("#nous_contacter").mouseout(function(){
	   $("#nous_contacter_txt").animate({
		fontSize: "1.2em"
	  }, 100 );
	});
	
	// ------------------------------------------
	
	$("#l_agence, #nos_realisations, #nous_contacter").mouseover(function(){
	   $(this).animate({
		opacity: 0.4
	  }, 300 );
	});
	
	$("#l_agence, #nos_realisations, #nous_contacter").mouseout(function(){
	   $(this).animate({
		opacity: 1
	  }, 300 );
	});
	
	$("a.affichetoi").lightBox();
});