$(document).ready( function()
{
	// -----------------------------------------------------------------------------------------
	// Effets sur les formulaires du site Internet
	// -----------------------------------------------------------------------------------------
	
	var backgroundColor_init = "#ffffff"; // Couleur de fond initiale des formulaires
	var borderColor_init = "#5f4124"; // Couleur de bordure initiale des formulaires
	
	var backgroundColor_modif = "#efefef"; // Couleur de fond modifiée des formulaires
	var borderColor_modif = "#999999"; // Couleur de bordure modifiée des formulaires
		
		
	$("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 );
	});
	
	// -----------------------------------------------------------------------------------------
	// Banniere
	// -----------------------------------------------------------------------------------------
	
	$("#photos_ban").cycle({		
		/*fx:'zoom', 
		easing: 'bouncein', 
		delay:  -4000*/
	});

	// -----------------------------------------------------------------------------------------
	// Scroll
	// -----------------------------------------------------------------------------------------
	
	// Permet de remonter en haut de la page :
	$("#haut_de_page a").click(function(){
		jQuery("html, body").animate({ scrollTop: 0 }, "slow");
		return false;
	});
	
	// -----------------------------------------------------------------------------------------
	// Effets sur les images des galeries de photos :
	// -----------------------------------------------------------------------------------------

	$(".photo_galerie img").mouseover(function(){
	   $(this).animate({
		opacity: 0.5
	  }, 100 );
	});

	$(".photo_galerie img").mouseout(function(){
	   $(this).animate({
		opacity: 1
	  }, 100 );
	});
	
	// -----------------------------------------------------------------------------------------
	// Corners
	// -----------------------------------------------------------------------------------------
	
	$(".tableau_de_bord, .pb_droit, .confirme, .erreur, .informations, .chargement, .ajoute, .mots_cles, .pager").corner("8px");
	// $("#input_recherche, #button_newsletter").corner("12px");
	//$(".infos_cadre").corner("12px top");
	$("#menu_pecher_en_allier, #menu_en_pratique").corner("12px bottom");
	
	// -----------------------------------------------------------------------------------------
	
	$("#itineraire_aappma, #recherche_rapide_poisson, #presentation_aappma, #acces_elus, #meteo_aappma").corner("12px");
	$("#itineraire_aappma h6, #cadre_carte_gm h6, #presentation_aappma h6, #acces_elus h6, #meteo_aappma h6").corner("6px top");
	
	// -----------------------------------------------------------------------------------------
	// Opacité
	// -----------------------------------------------------------------------------------------
	
	$(".infos_cadre").animate({opacity: "0.5"}, "fast");
	
	$("#pecher_en_allier, #carte_interactive, #en_pratique, #les_poissons").mouseenter(function(){
	  var id_child=$(this).attr("id");

	  $("#"+id_child+" .infos_cadre").animate({
		opacity: 0.9
	  }, 150 );
	});

	$("#pecher_en_allier, #carte_interactive, #en_pratique, #les_poissons").mouseleave(function(){
	  var id_child=$(this).attr("id");
	  
	  $("#"+id_child+" .infos_cadre").animate({
		opacity: 0.5
	  }, 150 );
	});

	// -----------------------------------------------------------------------------------------
	// LightBox
	// -----------------------------------------------------------------------------------------

	$("a.affichephoto").lightBox();
	
	// -----------------------------------------------------------------------------------------
	// Autres fonctions
	// -----------------------------------------------------------------------------------------
	
	// initialisation_de_la_taille_de_police();
});
