1jQuery(document).ready(function($) { 2 3 $("body").hide(); 4 $(function() { 5 var $container = $('#results>.items'); 6 if( $container.length > 0 ){ 7 $container.imagesLoaded(function() { 8 $container.masonry({ 9 itemSelector: '.item', 10 columnWidth: 1, 11 isAnimated: true 12 }); 13 }); 14 } 15 16 }); 17 18 if( $("body").hasClass('single') && $(".diaporama_newsletter").length){ 19 $('.diaporama_newsletter').slick({ 20 slidesToScroll: 1, 21 draggable: true, 22 infinite: false, 23 }); 24 } 25 26 $(function() { 27 var $container = $('footer .center .menus .nav-menu'); 28 if( $container.length > 0 ){ 29 $container.imagesLoaded(function() { 30 $container.masonry({ 31 itemSelector: '.nav-menu>.menu-item', 32 columnWidth: function() { 33 if ($("body").hasClass("home")) 34 return 6; 35 else 36 return 4; 37 }, 38 isAnimated: true 39 }); 40 }); 41 } 42 43 }); 44 $(function() { 45 var $container = $('#content #result .entry-content .nav-menu'); 46 if( $container.length > 0 ){ 47 $container.imagesLoaded(function() { 48 $container.masonry({ 49 itemSelector: '.nav-menu>.menu-item', 50 columnWidth: function(containerWidth) { 51 return containerWidth / 2; 52 }, 53 isAnimated: true 54 }); 55 }); 56 } 57 58 }); 59 $(function() { 60 var $container = $('#content #results .thecontent .gellery ul'); 61 if( $container.length > 0 ){ 62 $container.imagesLoaded(function() { 63 $container.masonry({ 64 itemSelector: 'li', 65 columnWidth: 1, 66 isAnimated: true 67 }); 68 }); 69 } 70 71 }); 72 73 74 if (getUrlVars() == "frame") { 75 $("body").hide(); 76 var contentpage = $("footer").html(); 77 var jsfooter = '<script type="text/javascript">$(function(){var $container = $("footer .center .menus .nav-menu");$container.imagesLoaded(function(){$container.masonry({itemSelector : ".nav-menu>.menu-item",columnWidth : function( ) {return 4;},isAnimated: true});});});</script>'; 78 $("body").html(""); 79 $("body").html('<footer>' + contentpage + '</footer>' + jsfooter); 80 $("body").show(); 81 targetBlank(); 82 } else { 83 $("body").show(); 84 } 85 86 paginationHome(); 87 paginationRubrique(); 88 89 seo(); 90 seo_menu(); 91 effet_bloc_sommaire(); 92 93 ninja_form_add_img(); 94 95 calc_new_sharer_size(); 96 97 98 // Quizz 99 if ( typeof $.datepicker !== 'undefined' && $.isFunction( $.datepicker ) ) { 100 $( ".datepicker_quizz" ).datepicker({ 101 dateFormat: 'dd/mm/yy', 102 changeYear: true, 103 yearRange : "1920:Now" 104 }); 105 } 106 107 if($.prototype.twentytwenty){ 108 $(".block_before_after").twentytwenty({'move_on_hover':true}); 109 } 110 111 112 $('#button_accept_cookies').click(function(){ 113 setCookie("eccept_cookie", 1, 365 * 24 * 60); 114 $("#rw_alert_cookies").hide("slow"); 115 }); 116 //Lien gestion des cookies 117 if(site_config_js.partners.cmp_didomi){ 118 let linkGestionCookies = $('a[href="#consent_didomi"]'); 119 if(linkGestionCookies) { 120 linkGestionCookies.click(function (e){ 121 e.preventDefault(); 122 Didomi.preferences.show(); 123 }); 124 } 125 } 126 127 var hp_carrousel = $('#hp_carousel'); 128 if( $.fn.slick && hp_carrousel.length>0 ){ 129 hp_carrousel.slick({ 130 autoplay: true, 131 autoplaySpeed: 8000, 132 speed: 800, 133 infinite: true, 134 fade: true, 135 cssEase: 'linear', 136 arrows: true, 137 dots: false, 138 pauseOnHover: false, 139 lazyLoad: 'ondemand', 140 appendArrows: $('#carousel_arrows'), 141 }); 142 } 143 144 145 //\Copy post url 146 var copy_link_selector = '.copy_link'; 147 if( typeof ClipboardJS !== "undefined" && $(copy_link_selector).length ) { 148 var clipboard = new ClipboardJS(copy_link_selector); 149 clipboard.on('success', function(e) { 150 if( typeof e.trigger != 'undefined' ){ 151 $(e.trigger).addClass('copied'); 152 setTimeout(function(){ 153 $(e.trigger).removeClass('copied'); 154 }, 1000); 155 } 156 e.clearSelection(); 157 }); 158 } 159 //\Copy post url 160 if (typeof $('#quizz') != undefined) { 161 var widthTest = $('#quizz .test_progress').width(); 162 var numItems = $('#quizz .test_progress .steps').length; 163 var time_refresh_quizz = 2000; 164 if(site_config_js.time_refresh_quizz){ 165 time_refresh_quizz = site_config_js.time_refresh_quizz; 166 } 167 if($('#quizz').hasClass('test-v2') && typeof site_config_js.time_refresh_test !== 'undefined'){ 168 time_refresh_quizz = site_config_js.time_refresh_test; 169 } 170 $('#quizz .test_progress .steps:not(:last)').css('width', widthTest/(numItems-1)); 171 $('#quizz .question-responses-list-item label').click(function(){ 172 if (!$('#quizz .question-responses-list-item').hasClass('right') && !$('#quizz .question-responses-list-item').hasClass('wrong')) { 173 $('#quizz .question-responses-list-item').removeClass('right wrong'); 174 if ($(this).children('input').attr('correct') == 1) { 175 $(this).parent('.question-responses-list-item').addClass('right'); 176 }else{ 177 $(this).parent('.question-responses-list-item').addClass('wrong'); 178 } 179 setTimeout(function(){ $('#answer_quizz_form').submit(); }, time_refresh_quizz); 180 } 181 }); 182 } 183 184 if(site_config_js.disable_links_blank_blocked) { 185 $("a[href='javascript:void(0);'], a[href='javascript:void(0)']").on("contextmenu", function(e) { 186 var href = $(this).attr('data-href'); 187 $(this).attr('href', href); 188 }); 189 190 $("a[href='javascript:void(0);'], a[href='javascript:void(0)']").on('mouseout', function(e) { 191 $(this).attr('href', 'javascript:void(0);'); 192 }); 193 } 194 //Lien gestion des cookies 195 if(typeof site_config_js.partners !== 'undefined' && site_config_js.partners.cmp_didomi
195){ 196 let linkGestionCookies = $('a[href="#consent_didomi"]'); 197 if(linkGestionCookies) { 198 linkGestionCookies.click(function (e){ 199 e.preventDefault(); 200 Didomi.preferences.show(); 201 }); 202 } 203 } 204 $('.pagination--show-more-button').click(function() { 205 let lang = $('html')[0].lang; 206 let seeMoreText = lang === 'fr-FR' ? 'Voir plus' : 'See more'; 207 let seeLessText = lang === 'fr-FR' ? 'Voir moins' : 'See less'; 208 let element = $('.pagination--show-more-pages'); 209 if (element.hasClass('pagination--hide-pages')) { 210 element.removeClass('pagination--hide-pages'); 211 $(this)[0].innerText = seeLessText; 212 }else{ 213 element.addClass('pagination--hide-pages'); 214 $(this)[0].innerText = seeMoreText; 215 } 216 }); 217 218 $('[data-action="jslink"]').click(handleJsLinkClick); 219 220 $('#cmp_preferences').on('click',function(){ 221 showCmpPreferencesPopup(); 222 }); 223}); 224 225$(window).on('load', function() { 226 $("#content #results .thecontent .diaporama ul li.item img").each(function(index, el) { 227 var photo = new Image(); 228 photo.url = el.src; 229 $(photo).bind('load', centerImgDiaporama(photo, el)); 230 }); 231 $("#content .carroussel ul li a.pimg img").each(function(index, el) { 232 var photo = new Image(); 233 photo.url = el.src; 234 $(photo).bind('load', centerImgCarroussel(photo, el)); 235 }); 236 indexDiaporama = Number($("#content .diaporama .navs li.current").attr("index")); 237}); 238 239function handleJsLinkClick() { 240 var target = jQuery(this).attr('data-target') ?? ''; 241 var link = jQuery(this).attr('data-ref') ?? $(this).attr('data-rel'); 242 if (link) { 243 if (link.indexOf('http') != 0) { 244 if(link[0] != '/'){ 245 link = '/'+link; 246 } 247 } 248 249 if ( target.toLowerCase() == '_blank') { 250 window.open(link); 251 } else { 252 document.location.href = link; 253 } 254 } 255} 256 257function rw_lazyload() { 258 let rw_lazyload = null; 259 if( typeof LazyLoad != 'undefined' ){ 260 rw_lazyload = new LazyLoad({ 261 elements_selector: ".lazy-load", 262 class_loaded:'lazy-loaded' 263 }); 264 } 265 return rw_lazyload; 266} 267 268function showCmpPreferencesPopup() { 269 if(typeof(window.FastCMP) !== 'undefined') { 270 window.FastCMP.open(); 271 }else if(typeof(Didomi) !== 'undefined'){ 272 Didomi.preferences.show(); 273 } 274} 275 276$(document).on('nfFormReady', function() { 277 $('.rw-ninja-forms .nl-social .nf-form-content input[type="submit"], .rw-ninja-forms .nl_box .nf-form-content input[type="submit"], .rw-ninja-forms #blockRight .widget_newsletter .nf-form-content input[type="submit"], .rw-ninja-forms #blockRight .newsletter .nf-form-content input[type="submit"], .rw-ninja-forms footer .nf-form-content input[type="submit"]').attr('type', 'button') 278}); 279
280function rw_observe_element(selector, callback) { 281 const targetNode = document.querySelector(selector); 282 if(!targetNode) { 283 return; 284 } 285 const mutationCallback = function (mutationsList, observer) { 286 for (const mutation of mutationsList) { 287 if (mutation.type === 'childList') { 288 callback(targetNode) 289 } 290 } 291 }; 292 const observer = new MutationObserver(mutationCallback); 293 const config = { childList: true, subtree: true }; 294 observer.observe(targetNode, config); 295} 296
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.