// JavaScript Document

//__ Ajout des fonctions permanentes

	$(document).ready(function(){
		
		//__ Action des logo SOCIAUX
		$(".social").each( function () {
				$(this).mouseover(function(){
						// On abaisse
						$(this).stop();
						$(this).animate({'margin-top' : '-15px'},500,'easeOutBounce');
					}).mouseout(function(){
						// On remonte
						$(this).stop();
						$(this).animate({'margin-top' : '-35px'},100);
					});

			});
			
		//__ Anim logo
		$(".logo_header").prepend('<div id="glow"></div>');
		$(".logo_header").prepend('<div id="blueScreen"></div>');
		$("#glow").fadeOut(1);
		$(".logo_header img").mouseover( function () {
				$("#glow").stop(true).fadeTo('normal',1.0);
				AnimateLogo();
			});
		$(".logo_header img").mouseout( function () {
				$("#glow").stop(true).fadeTo('normal',0);
			});
			
		function AnimateLogo () {
				$("#glow").css({'backgroundPosition':'0 0px'})
				.animate({'backgroundPosition':'-3000px 0px'},15000,'linear',AnimateLogo);
		}
		
		
		// Coordonnees
		$('#coord').jOla({
						 speed : 50,
						 expansion: 3, 
						 multiplier: 1, 
						 bottomstart: 1, bottomadd: 1, 
						 rStart : 24 , gStart : 175 , bStart : 225 ,
						 rStep : 24 , gStep : 175 , bStep : 225
						 });
		
		// Formulaire
		$("#email").click( function () {
				if ( $(this).val() == "Votre Email" ) {
					$(this).val("");
				} else if ( $(this).val() == "" ) {
					$(this).val("Votre Email");
				}
			});
		
		$("#nom").click( function () {
				if ( $(this).val() == "Votre Nom" ) {
					$(this).val("");
				} else if ( $(this).val() == "" ) {
					$(this).val("Votre Nom");
				}
			});
		
		$("#contenu").click( function () {
				if ( $(this).val() == "Votre Message" ) {
					$(this).val("");
				} else if ( $(this).val() == "" ) {
					$(this).val("Votre Message");
				}
			});
		
	} );
