$(document).ready(function(){

        // ANTISPAM
        $('a[href^="mailto"], span.wmail').each(function (i) {
                //Remplacment du texte dans l'élément
                var temp = $(this).html();
                temp = temp.replace("/adamis/","@");
                temp = temp.replace("/prod/",".");
                $(this).html(temp);
                //Si il y a un attribut "href", on remplace le texte dans l'attribut
                if($(this).attr("href")){
                        var temphref = $(this).attr("href");
                        temphref = temphref.replace("/adamis/","@");
                        temphref = temphref.replace("/prod/",".");
                        $(this).attr("href",temphref);
                }
        })

		// Fonction de scroll smooth
		jQuery.fn.extend({
		  scrollTo : function(speed, easing) {
		    return this.each(function() {
		      var targetOffset = $(this).offset().top;
		      $('html,body').animate({scrollTop: targetOffset}, speed, easing);
		    });
		  }
		});

        // Lien "Haut de Page"
		$(".top").click( function() {
			$('#wrap').scrollTo(800);
			return false;
		});

});