//SELECT OPTION // FILTER SELECT function PasDeBalance2() { $('#ECommerce_CreerEnvoi_OverlayPasDeBalance.modal').fadeIn(); $('body').append('
'); $('.fade-modal').css({ 'filter': 'alpha(opacity=80)' }).fadeIn(); $("html").css("overflow", "hidden"); } function closeModalEtOverflow2() { closeModal(); $("html").css("overflow", "auto"); } function runFilters() { $('select#theme').change(function () { var value = $("select#theme").val(); if ($(this).val() == 'livraisoncolis') { $("div.filter.soustheme").show(); $("div.seriequestions").hide(); $("div.seriequestions#livraisonpointrelais").show(); } else { $("div.filter.soustheme").hide(); $("div.seriequestions").hide(); $("div.seriequestions#" + value).show(); } }); $('select#soustheme').change(function () { var value = $("select#soustheme").val(); $("div.seriequestions").hide(); $("div.seriequestions#" + value).show(); return false; }); } //OUVRIR UNE MODAL function openModal(that) { var modalD = that.getAttribute('data-rel'); //Trouver la modal correspondante $('#' + modalD).fadeIn(); //Faire apparaitre la modal //Apparition du fond if (!document.getElementById("fade-modal")) { if (document.getElementById("fade-basket")) { $('.fade-basket').remove(); } if (document.getElementById("fade-connect")) { $('.fade-connect').remove(); } if (modalD == "forgotmdp") { $('.fade-modal').css({ 'filter': 'alpha(opacity=80)' }).fadeIn(); } else { $('body').append('
'); $('.fade-modal').css({ 'filter': 'alpha(opacity=80)' }).fadeIn(); } } } //FERMER UNE MODAL function closeModal() { $('.fade-modal , .modal').fadeOut(function () { $('.fade-modal').remove(); $('.fade-modal-menu').css('display', 'none'); }); } //FERMER UN BLOC function closeBloc() { $('.bloc.supp').fadeOut(function () { $('.bloc.supp').slideUp(); }); } function openBloc() { $('.bloc.supp').slideDown("slow"); }; //ALERT function makeToast(text, color, icon) { var div = '
' + '' + 'Fermer' + '' + '

' + '

{1}

