function include(scriptUrl) { document.write(''); } function isIE() { var myNav = navigator.userAgent.toLowerCase(); return (myNav.indexOf('msie') != -1) ? parseInt(myNav.split('msie')[1]) : false; }; /* cookie.JS ========================================================*/ include('js/jquery.cookie.js'); /* Easing library ========================================================*/ include('js/jquery.easing.1.3.js'); /* PointerEvents ========================================================*/ ; (function ($) { if (isIE() && isIE() < 11) { include('js/pointer-events.js'); $('html').addClass('lt-ie11'); $(document).ready(function () { PointerEventsPolyfill.initialize({}); }); } })(jQuery); /* Stick up menus ========================================================*/ ; (function ($) { var o = $('html'); if (o.hasClass('desktop')) { include('js/tmstickup.js'); $(document).ready(function () { $('#stuck_container').TMStickUp({}) }); } })(jQuery); /* ToTop ========================================================*/ ; (function ($) { var o = $('html'); if (o.hasClass('desktop')) { include('js/jquery.ui.totop.js'); $(document).ready(function () { $().UItoTop({ easingType: 'easeOutQuart', containerClass: 'toTop fa fa-angle-up' }); }); } })(jQuery); /* EqualHeights ========================================================*/ ; (function ($) { var o = $('[data-equal-group]'); if (o.length > 0) { include('js/jquery.equalheights.js'); } })(jQuery); /* Copyright Year ========================================================*/ ; (function ($) { var currentYear = (new Date).getFullYear(); $(document).ready(function () { $("#copyright-year").text((new Date).getFullYear()); }); })(jQuery); /* Superfish menus ========================================================*/ ; (function ($) { include('js/superfish.js'); })(jQuery); /* Navbar ========================================================*/ ; (function ($) { include('js/jquery.rd-navbar.js'); })(jQuery); /* Google Map ========================================================*/ ; /* (function ($) { var o = document.getElementById("google-map"); if (o) { include('//maps.google.com/maps/api/js?sensor=false'); include('js/jquery.rd-google-map.js'); $(document).ready(function () { var o = $('#google-map'); if (o.length > 0) { o.googleMap({styles:[{ "featureType": "all", "elementType": "labels.text.fill", "stylers": [ { "saturation": 36 }, { "color": "#000000" }, { "lightness": 40 } ] }, { "featureType": "all", "elementType": "labels.text.stroke", "stylers": [ { "visibility": "on" }, { "color": "#000000" }, { "lightness": 16 } ] }, { "featureType": "all", "elementType": "labels.icon", "stylers": [ { "visibility": "off" } ] }, { "featureType": "administrative", "elementType": "geometry.fill", "stylers": [ { "color": "#000000" }, { "lightness": 20 } ] }, { "featureType": "administrative", "elementType": "geometry.stroke", "stylers": [ { "color": "#000000" }, { "lightness": 17 }, { "weight": 1.2 } ] }, { "featureType": "landscape", "elementType": "geometry", "stylers": [ { "color": "#000000" }, { "lightness": 20 } ] }, { "featureType": "poi", "elementType": "geometry", "stylers": [ { "color": "#000000" }, { "lightness": 21 } ] }, { "featureType": "road.highway", "elementType": "geometry.fill", "stylers": [ { "color": "#000000" }, { "lightness": 17 } ] }, { "featureType": "road.highway", "elementType": "geometry.stroke", "stylers": [ { "color": "#000000" }, { "lightness": 29 }, { "weight": 0.2 } ] }, { "featureType": "road.arterial", "elementType": "geometry", "stylers": [ { "color": "#000000" }, { "lightness": 18 } ] }, { "featureType": "road.local", "elementType": "geometry", "stylers": [ { "color": "#000000" }, { "lightness": 16 } ] }, { "featureType": "transit", "elementType": "geometry", "stylers": [ { "color": "#000000" }, { "lightness": 19 } ] }, { "featureType": "water", "elementType": "geometry", "stylers": [ { "color": "#000000" }, { "lightness": 17 } ] }]}); } }); } }) (jQuery); */ /* WOW ========================================================*/ ; (function ($) { var o = $('html'); if ((navigator.userAgent.toLowerCase().indexOf('msie') == -1 ) || (isIE() && isIE() > 9)) { if (o.hasClass('desktop')) { include('js/wow.js'); $(document).ready(function () { new WOW().init(); }); } } })(jQuery); /* Mailform =============================================*/ ; (function ($) { include('js/mailform/jquery.form.min.js'); include('js/mailform/jquery.rd-mailform.min.js'); })(jQuery); /* Orientation tablet fix ========================================================*/ $(function () { // IPad/IPhone var viewportmeta = document.querySelector && document.querySelector('meta[name="viewport"]'), ua = navigator.userAgent, gestureStart = function () { viewportmeta.content = "width=device-width, minimum-scale=0.25, maximum-scale=1.6, initial-scale=1.0"; }, scaleFix = function () { if (viewportmeta && /iPhone|iPad/.test(ua) && !/Opera Mini/.test(ua)) { viewportmeta.content = "width=device-width, minimum-scale=1.0, maximum-scale=1.0"; document.addEventListener("gesturestart", gestureStart, false); } }; scaleFix(); // Menu Android if (window.orientation != undefined) { var regM = /ipod|ipad|iphone/gi, result = ua.match(regM); if (!result) { $('.sf-menus li').each(function () { if ($(">ul", this)[0]) { $(">a", this).toggle( function () { return false; }, function () { window.location.href = $(this).attr("href"); } ); } }) } } }); var ua = navigator.userAgent.toLocaleLowerCase(), regV = /ipod|ipad|iphone/gi, result = ua.match(regV), userScale = ""; if (!result) { userScale = ",user-scalable=0" } document.write(''); /* Parallax =============================================*/ ; (function ($) { include('js/jquery.rd-parallax.js'); })(jQuery); /* Search.js ========================================================*/ ; (function ($) { //include('js/TMSearch.js');//Nares })(jQuery); /* TouchTouch Gallery ========================================================*/ ; (function ($) { var o = $('.thumb'); if (o.length > 0) { include('js/jquery.touch-touch.js'); $(document).ready(function () { o.touchTouch(); }); } })(jQuery); /* Facebook ========================================================*/ /* ; (function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/ru_RU/sdk.js#xfbml=1&version=v2.3"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk')); */ //Nares open map ; (function ($) { $("#openmap").click(function(){ $("#gmap_canvas").toggle(1000); }); })(jQuery); (function ($) { $("#openmap").toggle(function(){ $(this).html(' Voir la carte'); $(this).css('color','#3cb1f5'); },function() { $(this).html(' Fermer la carte'); $(this).css('color','red'); }); })(jQuery); //Nares détection mobile (function ($) { var isMobile = { all: function () { return navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i); } }; if (isMobile.all()) { $(".brand").addClass('floatleft'); $("#displayMobile").addClass('clearfix'); $(".pub").addClass('pubformobile'); $(".forpub").addClass('forpubmobile'); //$(".adsbygoogle").addClass('pubformobile'); $(".info").removeClass('info'); $(".sf-menu").append('
  • Connexion
  • '); $(".dropdown-menu").css('left','-80%'); }else{ } })(jQuery); //Nares chosen select param (function ($) { $(".chosen-select").chosen(); })(jQuery); //Nares panier (function ($) { $(".addPanier").click(function(e){ e.preventDefault(); $.get($(this).attr('href'),{},function(data){ if(data.error){ alert(data.msg); }else{ if(confirm(data.msg + ". Voulez-vous consulter votre panier ?")){ location.href = 'index.php?p=16'; }else{ $('#total').empty().append(data.total.toFixed(2)); $('#count').empty().append(data.countPanier); } } },'json'); return false; }); /* $(".qte").keyup(function(){ $.post(this).val(function(data){ $('#total').empty().append(data.total.toFixed(2)); $('#count').empty().append(data.countPanier); },'json'); return false; }); */ $(".order").click(function(){ location.href = 'index.php?p=15&o=1'; }); $(".orderLogin").click(function(){ //PAYPAL }); })(jQuery); //Nares control fichierForm (function ($){ $("#fichierForm").submit(function(){ if($("#section").val() && $("#departement").val()){ return true; }else{ $("#forSearchForm").modal(); //alert("Merci de sélectionner l'activité et le département."); return false; } }); })(jQuery);