Merci de confirmer votre inscription
depuis votre boîte mail.
", "Confirmation"); }else { jAlert("Il semblerait qu'il y ait une erreur de programmation
", "Message d'erreur"); }}});}}return false;});}function popupcall(){$("#callbackform input[type=text],#callbackform textarea").focus(function(){ var placeholder = $(this).attr("placeholder");color(this);if ($(this).val() == placeholder) {$(this).val('');}});$("#callbackform input[type=text],#callbackform textarea").blur(function(){ var placeholder = $(this).attr("placeholder");decolor(this);if ($(this).val() == "") {$(this).val(placeholder);}});$('#callbackform_prenom').blur(function() {if ($(this).val() != "") {var part1 = $(this).val().substring(0,1).toUpperCase();var part2 = $(this).val().substring(1).toLowerCase();$(this).val(part1+part2);}});if ($("#lang_mem").val() == "fr") {$("#callbackform_tel").keyup(function(){var input_content = $(this).val();var check = input_content.replace(/ /gm,"");var number_length = input_content.length;var unicode = event.keyCode?event.keyCode:event.charCode;if (unicode != 8) {if (number_length == 2 || number_length == 5 || number_length == 8 || number_length == 11){input_content = input_content + " ";} else if (parseInt(number_length) > 14){input_content = input_content.substr(0,14);}$(this).val(input_content);}});}$("#callbackform").submit(function(){var msg = ""; if (!$("input[name=callbackform_civilite]:checked").length) { msg += "Sélectionnez votre civilité.\n";}if ($("#callbackform_prenom").val() == "Prénom") { msg += "Insérez votre prénom.\n";color($("#callbackform_prenom"));}if ($("#callbackform_nom").val() == "Nom") { msg += "Insérez votre nom.\n";color($("#callbackform_nom"));}if ($("#callbackform_tel").val() == "Téléphone") { msg += "Insérez votre numéro de téléphone.\n";color($("#callbackform_tel"));}if ($("#lang_mem").val() == "fr" && $("#callbackform_tel").val().length != 14) { msg += "Le numéro de téléphone doit être au format 00 00 00 00 00.\n";color($("#callbackform_tel"));}if ($("#callbackform_email").val() == "Suivez-nous") { msg += "Insérez votre adresse e-mail.\n";color($("#callbackform_email"));}if ($("#callbackform_email").val() != "Suivez-nous") { indexAroba = $("#callbackform_email").val().indexOf('@');indexPoint = $("#callbackform_email").val().indexOf('.');if ((indexAroba < 0) || (indexPoint < 0)) {msg += "Corrigez votre adresse e-mail.\n";color($("#callbackform_email"));}{ var invalidChars = " /:,;'éèàùï"; for (i=0; i -1) {msg += "Corrigez votre adresse e-mail.\n";color($("#callbackform_email"));} } }{ var atPos = $("#callbackform_email").val().indexOf("@",1); if ($("#callbackform_email").val().indexOf("@",atPos+1) != -1) { msg += "Corrigez votre adresse e-mail.\n";color($("#callbackform_email"));} }}if ($("#callbackform_msg").val() == "Raison de votre demande" || $("#callbackform_msg").val() == "") { msg += "Insérez votre adresse e-mail.\n";color($("#callbackform_msg"));}if (msg != "") { jAlert("Veuillez corriger les erreurs suivantes :\n" + msg, "Message d'erreur :");} else { if ($("#call_wait").is(":hidden")) {$("#call_wait").show();var civilite = $("input[name=callbackform_civilite]:checked").val();var nom = $("#callbackform_nom").val().toUpperCase();var prenom = $("#callbackform_prenom").val();var tel = $("#callbackform_tel").val();var mail = $("#callbackform_email").val().toLowerCase();var msgbis = $("#callbackform_msg").val();var newsletter = "no";var lang = $("#lang_mem").val();if ($("#callbackform_newsbox").is(":checked")) { newsletter = "yes"; }var totalvars = "action=callback&civilite=" + civilite + "&nom=" + encodeURIComponent(nom) + "&prenom=" + encodeURIComponent(prenom) + "&tel=" + encodeURIComponent(tel) + "&mail=" + encodeURIComponent(mail) + "&msgbis=" + encodeURIComponent(msgbis) + "&newsletter=" + newsletter + "&lang=" + lang;$.ajax({type: "GET",url: "includes/callback.php",data: totalvars,cache: false,success: function(data){$("#call_wait").hide();$("#callbackform input[type=text]").val("");$("#callbackform input[type=radio],#callbackform input[type=checkbox]").prop("checked",false);$("#callbackform input[type=text],#callbackform textarea").each(function(){var placeholder = $(this).attr("placeholder");$(this).val(placeholder);});$.colorbox.close();if (data == 1) {jAlert("Nous avons bien reçu votre demande !
Nous vous rappelerons dans les meilleurs délais,
merci de votre confiance.", "Confirmation");if (analytics == "on" && consent != "no"){_gaq.push(['_trackPageview', '/includes/tracking.php?step=callback']);if (newsletter == "yes") { _gaq.push(['_trackPageview', '/optin.html']); }}} else { jAlert("Il semblerait qu'il y ait une erreur de programmation
", "Message d'erreur"); }}});}}return false;});}function open_cabinet(){$.ajax({type:"GET",url:path+"includes/timediff.php",data:"action=opencheck",cache:false,success:function(data){if (data != "") {$(".open_biarritz").html(data);}}});setTimeout("open_cabinet()",30000);}function slideTo(id){if ($("#"+id).length){var page_top = $("#"+id).offset().top;$("html,body").animate({scrollTop:page_top},1000);}}function cookie(){if (consent == "unset"){if ((navigator.doNotTrack&&(navigator.doNotTrack=='yes'||navigator.doNotTrack=='1'))||(navigator.msDoNotTrack&&navigator.msDoNotTrack==1)||(window.DoNotTrack&&window.DoNotTrack==1)){$.get("/config/cookie.php",{action:"consent",consent:"no"});$("#consent_mem").val("no");$.get("/config/cookie.php",{action:"del_session"});} else {$.colorbox({inline:true,href:"#cookiePopup",className:"cookiePopup",escKey:false,overlayClose:false,closeButton:false});}} else if (consent != "no"){$(".off-img").addClass("hide");$(".on-img").removeClass("hide");$("#accept_analytics").html("Je refuse");if (analytics == "on"){ _gaq.push(['_trackPageview']); }} else {$(".on-img").addClass("hide");$(".off-img").removeClass("hide");$("#accept_analytics").html("J'accepte");$("#accept_analytics").addClass("switch-off");$.get("/app/cookie.php",{action:"del_session"});}$("#cookiego").click(function(){$.colorbox({inline:true,href:"#cookiePopup",className:"cookiePopup",escKey:false,overlayClose:false,closeButton:false});return false;});$("#personalize-analytics").click(function(){$.colorbox({inline:true,href:"#analyticsPopup",className:"analyticsPopup",escKey:false,overlayClose:false,closeButton:false});return false;});$("#go_back_cookie").click(function(){$.colorbox({inline:true,href:"#cookiePopup",className:"cookiePopup",escKey:false,overlayClose:false,closeButton:false});return false;});$("#accept_analytics").click(function(){$(this).toggleClass("switch-off");$(".google-analytics .on-off-switch img").toggleClass("hide");if ($(this).hasClass("switch-off")){$(this).text("J'accepte");} else {$(this).text("Je refuse");}});$(".google-analytics .on-off-switch").click(function(){$(".google-analytics .on-off-switch img").toggleClass("hide");$("#accept_analytics").toggleClass("switch-off");if ($("#accept_analytics").hasClass("switch-off")){$("#accept_analytics").text("J'accepte");} else {$("#accept_analytics").text("Je refuse");}});$(".cboxClose").click(function(){var id = $(this).attr("id");var consent = "yes";var consent_mem = $("#consent_mem").val();if (id == "consentNO"){ consent = "no"; }else if (id == "consentFINISH" && $(".on-img").hasClass("hide")){ consent = "no"; }if (consent == "no"){ $.get("/config/cookie.php",{action:"del_session"}); }if (consent == "yes"){$(".on-img").removeClass("hide");$(".off-img").addClass("hide");$("#accept_analytics").html("Je refuse");} else {$(".on-img").addClass("hide");$(".off-img").removeClass("hide");$("#accept_analytics").html("J'accepte");}$.colorbox.close();$.ajax({type:"GET",url:"/config/cookie.php",data:"action=consent&consent="+encodeURIComponent(consent) + "&consent_mem="+encodeURIComponent(consent_mem),success:function(data){if (consent == "yes"){ $("#consent_mem").val(data); } else { $("#consent_mem").val("no"); }if (consent == "yes" && analytics == "on"){ _gaq.push(['_trackPageview']); }}});});}$(document).ready(function(){cookie();navigation();var page_en_cours = window.location.href.replace("https://www.lycee-aizpurdi.com/", "");if (page_en_cours == "contact.html") { contact(); }else if (page_en_cours == "blog" || page_en_cours == "blog-fr") { blog("bcat"); }else if (page_en_cours.indexOf("-blog-fr-") >= 0 || page_en_cours.indexOf("-bcat-fr-") >= 0) { blog("blog"); }}); function blog(type){var detect_class = $("article").attr("class");if ($("aside").is(":hidden")) { $("aside").fadeIn(1000); }if (detect_class == undefined || detect_class == "") { $("article").addClass("blog_left"); }var blog_last = $("#blog_last ul").html();if (current_page == "blog" || current_page == "blog-fr") { $("#blog_last").hide(); }if (type == "blog" && blog_last != "") {var blog_id = $("#blog_id_mem").val();$("#blog_last li").show();if ($("#art"+blog_id).length) { $("#art"+blog_id).hide(); }$("#blog_last").fadeIn(1000);} else {$("#blog_last").hide();}$.ajax({type:"GET",url:"/includes/blog.php",data:"action=session",cache:false,success:function(data){if (data == "wait") {$("#avis_mes1").show();var slidepoint = parseInt($("#avis_mes1").offset().top) - 30;} else if (data == "publish") {$("#avis_mes2").show();var slidepoint = parseInt($("#avis_mes2").offset().top) - 30;} else if (data == "delete") {$("#avis_mes3").show();var slidepoint = parseInt($("#avis_mes3").offset().top) - 30;} else if (data == "nofollow") {jAlert("Désabonnement confirmé !
Désormais, vous ne suivrez plus cet article.","Confirmation");}if (data == "wait" || data == "publish" || data == "delete") {$("html,body").animate({scrollTop:slidepoint}, 1000);setTimeout(function(){ $(".blog_notif").fadeOut(500); }, 10000);}}});if ($("#blog_to_comment").length) {$("#blog_to_comment").click(function(){var slidepoint = parseInt($(".blog_sepline").eq(1).offset().top) + 3;$("html,body").animate({scrollTop:slidepoint}, 1000);return false;});}if ($("#blog_pix").length && $("#blog_sharing1").is(":hidden")) {$("#blog_pix").hover(function(){ $("#blog_sharing1").show(); },function(){ $("#blog_sharing1").hide(); });}if ($("#blog_comment_result").length) {$("#blog_comment_result span,.blog_reply").click(function(){var bouton_class = $(this).attr("class");if (bouton_class == "blog_reply h_menu_actif pointer") {var pseudo = $(this).parent().find(".blog_comment_pseudo").html();var comment_id = $(this).attr("id").replace("blog_reply","");$("#blog_form_intro").html("Votre réponse au commentaire
de :");$("#blog_form_intro span").html(pseudo);$("#blog_comment_id").val(comment_id);} else {if ($("#blog_form_intro").html() != "Soyez le premier à commenter cet article !" && $("#blog_form_intro").html() != "Que pensez-vous de cet article ?") {$("#blog_form_intro").html("Que pensez-vous de cet article ?");}$("#blog_comment_id").val(0);}var slidepoint = parseInt($("#blog_comment_form").offset().top) - 85;$("html,body").animate({scrollTop:slidepoint}, 1000);});}if ($(".blog_comment_like1").length) {$(".blog_comment_like1,.blog_comment_like2").click(function(){var com_id = $(this).attr("id").replace("blog_comment_like","");var blog_id = $("#blog_id_mem").val();var newnb = parseInt($(this).prev().html()) + 1;$.ajax({type:"GET",url:"/includes/blog.php",data:"action=like&com_id=" + com_id + "&blog_id=" + blog_id,cache:false,success:function(data){if (data == 1) { $("#blog_comment_nb"+com_id).html(newnb); }else if (data == 2) { jAlert("Vous ne pouvez pas liker un commentaire
que vous avez posté, désolé :-)","Message d'erreur"); }else if (data == 3) { jAlert("Il semblerait que vous ayez déjà liké :-)","Message d'erreur"); }}});});}if ($("#blog_comment_form").length) {$("#blog_comment_form input[type=text],#blog_comment_form input[type=email], #blog_comment_form textarea").focus(function() { color(this); });$("#blog_comment_form input[type=text],#blog_comment_form input[type=email],#blog_comment_form textarea").blur(function() { decolor(this); });$("#blog_pseudo").blur(function() { if ($(this).val() != "") { var part1 = $(this).val().substring(0, 1).toUpperCase(); var part2 = $(this).val().substring(1); $(this).val(part1+part2); } });$("#blog_comment_form").submit(function(){ if ($("#blog_wait").is(":hidden")) {var msg = "";if ($("#blog_pseudo").val() == "") { msg += "- Insérez votre pseudo.\n";color($("#blog_pseudo"));}if ($("#blog_email").val() == "") { msg += "- Insérez votre adresse e-mail.\n";color($("#blog_email"));}if ($("#blog_email").val() != "") { indexAroba = $("#blog_email").val().indexOf('@');indexPoint = $("#blog_email").val().indexOf('.');if ((indexAroba < 0) || (indexPoint < 0)) {msg += "- Corrigez votre adresse e-mail.\n";color($("#blog_email"));} }{ var invalidChars = " /:,;'éèàùï"; for (i=0; i -1) {msg += "- Corrigez votre adresse e-mail.\n";color($("#blog_email"));} } }{ var atPos = $("#blog_email").val().indexOf("@",1); if ($("#blog_email").val().indexOf("@",atPos+1) != -1) { msg += "- Corrigez votre adresse e-mail.\n";color($("#blog_email"));} }if ($("#blog_comment").val() == "") { msg += "- Écrivez votre commentaire.\n";color($("#blog_comment"));}if (msg != "") {jAlert("Veuillez corriger les erreurs suivantes :\n" + msg, "Message d'erreur");} else {$("#blog_wait").show();var com_id = $("#blog_comment_id").val();var blog_id = $("#blog_id_mem").val();var blog_pseudo = $("#blog_pseudo").val();var blog_email = $("#blog_email").val().toLowerCase();var blog_comment = $("#blog_comment").val();var blog_optin = "no"; if ($("#blog_optin").is(":checked")) { blog_optin = "yes"; }var blog_newsletter = "no"; if ($("#blog_newsletter").is(":checked")) { blog_newsletter = "yes"; }var lang = $("#lang_mem").val();$.ajax({type:"GET",url:"/includes/blog.php",data:"action=submit&com_id=" + com_id + "&blog_id=" + blog_id + "&blog_pseudo=" + encodeURIComponent(blog_pseudo) + "&blog_email=" + encodeURIComponent(blog_email) + "&blog_comment=" + encodeURIComponent(blog_comment) + "&blog_optin=" + blog_optin + "&blog_newsletter=" + blog_newsletter + "&lang=" + lang,cache:false,success:function(data){if (data == 1) {jAlert('Presque terminé !
Veuillez confirmer votre commentaire
depuis votre boîte e-mail. Merci.',"Confirmation");$("#blog_optin,#blog_newsletter").prop("checked",false);$("#blog_pseudo,#blog_email,#blog_comment").val("");} else {jAlert("Désolé, il semblerait qu'il ait une erreur de programmation.
Veuillez informer le webmaster du message suivant :\n" + data,"Message d'erreur");}$("#blog_wait").hide();}});}}return false;});}}function cookie(){if (consent == "unset"){if ((navigator.doNotTrack&&(navigator.doNotTrack=='yes'||navigator.doNotTrack=='1'))||(navigator.msDoNotTrack&&navigator.msDoNotTrack==1)||(window.DoNotTrack&&window.DoNotTrack==1)){$.get("/config/cookie.php",{action:"consent",consent:"no"});$("#consent_mem").val("no");$.get("/config/cookie.php",{action:"del_session"});} else {$.colorbox({inline:true,href:"#cookiePopup",className:"cookiePopup",escKey:false,overlayClose:false,closeButton:false});}} else if (consent != "no"){$(".off-img").addClass("hide");$(".on-img").removeClass("hide");$("#accept_analytics").html("Je refuse");if (analytics == "on"){ _gaq.push(['_trackPageview']); }} else {$(".on-img").addClass("hide");$(".off-img").removeClass("hide");$("#accept_analytics").html("J'accepte");$("#accept_analytics").addClass("switch-off");$.get("/app/cookie.php",{action:"del_session"});}$("#cookiego").click(function(){$.colorbox({inline:true,href:"#cookiePopup",className:"cookiePopup",escKey:false,overlayClose:false,closeButton:false});return false;});$("#personalize-analytics").click(function(){$.colorbox({inline:true,href:"#analyticsPopup",className:"analyticsPopup",escKey:false,overlayClose:false,closeButton:false});return false;});$("#go_back_cookie").click(function(){$.colorbox({inline:true,href:"#cookiePopup",className:"cookiePopup",escKey:false,overlayClose:false,closeButton:false});return false;});$("#accept_analytics").click(function(){$(this).toggleClass("switch-off");$(".google-analytics .on-off-switch img").toggleClass("hide");if ($(this).hasClass("switch-off")){$(this).text("J'accepte");} else {$(this).text("Je refuse");}});$(".google-analytics .on-off-switch").click(function(){$(".google-analytics .on-off-switch img").toggleClass("hide");$("#accept_analytics").toggleClass("switch-off");if ($("#accept_analytics").hasClass("switch-off")){$("#accept_analytics").text("J'accepte");} else {$("#accept_analytics").text("Je refuse");}});$(".cboxClose").click(function(){var id = $(this).attr("id");var consent = "yes";var consent_mem = $("#consent_mem").val();if (id == "consentNO"){ consent = "no"; }else if (id == "consentFINISH" && $(".on-img").hasClass("hide")){ consent = "no"; }if (consent == "no"){ $.get("/config/cookie.php",{action:"del_session"}); }if (consent == "yes"){$(".on-img").removeClass("hide");$(".off-img").addClass("hide");$("#accept_analytics").html("Je refuse");} else {$(".on-img").addClass("hide");$(".off-img").removeClass("hide");$("#accept_analytics").html("J'accepte");}$.colorbox.close();$.ajax({type:"GET",url:"/config/cookie.php",data:"action=consent&consent="+encodeURIComponent(consent) + "&consent_mem="+encodeURIComponent(consent_mem),success:function(data){if (consent == "yes"){ $("#consent_mem").val(data); } else { $("#consent_mem").val("no"); }if (consent == "yes" && analytics == "on"){ _gaq.push(['_trackPageview']); }}});});}function contact(){$("#icon_tel2").click(function(){$(this).hide();$(".callhide").hide();$(".callshow").fadeIn(500);$($("#icon_tel")).fadeIn(500);if (analytics == "on" && consent != "no") { _gaq.push(['_trackPageview', '/includes/tracking.php?step=call']); }});if ($(".callshow").is(":visible")) {$("#icon_tel2").hide();$($("#icon_tel")).fadeIn(500);}$("#contact_form input,#contact_form select,#contact_form textarea").focus(function() { color(this); });$("#contact_form input,#contact_form select,#contact_form textarea").blur(function() { decolor(this); });$("#contact_prenom").blur(function() { if ($(this).val() != "") { var part1 = $(this).val().substring(0, 1).toUpperCase(); var part2 = $(this).val().substring(1); $(this).val(part1+part2); } });$('#contact_news_box').click(function() {if ($(this).attr('src') == "template/webtao/images/box1.png") {$(this).attr('src', 'template/webtao/images/box2.png');$('#contact_news').val('on');} else {$(this).attr('src', 'template/webtao/images/box1.png');$('#contact_news').val('off');}});if ($("#lang_mem").val() == "fr") {$("#contact_tel").keyup(function(){var input_content = $(this).val();var check = input_content.replace(/ /gm,"");var number_length = input_content.length;var unicode = event.keyCode?event.keyCode:event.charCode;if (unicode != 8) {if (number_length == 2 || number_length == 5 || number_length == 8 || number_length == 11){input_content = input_content + " ";} else if (parseInt(number_length) > 14){input_content = input_content.substr(0,14);}$(this).val(input_content);}});}$("#contact_submit").find("a").click(function(){$("#form_contact").submit();return false;});$("#form_contact").submit(function(){ var msg = ""; if ($("#contact_civility").val() == "") { msg += "Sélectionnez votre civilité.\n";color($("#contact_civility"));}if ($("#contact_nom").val() == "") { msg += "Insérez votre nom.\n";color($("#contact_nom"));}if ($("#contact_prenom").val() == "") { msg += "Insérez votre prénom.\n";color($("#contact_prenom"));}if ($("#contact_tel").val() == "") { msg += "Insérez votre numéro de téléphone.\n";color($("#contact_tel"));}if ($("#lang_mem").val() == "fr" && $("#contact_tel").val().length != 14 && $("#contact_tel").val().length != 0) { msg += "Le numéro de téléphone doit être au format 00 00 00 00 00.\n";color($("#contact_tel"));}if ($("#contact_email").val() == "") { msg += "Insérez votre adresse e-mail.\n";color($("#contact_email"));}if ($("#contact_email").val() != "") { indexAroba = $("#contact_email").val().indexOf('@');indexPoint = $("#contact_email").val().indexOf('.');if ((indexAroba < 0) || (indexPoint < 0)) {msg += "Corrigez votre adresse e-mail.\n";color($("#contact_email"));} }{ var invalidChars = " /:,;'éèàùï"; for (i=0; i -1) {msg += "Corrigez votre adresse e-mail.\n";color($("#contact_email"));} } }{ var atPos = $("#contact_email").val().indexOf("@",1); if ($("#contact_email").val().indexOf("@",atPos+1) != -1) { msg += "Corrigez votre adresse e-mail.\n";color($("#contact_email"));} }if ($("#contact_message").val() == "") { msg += "Écrivez votre demande.\n";color($("#contact_message"));}if (msg != "") { jAlert("Veuillez corriger les erreurs suivantes :\n" + msg, "Message d'erreur");} else { $('#contact_wait').show();$("#form_contact button").html("ENVOI EN COURS...");var civilite = $("#contact_civility").val();var nom = $("#contact_nom").val().toUpperCase();var prenom = $("#contact_prenom").val();var tel = $("#contact_tel").val();var company = $("#contact_company").val();if (company == "Société") { company = ""; }var mail = $("#contact_email").val().toLowerCase();var folder = $("#contact_folder").val();var msgbis = $("#contact_message").val();var newsletter = "no";var lang = $("#lang_mem").val();if ($("#newsletter").is(":checked")) { newsletter = "yes"; }var totalvars = "action=contact&civilite=" + civilite + "&nom=" + encodeURIComponent(nom) + "&prenom=" + encodeURIComponent(prenom) + "&tel=" + encodeURIComponent(tel) + "&company=" + encodeURIComponent(company) + "&mail=" + encodeURIComponent(mail) + "&newsletter=" + newsletter + "&folder=" + encodeURIComponent(folder) + "&msgbis=" + encodeURIComponent(msgbis) + "&lang=" + lang;$.ajax({type: "GET",url: "/includes/contact.php",data: totalvars,cache: false,success: function(data){if(data != 1){jAlert("Il semblerait qu'il y ait une erreur de programmation", "Message d'erreur");} else if (data == 1){$("#contact_message").val("Votre demande a été envoyée");if (analytics == "on" && consent != "no") {_gaq.push(['_trackPageview', '/includes/tracking.php?step=contact']);if (newsletter == "yes") { _gaq.push(['_trackPageview', '/optin.html']); }}jAlert('Nous avons bien reçu votre demande !', 'Confirmation');$("#newsletter").prop("checked",false);$("#form_contact select,#form_contact input[type=text],#form_contact input[type=email],#form_contact input[type=tel],#form_contact textarea").val("");$("#attach1,#attach2,#attach3,.icon_delete").hide();if ($("#attach").is(":hidden")){ $("#attach").show(); }$.get("/includes/dropzone.php",{action:"contact_delete",number:1});$.get("/includes/dropzone.php",{action:"contact_delete",number:2});$.get("/includes/dropzone.php",{action:"contact_delete",number:3});$("#contact_attach").val(1);}$("#form_contact button").html("ENVOYER");$('#contact_wait').hide();}});}return false;});$.ajax({type:"GET",url:path+"includes/dropzone.php",data:"action=contact_check",cache:false,success:function(data){data = data.split("[BRK]");if(data[0] == 1){ $("#attach1").show(); }if(data[1] == 1){ $("#attach2").show(); }if(data[2] == 1){ $("#attach3").show(); }var total = parseInt(data[0])+parseInt(data[1])+parseInt(data[2]);$("#attach"+total+" .icon_delete").show();$("#contact_attach").val(parseInt(total)+1);if (total == 3) { $("#attach").hide(); }$("#attach1 a").attr("href","upload/"+data[3]);$("#attach2 a").attr("href","upload/"+data[4]);$("#attach3 a").attr("href","upload/"+data[5]);}});Dropzone.options.attach={maxFilesize:3,acceptedFiles:"image/jpeg,application/pdf",init:function(){this.on("addedfile",function(file){var id = $("#contact_attach").val();$("#attach").hide();$("#attach"+id).show();$("#attach"+id+" .progress span").html(0);$("#attach"+id+" .progress").show();});this.on("error",function(file){var id = $("#contact_attach").val();$("#attach"+id).hide();$("#attach"+id+" .progress").hide();$("#attach").show();jAlert("Veuillez joindre un document JPG ou PDF (3 Mo max).", "Message d'erreur");});this.on("uploadprogress",function(file,progress){var id = $("#contact_attach").val();$("#attach"+id+" .progress span").html(parseInt(progress));});this.on("success", function(file, response){var id = $("#contact_attach").val();$("#attach"+id+" .progress").hide();$("#attach"+id+" .icon_delete").show();if (id != 3) { $("#attach").show(); }$("#contact_attach").val(parseInt(id)+1);$("#attach"+(parseInt(id)-1)+" .icon_delete").hide();$("#attach"+id+" a").attr("href","upload/"+response);});}};$("#attach").dropzone({url:path+"includes/dropzone.php?action=contact_transfer"});$(".icon_delete").click(function(){var number = $(this).parent().attr("id").replace("attach","");var id = $("#contact_attach").val();$.ajax({type:"GET",url:path+"includes/dropzone.php",data:"action=contact_delete&number="+number,cache:false,success:function(data){data = data.split("[BRK]");if(data == 1){$("#attach"+number).find(".icon_delete").hide();$("#attach"+number).find(".icon_progress").show();$("#attach"+number).fadeOut(500);if (id == 4) { $("#attach").show(); }$("#contact_attach").val(parseInt(id)-1);$("#attach"+(parseInt(id)-2)+" .icon_delete").show();}}});});}function navigation(){$('a').click(function(){$(this).blur();});$("a,area").click(function(){var text = $(this).attr("href");if ($(this).hasClass("ajax")){text = text.replace("/"+domain_end,"").replace("/","");if (text == ""){ text = "/"; }text = "#!/" + text;$(location).attr('href', text);return false;} else if ($(text).length){var scrollPoint = $(text).offset().top;$("html,body").animate({scrollTop:scrollPoint},1000);return false;}});function nav(){$("#content a").click(function(){var text = $(this).attr("href");if ($(this).hasClass("ajax")){text = text.replace("/"+domain_end,"").replace("/","");if (text == ""){ text = "/"; }text = "#!/" + text;$(location).attr('href', text);return false;} else if ($(text).length){var scrollPoint = $(text).offset().top;$("html,body").animate({scrollTop:scrollPoint},500);return false;}});}$("a").click(function(){$(this).blur();});$(window).hashchange(function(){var lang = $("#lang_mem").val();var type = "";var url = window.location.hash.substring(3);if (url == "") { url = $("#page_mem").val(); }var dest1 = url.indexOf("-" + lang + ".html");var dest2 = url.indexOf("-blog-" + lang + "-");var dest3 = url.indexOf("-bcat-" + lang + "-");var dest4 = url.indexOf("-cat-" + lang + "-");var dest5 = url.indexOf("-scat-" + lang + "-");var dest6 = url.indexOf("-col-" + lang + "-");var dest7 = url.indexOf("-prod-" + lang + "-");if (dest1 >= 0) { type = "page"; }else if (url == "/" || url == "fr") { type = "page"; }else if (dest2 >= 0) { type = "blog"; }else if (dest3 >= 0) { type = "bcat"; }else if (dest4 >= 0) { type = "cat"; }else if (dest5 >= 0) { type = "scat"; }else if (dest6 >= 0) { type = "col"; }else if (dest7 >= 0) { type = "prod"; }else { type = "template"; }if (url == "blog" || url == "blog-" + lang + "") { type = "bcat"; }var clicpage = url;if (clicpage == "/") {var nextpage = clicpage;} else {var nextpage = "/" + clicpage;}var totalvars = "cookie=2v0uc9ihcgq8gun8ppraskgobj&" + type+"=" + url + "&lang=fr";if (clicpage != "#") {if (clicpage != "/" && clicpage != "en" && clicpage != "es" && clicpage != "eu"){$("#slider, #minislider").hide(); $("#header").css("border-bottom","1px solid #e1e1e1");} else {if ($("#mobile_menu").is(":hidden")){$("#slider").fadeIn(500);}else {$("#minislider").fadeIn(500);}$("#header").css("border-bottom",0);}if (type == "blog" || type == "bcat") {blog(type);} else {var detect_class = $("article").attr("class");if (detect_class != undefined) { $("article").removeClass(); }$("aside").hide();}if (!($("#nav_loading").length)){$("#content_middle").html('
chargement en cours...
').removeClass("blog_left");}setTimeout(function(){var page_top = $("#content").offset().top;if (clicpage == "/"){ page_top = 0; }$("html,body").animate({scrollTop:page_top}, 1000);}, 100);setTimeout(function(){$.ajax({type: "GET",url:path+"includes/content.php",data: totalvars,cache: false,success: function(data){data = data.split('[BRK]');$("#content_middle").html(data[0]);$("title").text(data[1]);nav();$("#content_middle").fadeIn(1000);if (clicpage == "contact.html") { contact(); }if (type == "blog" || type == "bcat"){ blog(type); }if (analytics == "on" && consent != "no") { _gaq.push(['_trackPageview', nextpage]); }}});}, 500);}}); if (window.location.hash.substring(3) != '' && window.location.hash.substring(3)!= '#') {var redirection = window.location.hash.substring(3);if (redirection == "/"){ redirection = ""; } $(location).attr("href",path+redirection); }$("a.ajax").click(function(){var lastlink = window.location.hash.substring(3);var nextlink = $(this).attr('href').replace(path,"");if (lastlink == nextlink) {$(window).trigger("hashchange");}});}