' + '
'; $('.container').append(div.format(color, text)); $(".alert.{0}-toast".format(color)).fadeIn().click(function () { $(this).fadeOut(); window.setTimeout(function () { $(".alert.{0}-toast".format(color)).remove(); }, 1500); }); } // LOADER function showLoader() { $(".loading").show(); $(".overlay-white").show(); } function hideLoader() { $(".loading").hide(); $(".overlay-white").hide(); } function moreDetailsClick(temp) { $(temp).find('span').toggleClass("icon-minus").toggleClass("icon-more"); var $this = $(temp); $this.toggleClass('close').closest('.bloc').next(".bloc.detail-colis").slideToggle("slow"); $this.closest('.article').toggleClass('close'); return false; } $(document).ready(function () { /* Correction superposition de placeholder pour les champs de type email s'ils ne sont pas valides ----------------------------------------------------------------------------- */ $("input[type='email']").blur(function () { var estVide = $(this).val(); var estNonValide = $(this).attr("class").indexOf("input-validation-error"); if (estVide.length > 0 && estNonValide != -1) $(this).prop("type", ""); }); /* Afficher,Masquer le mot de passe ----------------------------------------------------------------------------- */ $(document).ready(function () { $(".toggle-password").live('click', function () { $(this).toggleClass("icon-eye-blocked"); var input = $($(this).attr("toggle")); if (input.attr("type") == "password") { input.prop("type", "text"); } else { input.prop("type", "password"); } }); }); /* Limiter Champs NumeroCarte en numéros seulement ----------------------------------------------------- */ $(document).ready(function () { $("#NumeroCarte").prop('type', 'number'); $("#NumeroCarte").on('keypress', function (event) { var charCode = (event.which) ? event.which : event.keyCode; if (charCode > 31 && (charCode < 48 || charCode > 57)) return false; return true; }) }); runFilters(); //CARROUSEL $(".multiple > div:gt(0)").hide(); setInterval(function () { $('.multiple > div:first') .fadeOut(1000) .next() .fadeIn(1000) .end() .appendTo('.multiple'); }, 5000); //$(".more-details").click(function () { // $(this).find('span').toggleClass("icon-minus").toggleClass("icon-more"); //}); // OUVRIR FERMER LE DETAIL DES QUESTIONS/REPONSES (FAQ) var ButtonDetail = $('.more-details'); $('.question-reponse.close').find('.bloc').next(".bloc.detail-reponse").slideUp(); $('.question-reponse.close').find('.more-details').addClass("close"); $('.question-reponse .bloc a.more-details').click(function () { var $this = $(this); $this.toggleClass('.close').closest('.bloc').next(".bloc.detail-reponse").slideToggle("slow"); $this.closest('.question-reponse').toggleClass('close'); return false; }); //$('.question-reponse .bloc').click(function () { // var $this = $(this); // $this.toggleClass('close').next(".detail-reponse").slideToggle("slow"); // $this.find(ButtonDetail).toggleClass('close'); // return false; //}); // OUVRIR FERMER LE DETAIL DES COLIS (PANIER) var ButtonDetail = $('.more-details'); $('.article.close').find('.bloc').next(".bloc.detail-colis").slideUp(); $('.article.close').find('.more-details').addClass("close"); $('.bloc p a.more-details').click(function () { var $this = $(this); $this.toggleClass('close').closest('.bloc').next(".bloc.detail-colis").slideToggle("slow"); $this.closest('.article').toggleClass('close'); return false; }); // OUVRIR FERMER LE DETAIL DES INFOS (COMPTE) var ButtonDetail = $('.more-details'); $('.infos-account.close').find('.bloc').next(".bloc.detail-infos").slideUp(); $('.infos-account.close').find('.more-details').addClass("close"); $('.infos-account.profil_MR .bloc a.more-details').click(function () { var $this = $(this); $this.toggleClass('close').closest('.bloc').next(".bloc.detail-infos").slideToggle("slow"); $this.closest('.infos-account').toggleClass('close'); return false; }); // ACTION MODIFICATION DES INFOS (COMPTE) $('.infos-account .edit').click(function () { var $this = $(this); $this.closest('.infos-account').removeClass('readonly'); $(".infos-account input[type='text'], .infos-account select ").removeAttr('disabled'); $this.closest('.infos-account').find('.bloc').next(".bloc.detail-infos").slideDown(); return false; }); //ACTIONS LISTE CARTE $('.radiolist-map li.item .detail-mag, .back').css({ 'display': 'none' }); $('.radiolist-map li ul li.details').click(function () { $(this).css({ "display": "none" }); var listMag = $('.radiolist-map li.item'); var labelMag = $(this).closest('label'); labelMag.addClass("open"); $('label.open').closest('li').addClass('selected'); $('.radiolist-map li.item').css({ 'display': 'none' }); $('.radiolist-map li.item.selected').css({ 'display': 'block' }); $(".map-bloc .result").css({ "display": "none" }); $(".radiolist-map.scroll-box").css({ 'height': '562px' }); listMag.css({ 'display': 'none' }); $('.back').css({ 'display': 'block' }); $('label.open').closest('li.item').addClass("move"); $('.radiolist-map li.item.selected .detail-mag').css({ 'display': 'block' }); $('.radiolist-map li.item.selected .detail-mag').css({ 'overflow-y': 'auto' }); $('.radiolist-map li.item.selected .detail-mag').css({ 'float': 'left' }); $('.radiolist-map li.item.selected .detail-mag').css({ 'height': '100%' }); $('.radiolist-map li.item.selected .detail-mag').css({ 'top': '150px' }); $('.radiolist-map li.item.selected .detail-mag').css({ 'padding-bottom': '150px' }); $('.radiolist-map li.item.selected .detail-mag').css({ 'position': 'fixed' }); $('.radiolist-map li.item.selected .detail-mag').css({ 'background-color': '#fff' }); if ($("#IconListerPCL").is(':visible')) { $("#IconListerPCL").hide(); if (document.getElementById("tawkchat-container")) { document.getElementById("tawkchat-container").style["bottom"] = "0px"; document.getElementById("tawkchat-container").style["right"] = "0px"; } } return false; }); $('.map-bloc .radiolist-map.mobile li ul li.more-details').click(function () { $('.radiolist-map.mobile.liste').removeClass('liste').addClass('mettre-liste'); $(this).css({ "display": "none" }); var listMag = $('.radiolist-map.mobile li.item'); var labelMag = $(this).closest('label'); labelMag.addClass("open"); $('.mobile label.open').closest('li').addClass('selected'); var imgTag = $("#ListPclMobile > li.item.selected > div > div > div > img"); var imgURL = "https://www.mondialrelay.fr/ww2/img/dynamique/pr.aspx?id=" + imgTag.attr("id"); imgTag.attr('src', imgURL); $(".map-bloc.mobile .result").css({ "display": "none" }); $(".radiolist-map.mobile.scroll-box").css({ 'height': '562px' }); $('.mobile .back').css({ 'display': 'block' }); $('.mobile label.open').closest('li.item').addClass("move"); $('.radiolist-map.mobile li.item.selected .detail-mag').css({ 'display': 'block' }); if ($("#IconListerPCL").is(':visible')) { $("#IconListerPCL").hide(); if (document.getElementById("tawkchat-container")) { document.getElementById("tawkchat-container").style["bottom"] = "0px"; document.getElementById("tawkchat-container").style["right"] = "0px"; } } return false; }); $('.map-bloc .radiolist-map.mobile li label.LabelInfoPointRelais').click(function () { $('.radiolist-map.mobile.liste').removeClass('liste').addClass('mettre-liste'); $(this).css({ "display": "none" }); var listMag = $('.radiolist-map.mobile li.item'); var labelMag = $(this).closest('label'); labelMag.addClass("open"); $('.mobile label.open').closest('li').addClass('selected'); var imgTag = $("#ListPclMobile > li.item.selected > div > div > div > img"); var imgURL = "https://www.mondialrelay.fr/ww2/img/dynamique/pr.aspx?id=" + imgTag.attr("id"); imgTag.attr('src', imgURL); $(".map-bloc.mobile .result").css({ "display": "none" }); $(".radiolist-map.mobile.scroll-box").css({ 'height': '562px' }); $('.mobile .back').css({ 'display': 'block' }); $('.mobile label.open').closest('li.item').addClass("move"); $('.radiolist-map.mobile li.item.selected .detail-mag').css({ 'display': 'block' }); if ($("#IconListerPCL").is(':visible')) { $("#IconListerPCL").hide(); if (document.getElementById("tawkchat-container")) { document.getElementById("tawkchat-container").style["bottom"] = "0px"; document.getElementById("tawkchat-container").style["right"] = "0px"; } } return false; }); $(".close-detail").click(function () { $('.radiolist-map li.item .detail-mag').slideUp(); $('.back').css({ 'display': 'none' }); $('.radiolist-map.mobile li.item.move').removeClass("move"); var listMag = $('.radiolist-map li.item'); var labelMag = $('label'); listMag.removeClass('selected'); labelMag.removeClass("open"); listMag.css({ 'display': 'block' }); $(".map-bloc .result").css({ "display": "block" }); $('.radiolist-map li ul li.details').css({ "display": "block" }); $(".radiolist-map.scroll-box").css({ 'height': '562px' }); return false; }); $(".close-detail-mobile").click(function () { $('.radiolist-map.mobile.mettre-liste').addClass('liste').removeClass('mettre-liste'); $('.radiolist-map.mobile .detail-mag').hide(); $('.radiolist-map li.item .detail-mag').slideUp(); $('.back').css({ 'display': 'none' }); var listMagMob = $('.radiolist-map.mobile li.item'); var labelMag = $('label'); listMagMob.removeClass('selected'); listMagMob.removeClass('move'); labelMag.removeClass("open"); $('.radiolist-map li ul li.more-details').css({ "display": "block" }); $("html").css("overflow", "auto"); if (!$("#IconListerPCL").is(':visible')) { $("#IconListerPCL").show(); if (document.getElementById("tawkchat-container")) { document.getElementById("tawkchat-container").style["bottom"] = "60px"; document.getElementById("tawkchat-container").style["right"] = "-7px"; } } if ($("#IconListerPCL").hasClass('mb150')) { $("#IconListerPCL").removeClass('mb150'); } return false; }); // OUVRIR FERMER LES FILTRES DE LA CARTE $('.filtre-search .filters').css({ "display": "none" }); $(".open-filters a, .open-filters").click(function () { $(".filtre-search .filters .close-filters").css({ "display": "block" }); $('.filtre-search .filters').slideDown(); $('.radiolist-map.mobile li.item.move').toggleClass("move").addClass("stanby");; return false; }); $(".filtre-search .filters .close-filters").click(function () { $('.filtre-search .filters').slideUp(); $(".open-filters a, .open-filters").css({ "display": "block" }); $('.radiolist-map.mobile li.item.stanby').toggleClass("move").removeClass("stanby"); return false; }); //APPARITIONS DE BLOCS AU CLICK RADIO BOUTON //$('.tab-body .tab-body-content').hide(); var input = $(".choice-group input:checked"); if (input.length > 0) { for (let i = 0; i < input.length; i++) { var tab = $(input[i]).next('.choice-group label').data('tab'); var choicegroup = $(input[i]).closest('.choice-group'); choicegroup.next('.tab-body').find('.tab-body-content[data-tabcontent=' + tab + ']').show(); } } $('.choice-group div').click(function () { var choicegroup = $(this).closest(".choice-group"); choicegroup.next('.tab-body').find('.tab-body-content').hide(); var tab = $(this).data('tab'); choicegroup.next('.tab-body').find('.tab-body-content[data-tabcontent=' + tab + ']').show(); }); $('.choice-group div').click(function () { $('.tab-body-content').hide(); $('.' + $(this).data('for')).show(); $('.tab-body-content').css('display', 'none'); var input = $(".choice-group input:checked"); if (input.length > 0) { for (let i = 0; i < input.length; i++) { var tab = $(input[i]).next('.choice-group label').data('tab'); var choicegroup = $(input[i]).closest('.choice-group'); choicegroup.next('.tab-body').find('.tab-body-content[data-tabcontent=' + tab + ']').show(); } } //if (typeof ($('.recap')[0]) !== 'undefined') { // if ($('#CreerEnvoi_ModeLivraison').hasClass("hide")) { // //$('.recap').followTo($('.payplus').position().top - 240 - $("#RecapColis").height()); // $('.recap').followTo($('#CreerEnvoi_Colis').position().top - 285 - $("#RecapColis").height()); // } // else { // //$('.recap').followTo($('#CreerEnvoi_ModeLivraison').position().top - 635 - $("#RecapColis").height()); // $('.recap').followTo($('#CreerEnvoi_ModeLivraison').position().top - 300 - $("#RecapColis").height()); // } //} }); //ONGLETS (function ($) { $('.tab ul.tabs').addClass('active').find('> li:eq(0)').addClass('current'); $('.tab ul.tabs li a').click(function (g) { var tab = $(this).closest('.tab'), index = $(this).closest('li').index(); tab.find('ul.tabs > li').removeClass('current'); $(this).closest('li').addClass('current'); tab.find('.tab_content').find('div.tabs_item').not('div.tabs_item:eq(' + index + ')').slideUp(); tab.find('.tab_content').find('div.tabs_item:eq(' + index + ')').slideDown(); if (!tab.find('.tab_content').hasClass('noPreventDefault')) { g.preventDefault(); } }); })(jQuery); function showInternalPage() { if (window.location.href.indexOf("#") > 0 && window.location.href.length > window.location.href.indexOf("#") + 1) { var url = window.location.href; var idEl = url.substr(url.indexOf('#')); $(idEl).click(); } } //OUVRIR FERMER SUBMENU SOLUTIONS if ($(window).width() < 768) { $(function () { var wrapper = $(".tab"), toggle = $(".toggle"), span = $(".toggle span"), nav = $(".side-nav"); toggle.on("click", function () { wrapper.toggleClass("nav-open"); $(".side-nav").slideToggle(); // Change the font-awesome icons on click. span.toggleClass("icon-circle-down"); span.toggleClass("icon-circle-up"); }); $(window).on("click", function (e) { if (wrapper.hasClass("nav-open") && !$(e.target).hasClass("toggle")) { wrapper.removeClass("nav-open"); span.toggleClass("icon-circle-down"); span.toggleClass("icon-circle-up"); $(".side-nav").slideToggle(); } }); }); } else { $(function () { var wrapper = $(".tab"), toggle = $(".toggle"), span = $(".toggle span"), nav = $(".side-nav"); span.hide(); toggle.on("click", function () { $(".side-nav").slideDown(); // Change the font-awesome icons on click. span.hide(); }); $(window).on("click", function (e) { if (wrapper.hasClass("nav-open") && !$(e.target).hasClass("toggle")) { wrapper.removeClass("nav-open"); span.hide(); $(".side-nav").slideDown(); } }); }); } //SCROLL TO ID $('a.scrollto').bind('click', function (event) { var $anchor = $(this); $('html, body').stop().animate({ scrollTop: ($($anchor.attr('href')).offset().top - 500) }, 1250, 'easeInOutExpo'); event.preventDefault(); }); //POSITIONNEMENT DE L'ENCART DE RECAPITULATIF ENVOI var windw = this; $.fn.followTo = function (pos) { var $this = this, $window = $(windw); $window.scroll(function (e) { if ($window.scrollTop() > pos) { $this.css({ position: 'absolute', top: pos }); } else { $this.css({ position: 'fixed', top: $('#CreerEnvoi_Colis').position().top }); } }); }; //if (typeof ($('.recap')[0]) !== 'undefined') { // $('.recap').followTo($('#CreerEnvoi_Colis').position().top - 240 - $("#RecapColis").height()); //} }); //OUVRIR OU FERMER LA LISTE DES PAYS function callCountries() { $("a.list-countries").toggleClass("active"); $("#countries").toggleClass("active"); if (!document.getElementById("fade-countries")) { $('body').append('
'); $('.fade-countries').css({ 'filter': 'alpha(opacity=80)' }).fadeIn(); } $("a.callconex , #encartconnect").removeClass("active"); $('.fade-connect').remove(); $("a.list-basket, #basket").removeClass("active"); $('.fade-basket').remove(); $('.fade-countries').click(function () { $('#countries').toggleClass("active"); $("a.list-countries").toggleClass("active"); $('.fade-countries').remove(); }); } //OUVRIR OU FERMER L'ENCART DE CONNEXION function callConnexion() { $("a.callconex").toggleClass("active"); $("#encartconnect").toggleClass("active"); if (!document.getElementById("fade-connect")) { $('body').append('
'); $('.fade-connect').css({ 'filter': 'alpha(opacity=80)' }).fadeIn(); } $("a.list-basket, #basket").removeClass("active"); $('.fade-basket').remove(); $("a.list-countries , #countries").removeClass("active"); $('.fade-countries').remove(); $('.fade-connect').click(function () { $('#encartconnect').toggleClass("active"); $("a.callconex").toggleClass("active"); $('.fade-connect').remove(); }); } //OUVRIR OU FERMER L'ENCART PANIER function callBasket() { $("a.list-basket").toggleClass("active"); $("#basket").toggleClass("active"); if (!document.getElementById("fade-basket")) { $('body').append('
'); $('.fade-basket').css({ 'filter': 'alpha(opacity=80)' }).fadeIn(); } $("a.callconex , #encartconnect").removeClass("active"); $('.fade-connect').remove(); $("a.list-countries , #countries").removeClass("active"); $('.fade-countries').remove(); $('.fade-basket').click(function () { $('#basket').toggleClass("active"); $("a.list-basket").toggleClass("active"); $('.fade-basket').remove(); }); } //MENU MOBILE const header = $('#headerGeneral'); function showMenuScrollResponsive() { //$('header').css("z-index", 9999); //$('body').append('
'); //console.log("test open") //header.css('padding-top', '75px'); } function closeMenuScrollResponsive() { //$('header').removeAttr("z-index"); //$('#fade-menu').remove(); //header.css('padding-top', '0px') //console.log("test close") } $(document).ready(function () { onMobile(function () { $(".leaflet-control-attribution").css("margin-bottom", "45px"); }); var mobilebtn = $('#mobile-btn'); mobilebtn.click(function () { var menuHeight = 0; var menu = $('.menu'); if (!menu.hasClass('open-menu')) { $('.navigation > li').each(function () { menuHeight += $(this).innerHeight(); }); $('#identify ul li:last-child').removeClass('open'); $('body').css({ overflow: 'hidden', position: 'relative', height: '100%' }); // $('html').css({ // overflow: 'hidden', // position: 'relative', // height: '100%' // }); stopBodyScrolling(true); $('header').addClass("fullencartmobile connexion center active mobh425"); $('#menuMobile').addClass("mobh320"); //$('#menuMobile').show(); $('#menuMobileOpacity').show(); $('header').removeAttr('style'); } else { $('header').removeClass("fullencartmobile connexion center mobh425"); $('body').removeAttr('style'); $('body').removeAttr('data-pos'); //$('html').removeAttr('style'); stopBodyScrolling(false); $('#menuMobile').removeClass("mobh320"); //$('#menuMobile').css('display', 'none!important'); $('#menuMobileOpacity').css("display", "none"); if ($('header').hasClass('small-nav')) { // $('header').css("top", "0px"); } else { $('header').css("top", "-200px"); } } menu.css({ height: menuHeight }).toggleClass('open-menu'); mobilebtn.toggleClass('active'); $('#identify ul li:last-child').toggleClass('open'); }); $('#fade-menu').live('click', function () { closeMenuScrollResponsive(); $("#mobile-btn").trigger("click"); }); $('#menuMobileOpacity').live('click', function () { closeMenuScrollResponsive(); $("#mobile-btn").trigger("click"); }); }); var freezeVp = function (e) { e.preventDefault(); }; function stopBodyScrolling(bool) { if (bool === true) { document.body.addEventListener("touchmove", freezeVp, false); } else { document.body.removeEventListener("touchmove", freezeVp, false); } } //OUVRIR OU FERMER L'ENCART DE MOBILE function callConnexionMobile() { var menuHeight = 0; $("a.callconex").toggleClass("active"); $("#encartconnectmobile").toggleClass("active"); $("a.list-basket, #basket").removeClass("active"); $('.fade-basket').remove(); $('.menu').css({ height: menuHeight }).toggleClass('open-menu'); $('#mobile-btn').toggleClass('active'); $('.fade-connect').click(function () { $('#encartconnectmobile').toggleClass("active"); $("a.callconex").toggleClass("active"); $('.fade-connect').remove(); }); } function closeconnectMobile() { $('#encartconnectmobile').toggleClass("active"); $("a.callconex").toggleClass("active"); $('.fade-connect').remove(); } function onMobile(callback) { var maxWidthMobile = 991; if ($(window).width() <= maxWidthMobile) { callback(); } else { return; } } function onDesktop(callback) { var maxWidthMobile = 991; if ($(window).width() > maxWidthMobile) { callback(); } else { return; } } //OUVRIR FERMER UN ENCART PLEINE PAGE MOBILE function callPopinMobile() { $("a.callpopmobile").toggleClass("active"); $(".fullencartmobile").toggleClass("active"); $("html").css("overflow", "hidden"); if (document.getElementById("tawkchat-container")) { document.getElementById("tawkchat-container").style["bottom"] = "60px"; document.getElementById("tawkchat-container").style["right"] = "-7px"; } } function closePopinMobile() { $('.fullencartmobile').toggleClass("active"); $("a.callpopmobile").toggleClass("active"); $("html").css("overflow", "auto"); if (document.getElementById("tawkchat-container")) { document.getElementById("tawkchat-container").style["bottom"] = "0px"; document.getElementById("tawkchat-container").style["right"] = "0px"; } } //MENU GENERAL $(document).ready(function () { var nav = $('header'); $(window).scroll(function () { if ($(this).scrollTop() >= 350) { //nav.addClass("small-nav"); //$(".small-nav").css({ "top": "0px" }); //$(".new #cookie-bar").css({ "position": "fixed", "top": "0" }); $("#btnFindPCL").addClass("fixbtn"); $("#btnFindPCL").removeClass("mb30"); // $(".container").addClass('movepage'); if (!$("div#fade-menu").length && $('.menu').hasClass('open-menu')) { showMenuScrollResponsive(); } } else { //$(".small-nav").css({ "top": "-200px" }); //$(".new #cookie-bar").css({ "position": "relative", "top": "auto" }); //nav.removeClass("small-nav"); $("#btnFindPCL").removeClass("fixbtn"); $("#btnFindPCL").addClass("mb30"); // $(".container").removeClass('movepage'); } }); $('body').on({ 'touchmove': function (e) { //console.log($(this).scrollTop()); if ($(this).scrollTop() >= 350) { // nav.addClass("small-nav"); //$(".small-nav").css({ "top": "0px" }); //$(".new #cookie-bar").css({ "position": "fixed", "top": "0" }); $("#btnFindPCL").addClass("fixbtn"); $("#btnFindPCL").removeClass("mb30"); // $(".internal-page").addClass('movepage'); if (!$("div#fade-menu").length && $('.menu').hasClass('open-menu')) { showMenuScrollResponsive(); } } else { //$(".small-nav").css({ "top": "-200px" }); //nav.removeClass("small-nav"); //$(".new #cookie-bar").css({ "position": "relative", "top": "auto" }); $("#btnFindPCL").removeClass("fixbtn"); $("#btnFindPCL").addClass("mb30"); // $(".container").removeClass('movepage'); } } }); }); //CAROUSEL $(document).ready(function () { if (typeof ($('.owl-carousel')[0]) !== 'undefined') { $('.owl-carousel').owlCarousel({ navigation: false, singleItem: true, autoPlay: true, stopOnHover: true }); } }); //NAVIGATION VERTICALE A DROITE $(document).ready(function () { $('.anchor-bullet-container a').on('click', function (e) { e.preventDefault(); var target = $(this).attr('href'); $("html, body").animate({ scrollTop: ($(target).offset().top - 100) }, 1250, "easeInOutExpo"); }); function getCurrent() { }; var topMenu = $(".anchor-bullet-container"), topMenuHeight = topMenu.outerHeight(), menuItems = topMenu.find("a"), scrollItems = menuItems.map(function () { var item = $($(this).attr("href")); if (item.length) { return item; } }); $(window).scroll(function () { var fromTop = $(this).scrollTop() + topMenuHeight; var cur = scrollItems.map(function () { if ($(this).offset().top < fromTop) return this; }); cur = cur[cur.length - 1]; var id = cur && cur.length ? cur[0].id : ""; menuItems.removeClass("active").filter("[href=#" + id + "]").addClass("active"); }); $('span').each(function () { $(this).html($(this).html().replace(/ /gi, '')); }); }); //FERMER BARRE DE COOKIES function acceptAlert() { $("#phishing-bar").css({ "bottom": "-200px", "opacity": "0" }); $.cookie("phishing-bar-accept", 1, { expires: 14, path: '/' }); } /*****************************************************/ $(document).ready(function () { $('#Destinataire_Email').on('input', function (e) { var labelText = $('label[for="Destinataire_Mobile"]').text(); if ($(this).val().length > 0) { labelText.replace('*', ''); $('label[for="Destinataire_Mobile"]').text(labelText.replace('*', '')); $('#Destinataire_Mobile').removeClass('input-required input-validation-error'); } else { if ($('label[for="Destinataire_Mobile"]').text().indexOf("*") == -1) $('label[for="Destinataire_Mobile"]').text(labelText + '*'); $('#Destinataire_Mobile').addClass('input-required input-validation-error'); } }); $('#Destinataire_Mobile').on('input', function (e) { var labelText = $('label[for="Destinataire_Email"]').text(); if ($(this).val().length > 0) { labelText.replace('*', ''); $('label[for="Destinataire_Email"]').text(labelText.replace('*', '')); $('#Destinataire_Email').removeClass('input-required input-validation-error'); } else { if ($('label[for="Destinataire_Email"]').text().indexOf("*") == -1) $('label[for="Destinataire_Email"]').text(labelText + '*'); $('#Destinataire_Email').addClass('input-required input-validation-error'); } }); }); function openTab(tab) { $(tab).next().toggleClass("hide"); $(tab).find(".statut-import").toggleClass("up"); $(tab).find(".statut-import").toggleClass("down"); } const mobileScreenMaxWidth = 425; const tabletScreenMaxWidth = 800; class CarouselNavigator { constructor(carousel) { this.carousel = carousel; this.currentIndex = 0; this.dotsContainer = document.createElement("div"); this.dotsContainer.classList.add("navigator__container"); this.createDots(); this.carousel.root.appendChild(this.dotsContainer); this.addEventListeners(); } createDots() { this.dots = []; for (let i = 0; i < this.carousel.items.length; i++) { const dot = document.createElement("div"); dot.classList.add("navigator__dot"); dot.dataset.index = i; this.dots.push(dot); this.dotsContainer.appendChild(dot); } this.updateDots(); } addEventListeners() { this.dots.forEach((dot) => { dot.addEventListener("click", (event) => { const index = parseInt(event.target.dataset.index); this.goToIndex(index); }); }); } goToIndex(index) { if (this.currentIndex === index) return; this.currentIndex = index; const scrollAmount = this.carousel.items[index].offsetLeft - this.carousel.container.offsetLeft; if (!this.carousel.isAnimating) { this.scrollCarousel(scrollAmount); } this.updateDots(); } scrollCarousel(amount) { this.carousel.isAnimating = true; this.carousel.container.scrollTo({ left: amount, behavior: "smooth", }); // Unlock after the animation end setTimeout(() => { this.carousel.isAnimating = false; }, 400); } updateDots() { this.dots.forEach((dot, index) => { if (index === this.currentIndex) { dot.classList.add("navigator__dot--selected"); } else { dot.classList.remove("navigator__dot--selected"); } }); } } class Carousel { constructor(element, options = {}) { this.setUpCarousel(element, options); this.navigator = new CarouselNavigator(this); this.isAnimating = false; } setUpCarousel(element, options) { this.options = Object.assign({}, options); this.root = element; const children = Array.prototype.slice.call(element.children, 0); this.container = DOMUtils.createDivWithClass("carousel__container"); this.root.appendChild(this.container); this.items = children.map((child) => { const item = DOMUtils.createDivWithClass("customCarousel__item"); item.appendChild(child); return item; }); this.itemsVisible = 2; this.items.forEach((item) => this.container.appendChild(item)); this.setItemsStyle(); window.addEventListener("resize", this.setItemsStyle.bind(this)); this.container.addEventListener("scroll", this.handleScroll.bind(this)); } handleScroll() { const scrollLeft = this.container.scrollLeft; const index = Math.round(scrollLeft / this.itemWidth); if (this.navigator) { this.navigator.goToIndex(index); } } setItemsStyle() { if (DOMUtils.getDeviceWidth() > tabletScreenMaxWidth) { this.itemsVisible = this.getItemsVisibleFromClass("carousel--desktop") || 6; } else if (DOMUtils.getDeviceWidth() > mobileScreenMaxWidth) { this.itemsVisible = this.getItemsVisibleFromClass("carousel--tablet") || 2; } else { this.itemsVisible = this.getItemsVisibleFromClass("carousel--mobile") || 1; } //this.itemWidth = (DOMUtils.getDeviceWidth() / this.itemsVisible) * 0.8; this.itemWidth = 230; this.items.forEach((item) => (item.style.minWidth = this.itemWidth + "px")); } getItemsVisibleFromClass(prefix) { const classList = Array.from(this.root.classList); for (let className of classList) { const match = className.match(new RegExp(`^${prefix}-(\\d+)$`)) if (!match) continue return parseInt(match[1], 10) } return null } } document.addEventListener("DOMContentLoaded", function () { const carousels = document.querySelectorAll(".bloc-slider-list-hp, .bloc-slider-list"); carousels.forEach((carousel) => { new Carousel(carousel); }); }); class DOMUtils { static createDivWithClass(className) { const div = document.createElement("div"); div.setAttribute("class", className); return div; } static getDeviceWidth() { return window.innerWidth; } } /* * jQuery OwlCarousel v1.3.2 * * Copyright (c) 2013 Bartosz Wojciechowski * http://www.owlgraphic.com/owlcarousel/ * * Licensed under MIT * */ /*JS Lint helpers: */ /*global dragMove: false, dragEnd: false, $, jQuery, alert, window, document */ /*jslint nomen: true, continue:true */ if (typeof Object.create !== "function") { Object.create = function (obj) { function F() {} F.prototype = obj; return new F(); }; } (function ($, window, document) { var Carousel = { init : function (options, el) { var base = this; base.$elem = $(el); base.options = $.extend({}, $.fn.owlCarousel.options, base.$elem.data(), options); base.userOptions = options; base.loadContent(); }, loadContent : function () { var base = this, url; function getData(data) { var i, content = ""; if (typeof base.options.jsonSuccess === "function") { base.options.jsonSuccess.apply(this, [data]); } else { for (i in data.owl) { if (data.owl.hasOwnProperty(i)) { content += data.owl[i].item; } } base.$elem.html(content); } base.logIn(); } if (typeof base.options.beforeInit === "function") { base.options.beforeInit.apply(this, [base.$elem]); } if (typeof base.options.jsonPath === "string") { url = base.options.jsonPath; $.getJSON(url, getData); } else { base.logIn(); } }, logIn : function () { var base = this; base.$elem.data("owl-originalStyles", base.$elem.attr("style")) .data("owl-originalClasses", base.$elem.attr("class")); base.$elem.css({opacity: 0}); base.orignalItems = base.options.items; base.checkBrowser(); base.wrapperWidth = 0; base.checkVisible = null; base.setVars(); }, setVars : function () { var base = this; if (base.$elem.children().length === 0) {return false; } base.baseClass(); base.eventTypes(); base.$userItems = base.$elem.children(); base.itemsAmount = base.$userItems.length; base.wrapItems(); base.$owlItems = base.$elem.find(".owl-item"); base.$owlWrapper = base.$elem.find(".owl-wrapper"); base.playDirection = "next"; base.prevItem = 0; base.prevArr = [0]; base.currentItem = 0; base.customEvents(); base.onStartup(); }, onStartup : function () { var base = this; base.updateItems(); base.calculateAll(); base.buildControls(); base.updateControls(); base.response(); base.moveEvents(); base.stopOnHover(); base.owlStatus(); if (base.options.transitionStyle !== false) { base.transitionTypes(base.options.transitionStyle); } if (base.options.autoPlay === true) { base.options.autoPlay = 5000; } base.play(); base.$elem.find(".owl-wrapper").css("display", "block"); if (!base.$elem.is(":visible")) { base.watchVisibility(); } else { base.$elem.css("opacity", 1); } base.onstartup = false; base.eachMoveUpdate(); if (typeof base.options.afterInit === "function") { base.options.afterInit.apply(this, [base.$elem]); } }, eachMoveUpdate : function () { var base = this; if (base.options.lazyLoad === true) { base.lazyLoad(); } if (base.options.autoHeight === true) { base.autoHeight(); } base.onVisibleItems(); if (typeof base.options.afterAction === "function") { base.options.afterAction.apply(this, [base.$elem]); } }, updateVars : function () { var base = this; if (typeof base.options.beforeUpdate === "function") { base.options.beforeUpdate.apply(this, [base.$elem]); } base.watchVisibility(); base.updateItems(); base.calculateAll(); base.updatePosition(); base.updateControls(); base.eachMoveUpdate(); if (typeof base.options.afterUpdate === "function") { base.options.afterUpdate.apply(this, [base.$elem]); } }, reload : function () { var base = this; window.setTimeout(function () { base.updateVars(); }, 0); }, watchVisibility : function () { var base = this; if (base.$elem.is(":visible") === false) { base.$elem.css({opacity: 0}); window.clearInterval(base.autoPlayInterval); window.clearInterval(base.checkVisible); } else { return false; } base.checkVisible = window.setInterval(function () { if (base.$elem.is(":visible")) { base.reload(); base.$elem.animate({opacity: 1}, 200); window.clearInterval(base.checkVisible); } }, 500); }, wrapItems : function () { var base = this; base.$userItems.wrapAll("
").wrap("
"); base.$elem.find(".owl-wrapper").wrap("
"); base.wrapperOuter = base.$elem.find(".owl-wrapper-outer"); base.$elem.css("display", "block"); }, baseClass : function () { var base = this, hasBaseClass = base.$elem.hasClass(base.options.baseClass), hasThemeClass = base.$elem.hasClass(base.options.theme); if (!hasBaseClass) { base.$elem.addClass(base.options.baseClass); } if (!hasThemeClass) { base.$elem.addClass(base.options.theme); } }, updateItems : function () { var base = this, width, i; if (base.options.responsive === false) { return false; } if (base.options.singleItem === true) { base.options.items = base.orignalItems = 1; base.options.itemsCustom = false; base.options.itemsDesktop = false; base.options.itemsDesktopSmall = false; base.options.itemsTablet = false; base.options.itemsTabletSmall = false; base.options.itemsMobile = false; return false; } width = $(base.options.responsiveBaseWidth).width(); if (width > (base.options.itemsDesktop[0] || base.orignalItems)) { base.options.items = base.orignalItems; } if (base.options.itemsCustom !== false) { //Reorder array by screen size base.options.itemsCustom.sort(function (a, b) {return a[0] - b[0]; }); for (i = 0; i < base.options.itemsCustom.length; i += 1) { if (base.options.itemsCustom[i][0] <= width) { base.options.items = base.options.itemsCustom[i][1]; } } } else { if (width <= base.options.itemsDesktop[0] && base.options.itemsDesktop !== false) { base.options.items = base.options.itemsDesktop[1]; } if (width <= base.options.itemsDesktopSmall[0] && base.options.itemsDesktopSmall !== false) { base.options.items = base.options.itemsDesktopSmall[1]; } if (width <= base.options.itemsTablet[0] && base.options.itemsTablet !== false) { base.options.items = base.options.itemsTablet[1]; } if (width <= base.options.itemsTabletSmall[0] && base.options.itemsTabletSmall !== false) { base.options.items = base.options.itemsTabletSmall[1]; } if (width <= base.options.itemsMobile[0] && base.options.itemsMobile !== false) { base.options.items = base.options.itemsMobile[1]; } } //if number of items is less than declared if (base.options.items > base.itemsAmount && base.options.itemsScaleUp === true) { base.options.items = base.itemsAmount; } }, response : function () { var base = this, smallDelay, lastWindowWidth; if (base.options.responsive !== true) { return false; } lastWindowWidth = $(window).width(); base.resizer = function () { if ($(window).width() !== lastWindowWidth) { if (base.options.autoPlay !== false) { window.clearInterval(base.autoPlayInterval); } window.clearTimeout(smallDelay); smallDelay = window.setTimeout(function () { lastWindowWidth = $(window).width(); base.updateVars(); }, base.options.responsiveRefreshRate); } }; $(window).resize(base.resizer); }, updatePosition : function () { var base = this; base.jumpTo(base.currentItem); if (base.options.autoPlay !== false) { base.checkAp(); } }, appendItemsSizes : function () { var base = this, roundPages = 0, lastItem = base.itemsAmount - base.options.items; base.$owlItems.each(function (index) { var $this = $(this); $this .css({"width": base.itemWidth}) .data("owl-item", Number(index)); if (index % base.options.items === 0 || index === lastItem) { if (!(index > lastItem)) { roundPages += 1; } } $this.data("owl-roundPages", roundPages); }); }, appendWrapperSizes : function () { var base = this, width = base.$owlItems.length * base.itemWidth; base.$owlWrapper.css({ "width": width * 2, "left": 0 }); base.appendItemsSizes(); }, calculateAll : function () { var base = this; base.calculateWidth(); base.appendWrapperSizes(); base.loops(); base.max(); }, calculateWidth : function () { var base = this; base.itemWidth = Math.round(base.$elem.width() / base.options.items); }, max : function () { var base = this, maximum = ((base.itemsAmount * base.itemWidth) - base.options.items * base.itemWidth) * -1; if (base.options.items > base.itemsAmount) { base.maximumItem = 0; maximum = 0; base.maximumPixels = 0; } else { base.maximumItem = base.itemsAmount - base.options.items; base.maximumPixels = maximum; } return maximum; }, min : function () { return 0; }, loops : function () { var base = this, prev = 0, elWidth = 0, i, item, roundPageNum; base.positionsInArray = [0]; base.pagesInArray = []; for (i = 0; i < base.itemsAmount; i += 1) { elWidth += base.itemWidth; base.positionsInArray.push(-elWidth); if (base.options.scrollPerPage === true) { item = $(base.$owlItems[i]); roundPageNum = item.data("owl-roundPages"); if (roundPageNum !== prev) { base.pagesInArray[prev] = base.positionsInArray[i]; prev = roundPageNum; } } } }, buildControls : function () { var base = this; if (base.options.navigation === true || base.options.pagination === true) { base.owlControls = $("
").toggleClass("clickable", !base.browser.isTouch).appendTo(base.$elem); } if (base.options.pagination === true) { base.buildPagination(); } if (base.options.navigation === true) { base.buildButtons(); } }, buildButtons : function () { var base = this, buttonsWrapper = $("
"); base.owlControls.append(buttonsWrapper); base.buttonPrev = $("
", { "class" : "owl-prev", "html" : base.options.navigationText[0] || "" }); base.buttonNext = $("
", { "class" : "owl-next", "html" : base.options.navigationText[1] || "" }); buttonsWrapper .append(base.buttonPrev) .append(base.buttonNext); buttonsWrapper.on("touchstart.owlControls mousedown.owlControls", "div[class^=\"owl\"]", function (event) { event.preventDefault(); }); buttonsWrapper.on("touchend.owlControls mouseup.owlControls", "div[class^=\"owl\"]", function (event) { event.preventDefault(); if ($(this).hasClass("owl-next")) { base.next(); } else { base.prev(); } }); }, buildPagination : function () { var base = this; base.paginationWrapper = $("
"); base.owlControls.append(base.paginationWrapper); base.paginationWrapper.on("touchend.owlControls mouseup.owlControls", ".owl-page", function (event) { event.preventDefault(); if (Number($(this).data("owl-page")) !== base.currentItem) { base.goTo(Number($(this).data("owl-page")), true); } }); }, updatePagination : function () { var base = this, counter, lastPage, lastItem, i, paginationButton, paginationButtonInner; if (base.options.pagination === false) { return false; } base.paginationWrapper.html(""); counter = 0; lastPage = base.itemsAmount - base.itemsAmount % base.options.items; for (i = 0; i < base.itemsAmount; i += 1) { if (i % base.options.items === 0) { counter += 1; if (lastPage === i) { lastItem = base.itemsAmount - base.options.items; } paginationButton = $("
", { "class" : "owl-page" }); paginationButtonInner = $("", { "text": base.options.paginationNumbers === true ? counter : "", "class": base.options.paginationNumbers === true ? "owl-numbers" : "" }); paginationButton.append(paginationButtonInner); paginationButton.data("owl-page", lastPage === i ? lastItem : i); paginationButton.data("owl-roundPages", counter); base.paginationWrapper.append(paginationButton); } } base.checkPagination(); }, checkPagination : function () { var base = this; if (base.options.pagination === false) { return false; } base.paginationWrapper.find(".owl-page").each(function () { if ($(this).data("owl-roundPages") === $(base.$owlItems[base.currentItem]).data("owl-roundPages")) { base.paginationWrapper .find(".owl-page") .removeClass("active"); $(this).addClass("active"); } }); }, checkNavigation : function () { var base = this; if (base.options.navigation === false) { return false; } if (base.options.rewindNav === false) { if (base.currentItem === 0 && base.maximumItem === 0) { base.buttonPrev.addClass("disabled"); base.buttonNext.addClass("disabled"); } else if (base.currentItem === 0 && base.maximumItem !== 0) { base.buttonPrev.addClass("disabled"); base.buttonNext.removeClass("disabled"); } else if (base.currentItem === base.maximumItem) { base.buttonPrev.removeClass("disabled"); base.buttonNext.addClass("disabled"); } else if (base.currentItem !== 0 && base.currentItem !== base.maximumItem) { base.buttonPrev.removeClass("disabled"); base.buttonNext.removeClass("disabled"); } } }, updateControls : function () { var base = this; base.updatePagination(); base.checkNavigation(); if (base.owlControls) { if (base.options.items >= base.itemsAmount) { base.owlControls.hide(); } else { base.owlControls.show(); } } }, destroyControls : function () { var base = this; if (base.owlControls) { base.owlControls.remove(); } }, next : function (speed) { var base = this; if (base.isTransition) { return false; } base.currentItem += base.options.scrollPerPage === true ? base.options.items : 1; if (base.currentItem > base.maximumItem + (base.options.scrollPerPage === true ? (base.options.items - 1) : 0)) { if (base.options.rewindNav === true) { base.currentItem = 0; speed = "rewind"; } else { base.currentItem = base.maximumItem; return false; } } base.goTo(base.currentItem, speed); }, prev : function (speed) { var base = this; if (base.isTransition) { return false; } if (base.options.scrollPerPage === true && base.currentItem > 0 && base.currentItem < base.options.items) { base.currentItem = 0; } else { base.currentItem -= base.options.scrollPerPage === true ? base.options.items : 1; } if (base.currentItem < 0) { if (base.options.rewindNav === true) { base.currentItem = base.maximumItem; speed = "rewind"; } else { base.currentItem = 0; return false; } } base.goTo(base.currentItem, speed); }, goTo : function (position, speed, drag) { var base = this, goToPixel; if (base.isTransition) { return false; } if (typeof base.options.beforeMove === "function") { base.options.beforeMove.apply(this, [base.$elem]); } if (position >= base.maximumItem) { position = base.maximumItem; } else if (position <= 0) { position = 0; } base.currentItem = base.owl.currentItem = position; if (base.options.transitionStyle !== false && drag !== "drag" && base.options.items === 1 && base.browser.support3d === true) { base.swapSpeed(0); if (base.browser.support3d === true) { base.transition3d(base.positionsInArray[position]); } else { base.css2slide(base.positionsInArray[position], 1); } base.afterGo(); base.singleItemTransition(); return false; } goToPixel = base.positionsInArray[position]; if (base.browser.support3d === true) { base.isCss3Finish = false; if (speed === true) { base.swapSpeed("paginationSpeed"); window.setTimeout(function () { base.isCss3Finish = true; }, base.options.paginationSpeed); } else if (speed === "rewind") { base.swapSpeed(base.options.rewindSpeed); window.setTimeout(function () { base.isCss3Finish = true; }, base.options.rewindSpeed); } else { base.swapSpeed("slideSpeed"); window.setTimeout(function () { base.isCss3Finish = true; }, base.options.slideSpeed); } base.transition3d(goToPixel); } else { if (speed === true) { base.css2slide(goToPixel, base.options.paginationSpeed); } else if (speed === "rewind") { base.css2slide(goToPixel, base.options.rewindSpeed); } else { base.css2slide(goToPixel, base.options.slideSpeed); } } base.afterGo(); }, jumpTo : function (position) { var base = this; if (typeof base.options.beforeMove === "function") { base.options.beforeMove.apply(this, [base.$elem]); } if (position >= base.maximumItem || position === -1) { position = base.maximumItem; } else if (position <= 0) { position = 0; } base.swapSpeed(0); if (base.browser.support3d === true) { base.transition3d(base.positionsInArray[position]); } else { base.css2slide(base.positionsInArray[position], 1); } base.currentItem = base.owl.currentItem = position; base.afterGo(); }, afterGo : function () { var base = this; base.prevArr.push(base.currentItem); base.prevItem = base.owl.prevItem = base.prevArr[base.prevArr.length - 2]; base.prevArr.shift(0); if (base.prevItem !== base.currentItem) { base.checkPagination(); base.checkNavigation(); base.eachMoveUpdate(); if (base.options.autoPlay !== false) { base.checkAp(); } } if (typeof base.options.afterMove === "function" && base.prevItem !== base.currentItem) { base.options.afterMove.apply(this, [base.$elem]); } }, stop : function () { var base = this; base.apStatus = "stop"; window.clearInterval(base.autoPlayInterval); }, checkAp : function () { var base = this; if (base.apStatus !== "stop") { base.play(); } }, play : function () { var base = this; base.apStatus = "play"; if (base.options.autoPlay === false) { return false; } window.clearInterval(base.autoPlayInterval); base.autoPlayInterval = window.setInterval(function () { base.next(true); }, base.options.autoPlay); }, swapSpeed : function (action) { var base = this; if (action === "slideSpeed") { base.$owlWrapper.css(base.addCssSpeed(base.options.slideSpeed)); } else if (action === "paginationSpeed") { base.$owlWrapper.css(base.addCssSpeed(base.options.paginationSpeed)); } else if (typeof action !== "string") { base.$owlWrapper.css(base.addCssSpeed(action)); } }, addCssSpeed : function (speed) { return { "-webkit-transition": "all " + speed + "ms ease", "-moz-transition": "all " + speed + "ms ease", "-o-transition": "all " + speed + "ms ease", "transition": "all " + speed + "ms ease" }; }, removeTransition : function () { return { "-webkit-transition": "", "-moz-transition": "", "-o-transition": "", "transition": "" }; }, doTranslate : function (pixels) { return { "-webkit-transform": "translate3d(" + pixels + "px, 0px, 0px)", "-moz-transform": "translate3d(" + pixels + "px, 0px, 0px)", "-o-transform": "translate3d(" + pixels + "px, 0px, 0px)", "-ms-transform": "translate3d(" + pixels + "px, 0px, 0px)", "transform": "translate3d(" + pixels + "px, 0px,0px)" }; }, transition3d : function (value) { var base = this; base.$owlWrapper.css(base.doTranslate(value)); }, css2move : function (value) { var base = this; base.$owlWrapper.css({"left" : value}); }, css2slide : function (value, speed) { var base = this; base.isCssFinish = false; base.$owlWrapper.stop(true, true).animate({ "left" : value }, { duration : speed || base.options.slideSpeed, complete : function () { base.isCssFinish = true; } }); }, checkBrowser : function () { var base = this, translate3D = "translate3d(0px, 0px, 0px)", tempElem = document.createElement("div"), regex, asSupport, support3d, isTouch; tempElem.style.cssText = " -moz-transform:" + translate3D + "; -ms-transform:" + translate3D + "; -o-transform:" + translate3D + "; -webkit-transform:" + translate3D + "; transform:" + translate3D; regex = /translate3d\(0px, 0px, 0px\)/g; asSupport = tempElem.style.cssText.match(regex); support3d = (asSupport !== null && asSupport.length === 1); isTouch = "ontouchstart" in window || window.navigator.msMaxTouchPoints; base.browser = { "support3d" : support3d, "isTouch" : isTouch }; }, moveEvents : function () { var base = this; if (base.options.mouseDrag !== false || base.options.touchDrag !== false) { base.gestures(); base.disabledEvents(); } }, eventTypes : function () { var base = this, types = ["s", "e", "x"]; base.ev_types = {}; if (base.options.mouseDrag === true && base.options.touchDrag === true) { types = [ "touchstart.owl mousedown.owl", "touchmove.owl mousemove.owl", "touchend.owl touchcancel.owl mouseup.owl" ]; } else if (base.options.mouseDrag === false && base.options.touchDrag === true) { types = [ "touchstart.owl", "touchmove.owl", "touchend.owl touchcancel.owl" ]; } else if (base.options.mouseDrag === true && base.options.touchDrag === false) { types = [ "mousedown.owl", "mousemove.owl", "mouseup.owl" ]; } base.ev_types.start = types[0]; base.ev_types.move = types[1]; base.ev_types.end = types[2]; }, disabledEvents : function () { var base = this; base.$elem.on("dragstart.owl", function (event) { event.preventDefault(); }); base.$elem.on("mousedown.disableTextSelect", function (e) { return $(e.target).is('input, textarea, select, option'); }); }, gestures : function () { /*jslint unparam: true*/ var base = this, locals = { offsetX : 0, offsetY : 0, baseElWidth : 0, relativePos : 0, position: null, minSwipe : null, maxSwipe: null, sliding : null, dargging: null, targetElement : null }; base.isCssFinish = true; function getTouches(event) { if (event.touches !== undefined) { return { x : event.touches[0].pageX, y : event.touches[0].pageY }; } if (event.touches === undefined) { if (event.pageX !== undefined) { return { x : event.pageX, y : event.pageY }; } if (event.pageX === undefined) { return { x : event.clientX, y : event.clientY }; } } } function swapEvents(type) { if (type === "on") { $(document).on(base.ev_types.move, dragMove); $(document).on(base.ev_types.end, dragEnd); } else if (type === "off") { $(document).off(base.ev_types.move); $(document).off(base.ev_types.end); } } function dragStart(event) { var ev = event.originalEvent || event || window.event, position; if (ev.which === 3) { return false; } if (base.itemsAmount <= base.options.items) { return; } if (base.isCssFinish === false && !base.options.dragBeforeAnimFinish) { return false; } if (base.isCss3Finish === false && !base.options.dragBeforeAnimFinish) { return false; } if (base.options.autoPlay !== false) { window.clearInterval(base.autoPlayInterval); } if (base.browser.isTouch !== true && !base.$owlWrapper.hasClass("grabbing")) { base.$owlWrapper.addClass("grabbing"); } base.newPosX = 0; base.newRelativeX = 0; $(this).css(base.removeTransition()); position = $(this).position(); locals.relativePos = position.left; locals.offsetX = getTouches(ev).x - position.left; locals.offsetY = getTouches(ev).y - position.top; swapEvents("on"); locals.sliding = false; locals.targetElement = ev.target || ev.srcElement; } function dragMove(event) { var ev = event.originalEvent || event || window.event, minSwipe, maxSwipe; base.newPosX = getTouches(ev).x - locals.offsetX; base.newPosY = getTouches(ev).y - locals.offsetY; base.newRelativeX = base.newPosX - locals.relativePos; if (typeof base.options.startDragging === "function" && locals.dragging !== true && base.newRelativeX !== 0) { locals.dragging = true; base.options.startDragging.apply(base, [base.$elem]); } if ((base.newRelativeX > 8 || base.newRelativeX < -8) && (base.browser.isTouch === true)) { if (ev.preventDefault !== undefined) { ev.preventDefault(); } else { ev.returnValue = false; } locals.sliding = true; } if ((base.newPosY > 10 || base.newPosY < -10) && locals.sliding === false) { $(document).off("touchmove.owl"); } minSwipe = function () { return base.newRelativeX / 5; }; maxSwipe = function () { return base.maximumPixels + base.newRelativeX / 5; }; base.newPosX = Math.max(Math.min(base.newPosX, minSwipe()), maxSwipe()); if (base.browser.support3d === true) { base.transition3d(base.newPosX); } else { base.css2move(base.newPosX); } } function dragEnd(event) { var ev = event.originalEvent || event || window.event, newPosition, handlers, owlStopEvent; ev.target = ev.target || ev.srcElement; locals.dragging = false; if (base.browser.isTouch !== true) { base.$owlWrapper.removeClass("grabbing"); } if (base.newRelativeX < 0) { base.dragDirection = base.owl.dragDirection = "left"; } else { base.dragDirection = base.owl.dragDirection = "right"; } if (base.newRelativeX !== 0) { newPosition = base.getNewPosition(); base.goTo(newPosition, false, "drag"); if (locals.targetElement === ev.target && base.browser.isTouch !== true) { $(ev.target).on("click.disable", function (ev) { ev.stopImmediatePropagation(); ev.stopPropagation(); ev.preventDefault(); $(ev.target).off("click.disable"); }); handlers = $._data(ev.target, "events").click; owlStopEvent = handlers.pop(); handlers.splice(0, 0, owlStopEvent); } } swapEvents("off"); } base.$elem.on(base.ev_types.start, ".owl-wrapper", dragStart); }, getNewPosition : function () { var base = this, newPosition = base.closestItem(); if (newPosition > base.maximumItem) { base.currentItem = base.maximumItem; newPosition = base.maximumItem; } else if (base.newPosX >= 0) { newPosition = 0; base.currentItem = 0; } return newPosition; }, closestItem : function () { var base = this, array = base.options.scrollPerPage === true ? base.pagesInArray : base.positionsInArray, goal = base.newPosX, closest = null; $.each(array, function (i, v) { if (goal - (base.itemWidth / 20) > array[i + 1] && goal - (base.itemWidth / 20) < v && base.moveDirection() === "left") { closest = v; if (base.options.scrollPerPage === true) { base.currentItem = $.inArray(closest, base.positionsInArray); } else { base.currentItem = i; } } else if (goal + (base.itemWidth / 20) < v && goal + (base.itemWidth / 20) > (array[i + 1] || array[i] - base.itemWidth) && base.moveDirection() === "right") { if (base.options.scrollPerPage === true) { closest = array[i + 1] || array[array.length - 1]; base.currentItem = $.inArray(closest, base.positionsInArray); } else { closest = array[i + 1]; base.currentItem = i + 1; } } }); return base.currentItem; }, moveDirection : function () { var base = this, direction; if (base.newRelativeX < 0) { direction = "right"; base.playDirection = "next"; } else { direction = "left"; base.playDirection = "prev"; } return direction; }, customEvents : function () { /*jslint unparam: true*/ var base = this; base.$elem.on("owl.next", function () { base.next(); }); base.$elem.on("owl.prev", function () { base.prev(); }); base.$elem.on("owl.play", function (event, speed) { base.options.autoPlay = speed; base.play(); base.hoverStatus = "play"; }); base.$elem.on("owl.stop", function () { base.stop(); base.hoverStatus = "stop"; }); base.$elem.on("owl.goTo", function (event, item) { base.goTo(item); }); base.$elem.on("owl.jumpTo", function (event, item) { base.jumpTo(item); }); }, stopOnHover : function () { var base = this; if (base.options.stopOnHover === true && base.browser.isTouch !== true && base.options.autoPlay !== false) { base.$elem.on("mouseover", function () { base.stop(); }); base.$elem.on("mouseout", function () { if (base.hoverStatus !== "stop") { base.play(); } }); } }, lazyLoad : function () { var base = this, i, $item, itemNumber, $lazyImg, follow; if (base.options.lazyLoad === false) { return false; } for (i = 0; i < base.itemsAmount; i += 1) { $item = $(base.$owlItems[i]); if ($item.data("owl-loaded") === "loaded") { continue; } itemNumber = $item.data("owl-item"); $lazyImg = $item.find(".lazyOwl"); if (typeof $lazyImg.data("src") !== "string") { $item.data("owl-loaded", "loaded"); continue; } if ($item.data("owl-loaded") === undefined) { $lazyImg.hide(); $item.addClass("loading").data("owl-loaded", "checked"); } if (base.options.lazyFollow === true) { follow = itemNumber >= base.currentItem; } else { follow = true; } if (follow && itemNumber < base.currentItem + base.options.items && $lazyImg.length) { base.lazyPreload($item, $lazyImg); } } }, lazyPreload : function ($item, $lazyImg) { var base = this, iterations = 0, isBackgroundImg; if ($lazyImg.prop("tagName") === "DIV") { $lazyImg.css("background-image", "url(" + $lazyImg.data("src") + ")"); isBackgroundImg = true; } else { $lazyImg[0].src = $lazyImg.data("src"); } function showImage() { $item.data("owl-loaded", "loaded").removeClass("loading"); $lazyImg.removeAttr("data-src"); if (base.options.lazyEffect === "fade") { $lazyImg.fadeIn(400); } else { $lazyImg.show(); } if (typeof base.options.afterLazyLoad === "function") { base.options.afterLazyLoad.apply(this, [base.$elem]); } } function checkLazyImage() { iterations += 1; if (base.completeImg($lazyImg.get(0)) || isBackgroundImg === true) { showImage(); } else if (iterations <= 100) {//if image loads in less than 10 seconds window.setTimeout(checkLazyImage, 100); } else { showImage(); } } checkLazyImage(); }, autoHeight : function () { var base = this, $currentimg = $(base.$owlItems[base.currentItem]).find("img"), iterations; function addHeight() { var $currentItem = $(base.$owlItems[base.currentItem]).height(); base.wrapperOuter.css("height", $currentItem + "px"); if (!base.wrapperOuter.hasClass("autoHeight")) { window.setTimeout(function () { base.wrapperOuter.addClass("autoHeight"); }, 0); } } function checkImage() { iterations += 1; if (base.completeImg($currentimg.get(0))) { addHeight(); } else if (iterations <= 100) { //if image loads in less than 10 seconds window.setTimeout(checkImage, 100); } else { base.wrapperOuter.css("height", ""); //Else remove height attribute } } if ($currentimg.get(0) !== undefined) { iterations = 0; checkImage(); } else { addHeight(); } }, completeImg : function (img) { var naturalWidthType; if (!img.complete) { return false; } naturalWidthType = typeof img.naturalWidth; if (naturalWidthType !== "undefined" && img.naturalWidth === 0) { return false; } return true; }, onVisibleItems : function () { var base = this, i; if (base.options.addClassActive === true) { base.$owlItems.removeClass("active"); } base.visibleItems = []; for (i = base.currentItem; i < base.currentItem + base.options.items; i += 1) { base.visibleItems.push(i); if (base.options.addClassActive === true) { $(base.$owlItems[i]).addClass("active"); } } base.owl.visibleItems = base.visibleItems; }, transitionTypes : function (className) { var base = this; //Currently available: "fade", "backSlide", "goDown", "fadeUp" base.outClass = "owl-" + className + "-out"; base.inClass = "owl-" + className + "-in"; }, singleItemTransition : function () { var base = this, outClass = base.outClass, inClass = base.inClass, $currentItem = base.$owlItems.eq(base.currentItem), $prevItem = base.$owlItems.eq(base.prevItem), prevPos = Math.abs(base.positionsInArray[base.currentItem]) + base.positionsInArray[base.prevItem], origin = Math.abs(base.positionsInArray[base.currentItem]) + base.itemWidth / 2, animEnd = 'webkitAnimationEnd oAnimationEnd MSAnimationEnd animationend'; base.isTransition = true; base.$owlWrapper .addClass('owl-origin') .css({ "-webkit-transform-origin" : origin + "px", "-moz-perspective-origin" : origin + "px", "perspective-origin" : origin + "px" }); function transStyles(prevPos) { return { "position" : "relative", "left" : prevPos + "px" }; } $prevItem .css(transStyles(prevPos, 10)) .addClass(outClass) .on(animEnd, function () { base.endPrev = true; $prevItem.off(animEnd); base.clearTransStyle($prevItem, outClass); }); $currentItem .addClass(inClass) .on(animEnd, function () { base.endCurrent = true; $currentItem.off(animEnd); base.clearTransStyle($currentItem, inClass); }); }, clearTransStyle : function (item, classToRemove) { var base = this; item.css({ "position" : "", "left" : "" }).removeClass(classToRemove); if (base.endPrev && base.endCurrent) { base.$owlWrapper.removeClass('owl-origin'); base.endPrev = false; base.endCurrent = false; base.isTransition = false; } }, owlStatus : function () { var base = this; base.owl = { "userOptions" : base.userOptions, "baseElement" : base.$elem, "userItems" : base.$userItems, "owlItems" : base.$owlItems, "currentItem" : base.currentItem, "prevItem" : base.prevItem, "visibleItems" : base.visibleItems, "isTouch" : base.browser.isTouch, "browser" : base.browser, "dragDirection" : base.dragDirection }; }, clearEvents : function () { var base = this; base.$elem.off(".owl owl mousedown.disableTextSelect"); $(document).off(".owl owl"); $(window).off("resize", base.resizer); }, unWrap : function () { var base = this; if (base.$elem.children().length !== 0) { base.$owlWrapper.unwrap(); base.$userItems.unwrap().unwrap(); if (base.owlControls) { base.owlControls.remove(); } } base.clearEvents(); base.$elem .attr("style", base.$elem.data("owl-originalStyles") || "") .attr("class", base.$elem.data("owl-originalClasses")); }, destroy : function () { var base = this; base.stop(); window.clearInterval(base.checkVisible); base.unWrap(); base.$elem.removeData(); }, reinit : function (newOptions) { var base = this, options = $.extend({}, base.userOptions, newOptions); base.unWrap(); base.init(options, base.$elem); }, addItem : function (htmlString, targetPosition) { var base = this, position; if (!htmlString) {return false; } if (base.$elem.children().length === 0) { base.$elem.append(htmlString); base.setVars(); return false; } base.unWrap(); if (targetPosition === undefined || targetPosition === -1) { position = -1; } else { position = targetPosition; } if (position >= base.$userItems.length || position === -1) { base.$userItems.eq(-1).after(htmlString); } else { base.$userItems.eq(position).before(htmlString); } base.setVars(); }, removeItem : function (targetPosition) { var base = this, position; if (base.$elem.children().length === 0) { return false; } if (targetPosition === undefined || targetPosition === -1) { position = -1; } else { position = targetPosition; } base.unWrap(); base.$userItems.eq(position).remove(); base.setVars(); } }; $.fn.owlCarousel = function (options) { return this.each(function () { if ($(this).data("owl-init") === true) { return false; } $(this).data("owl-init", true); var carousel = Object.create(Carousel); carousel.init(options, this); $.data(this, "owlCarousel", carousel); }); }; $.fn.owlCarousel.options = { items : 5, itemsCustom : false, itemsDesktop : [1199, 4], itemsDesktopSmall : [979, 3], itemsTablet : [768, 2], itemsTabletSmall : false, itemsMobile : [479, 1], singleItem : false, itemsScaleUp : false, slideSpeed : 200, paginationSpeed : 800, rewindSpeed : 1000, autoPlay : false, stopOnHover : false, navigation : false, navigationText : ["prev", "next"], rewindNav : true, scrollPerPage : false, pagination : true, paginationNumbers : false, responsive : true, responsiveRefreshRate : 200, responsiveBaseWidth : window, baseClass : "owl-carousel", theme : "owl-theme", lazyLoad : false, lazyFollow : true, lazyEffect : "fade", autoHeight : false, jsonPath : false, jsonSuccess : false, dragBeforeAnimFinish : true, mouseDrag : true, touchDrag : true, addClassActive : false, transitionStyle : false, beforeUpdate : false, afterUpdate : false, beforeInit : false, afterInit : false, beforeMove : false, afterMove : false, afterAction : false, startDragging : false, afterLazyLoad: false }; }(jQuery, window, document)); /* * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/ * * Uses the built in easing capabilities added In jQuery 1.1 * to offer multiple easing options * * TERMS OF USE - EASING EQUATIONS * * Open source under the BSD License. * * Copyright © 2001 Robert Penner * All rights reserved. * * TERMS OF USE - jQuery Easing * * Open source under the BSD License. * * Copyright © 2008 George McGinley Smith * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this list of * conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list * of conditions and the following disclaimer in the documentation and/or other materials * provided with the distribution. * * Neither the name of the author nor the names of contributors may be used to endorse * or promote products derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED * OF THE POSSIBILITY OF SUCH DAMAGE. * */ jQuery.easing.jswing=jQuery.easing.swing;jQuery.extend(jQuery.easing,{def:"easeOutQuad",swing:function(e,f,a,h,g){return jQuery.easing[jQuery.easing.def](e,f,a,h,g)},easeInQuad:function(e,f,a,h,g){return h*(f/=g)*f+a},easeOutQuad:function(e,f,a,h,g){return -h*(f/=g)*(f-2)+a},easeInOutQuad:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f+a}return -h/2*((--f)*(f-2)-1)+a},easeInCubic:function(e,f,a,h,g){return h*(f/=g)*f*f+a},easeOutCubic:function(e,f,a,h,g){return h*((f=f/g-1)*f*f+1)+a},easeInOutCubic:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f+a}return h/2*((f-=2)*f*f+2)+a},easeInQuart:function(e,f,a,h,g){return h*(f/=g)*f*f*f+a},easeOutQuart:function(e,f,a,h,g){return -h*((f=f/g-1)*f*f*f-1)+a},easeInOutQuart:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f*f+a}return -h/2*((f-=2)*f*f*f-2)+a},easeInQuint:function(e,f,a,h,g){return h*(f/=g)*f*f*f*f+a},easeOutQuint:function(e,f,a,h,g){return h*((f=f/g-1)*f*f*f*f+1)+a},easeInOutQuint:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f*f*f+a}return h/2*((f-=2)*f*f*f*f+2)+a},easeInSine:function(e,f,a,h,g){return -h*Math.cos(f/g*(Math.PI/2))+h+a},easeOutSine:function(e,f,a,h,g){return h*Math.sin(f/g*(Math.PI/2))+a},easeInOutSine:function(e,f,a,h,g){return -h/2*(Math.cos(Math.PI*f/g)-1)+a},easeInExpo:function(e,f,a,h,g){return(f==0)?a:h*Math.pow(2,10*(f/g-1))+a},easeOutExpo:function(e,f,a,h,g){return(f==g)?a+h:h*(-Math.pow(2,-10*f/g)+1)+a},easeInOutExpo:function(e,f,a,h,g){if(f==0){return a}if(f==g){return a+h}if((f/=g/2)<1){return h/2*Math.pow(2,10*(f-1))+a}return h/2*(-Math.pow(2,-10*--f)+2)+a},easeInCirc:function(e,f,a,h,g){return -h*(Math.sqrt(1-(f/=g)*f)-1)+a},easeOutCirc:function(e,f,a,h,g){return h*Math.sqrt(1-(f=f/g-1)*f)+a},easeInOutCirc:function(e,f,a,h,g){if((f/=g/2)<1){return -h/2*(Math.sqrt(1-f*f)-1)+a}return h/2*(Math.sqrt(1-(f-=2)*f)+1)+a},easeInElastic:function(f,h,e,l,k){var i=1.70158;var j=0;var g=l;if(h==0){return e}if((h/=k)==1){return e+l}if(!j){j=k*0.3}if(g=c;c++)setTimeout(function(t){return function(){e(t)}}(c),8*c)}" "===languagePath||0==languagePath.length?r():a(languagePath);var d='
Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×

'}};