$(function() { try { $("a[rel^='prettyPhoto']").prettyPhoto({ animationSpeed: 'fast', slideshow: 10000 }); $("a[rel^='pprettyPhoto']").prettyPhoto({ show_bt_lecture: false }); } catch (err) { } $("#datalog").remove(); $("#passeperdu").click(function() { $("#formulaire_log2").slideToggle('slow'); }); $("#formulaire_log2").submit(function(event) { var regex = /^[a-zA-Z0-9._-]+@[a-z0-9._-]{2,}\.[a-z]{2,4}$/; if (!regex.test($.trim($("#votreadressemail").val()))) { event.preventDefault(); alert("Votre adresse mail est incorrecte"); return false; } }); $("#nospartenaires").click(function() { $("#listepartenaires").slideToggle('slow'); }); // En savoir plus $(".bouton_sfp").click(function(){ if($(this).next("div").is(':visible')===true){ $(".bouton_sfp").not(this).next("div:visible").hide("slow"); $(this).next("div").hide('slow'); }else{ $(".bouton_sfp").next("div:visible").hide("slow"); $(this).next("div").slideToggle('slow'); } }); // PlaceHolder $("#low,#m2p,#votreadressemail").each(function() { var defautValue = this.value; $(this).focus(function() { if ($(this).val() === defautValue) { $(this).val(''); } }); $(this).blur(function() { if ($(this).val() === '') { $(this).val(defautValue); } }); }); $("#div_connect").show(); $("#recherche_histoseminaires").keyup(function(){ $("article[id^=article-]").show(); if($.trim($("#recherche_histoseminaires").val())==''){ $("article[id^=article-]").show(); }else{ $("article[id^=article-]").not(":contains("+ $("#recherche_histoseminaires").val() +")").hide(); } }) });