1// using jquery from wordpress.. 2// $ is not defined 3var $ = jQuery; 4var GA_EVENT_DM = site_config_js.devs.ga_event_dm_149424965 ; 5var isChrome = /Chrome/.test(navigator.userAgent) && /Google Inc/.test(navigator.vendor); 6var isSafari = /Safari/.test(navigator.userAgent) && /Apple Computer, Inc/.test(navigator.vendor); 7var isFireFox = navigator.userAgent.indexOf('Firefox'); 8 9 10var play_on_nav_diapo = false; 11 12if(is_desktop){ 13 /*if( site_config_js.devs.lancement_player_sticke_153138287 && navigator.userAgent.indexOf("Edge/") > -1 ){ 14 play_on_nav_diapo = true; 15 }else if( site_config_js.devs.lancement_player_sticke_firefox_153138287 && isFireFox > -1 ){ 16 play_on_nav_diapo = true; 17 }else if( site_config_js.devs.lancement_player_sticke_chrome_153138287 && isChrome ){ 18 play_on_nav_diapo = true; 19 }/*else if( site_config_js.devs.lancement_player_sticke_ie_153138287 && isIE( navigator.userAgent) ){ 20 play_on_nav_diapo = true; 21 }else*/ if( site_config_js.devs.lancement_player_sticke_safari_153138287 && isSafari ){ 22 play_on_nav_diapo = true; 23 } 24} 25 26 27function targetBlank() { 28 $("footer a").unbind(); 29 $("footer a").bind("click", function() { 30 this.target = '_blank'; 31 }); 32 33} 34var indexCaroussel = 0; 35 36function desactiveClickOnMenu() { 37 $("nav ul#menu-menu_header>li.menu-item>a,footer .center .menus ul#menu-menu_header-1>.menu-item>a").unbind(); 38 $("nav ul#menu-menu_header>li.menu-item>a,footer .center .menus ul#menu-menu_header-1>.menu-item>a").bind("click", function() { //alert("-----"); 39 if (!$(this).parent().hasClass("sagachanel")) 40 return false; 41 }); 42} 43 44function showSocialLink() { 45 46} 47 48 49function getUrlVars() { 50 var vars = [], 51 hash; 52 var hashes = window.location.href.split('/'); 53 hashes = hashes[hashes.length - 1].split('?'); 54 hashes = hashes[0]; 55 hashes = hashes.split('#'); 56 return hashes[1]; 57} 58 59 60function clickArticles() { 61 $(".linkArticle").unbind(); 62 $(".linkArticle").bind("click", function() { 63 $(this).find(".readmore").click(); 64 }); 65 66} 67var indexDiaporama = 0; 68try { 69 indexDiaporama = Number($("#content .diaporama .navs li.current").attr("index")); 70} catch (e) {} 71 72function autoDiaporama() { //alert("---"); 73 var liDiaporama = $(".diaporama .navs_absolute").children(); 74 if (indexDiaporama < liDiaporama.length - 1) 75 indexDiaporama += 1; 76 else 77 indexDiaporama = 0; 78 $(liDiaporama[indexDiaporama]).click(); 79} 80 81function centerImgDiaporama(photo, el) { 82 height_diaporama = (self.site_config_js && self.site_config_js.height_diaporama) ? self.site_config_js.height_diaporama : 465; 83 height = $(el).height(); 84 $(el).css("top", (height_diaporama - height) / 2); 85} 86 87function centerImgCarroussel(photo, el) { 88 height = $(el).height(); 89 $(el).css("margin-top", (((height - 356) / 2) * (-1))); 90} 91 92function navDiaporamaAnimate(index) { 93 $(".diaporama .items").stop().animate({ 94 left: -(index * 648) 95 }, 1000, function() { 96 $(".diaporama .navs li").removeClass("current"); 97 $($("#content .diaporama .navs li")[index]).addClass("current"); 98 indexDiaporama = Number(index); 99 $("#blockRight .widgetLegende .title").text(diaporamaPicturelists[indexDiaporama].alttext); 100 $("#blockRight .widgetLegende .excerpt").text(diaporamaPicturelists[indexDiaporama].description); 101 if (indexDiaporama + 1 == diaporamaPicturelists.length) { 102 $(".homeMoreArticles").fadeIn("Slow"); 103 } else { 104 $(".homeMoreArticles").fadeOut("Slow"); 105 } 106 try { 107 window.history.pushState(null, "", $($("#content .diaporama ul li")[index]).find("a").attr("href")); 108 } catch (e) {} 109 }); 110} 111 112function navDiaporama() { 113 114 $("#content .diaporama .nav_menu_next").click(function() { 115 var item = $("#content .diaporama .navs .navs_absolute li").first(); 116 item.hide("slow", function() { 117 $("#content .diaporama .navs .navs_absolute").append(item); 118 item.show(); 119 }); 120 return false;
121 }); 122 $("#content .diaporama .nav_menu_prev").click(function() { 123 var item = $("#content .diaporama .navs .navs_absolute li").last(); 124 item.hide(); 125 $("#content .diaporama .navs .navs_absolute").prepend(item); 126 item.show("solw"); 127 return false; 128 }); 129} 130 131function paginationHome() { 132 $(".paginationHome span").each(function(i, obj) { 133 $(obj).unbind(); 134 $(obj).bind("click", function() { 135 $(".paginationHome span").removeClass("current"); 136 $(this).addClass("current"); 137 $("#homeBody .articles").hide(); 138 $("#homeBody .articles.item_" + $(this).html()).fadeIn(700); 139 140 //Amine LAAROUSSI 141 $("#results .articles li a .visu img, .homeMoreArticles .item .visu a img").each(function(index) { 142 $(this).css("margin-top", ((($(this).height() - $(this).closest(".visu").height()) / 2) * (-1))); 143 }); 144 }); 145 146 }); 147} 148 149function paginationRubrique() { 150 $(".pagination_rubrique li a").each(function(i, obj) { 151 $(obj).unbind(); 152 $(obj).bind("click", function() { 153 $(".pagination_rubrique li").removeClass("active"); 154 $(this).parent().addClass("active"); 155 $("#homeBody .articles").hide(); 156 $("#homeBody .articles.item_" + $(this).html()).fadeIn(700); 157 jQuery('html, body').animate({ 158 scrollTop: jQuery(".items-posts").offset().top - jQuery(".navbar-site #principal-menu").height() - jQuery("#wpadminbar").height() 159 }, 700); 160 161 $(".number_page .active_page").html($(this).html()); 162 return false; 163 }); 164 165 }); 166} 167 168function strip_tags(input, allowed) { 169 170 allowed = (((allowed || "") + "").toLowerCase().match(/<[a-z][a-z0-9]*>/g) || []).join(''); // making sure the allowed arg is a string containing only tags in lowercase (<a><b><c>) 171 var tags = /<\/?([a-z][a-z0-9]*)\b[^>]*>/gi, 172 commentsAndPhpTags = /<!--[\s\S]*?-->|<\?(?:php)?[\s\S]*?\?>/gi; 173 return input.replace(commentsAndPhpTags, '').replace(tags, function($0, $1) { 174 return allowed.indexOf('<' + $1.toLowerCase() + '>') > -1 ? $0 : ''; 175 }); 176} 177 178function seo() { 179 180 if ( site_config_js.seo_bubble_links ) { 181 // seo bubble code 182 var $wrapper_cls = 'body'; 183 if( site_config_js.devs.liens_non_cliquables_161442981 ){ 184 $wrapper_cls = '#page'; 185 } 186 $($wrapper_cls).on('click' , 'a,img' , function(){ 187 var $target = $(this) ; 188 var $origin = $(this) ; 189 // a 190 var href = '' ; 191 192 // img 193 if ( href = $target.data('ihref')){ 194 window.location =href; 195 return; 196 } 197 if ( $target.is('img') || $target.is('span')) { 198 $target = $target.parents('a'); 199 } 200 if ( href = $target.data('href')){ 201 $target.attr('href' , href ); 202 } 203 204 205 $(document).trigger('bubble_click', [$origin] ) ; 206 207 208 }); 209 210 } 211 212 213 $("[data-link-class]").each(function(i, index) { 214 var class_name = $(index).attr("data-link-class"); 215 var parent = $(index).parents("." + class_name); 216 var link = parent.find("a").attr("href"); 217 var a = "<a href='" + link + "' >" + $(index).html() + "</a>"; 218 $(index).html(a); 219 }); 220 221 $("span[data-href]").each(function(i, index) { 222 var target; 223 var $href_html; 224 $(index).attr("href", $(index).attr("data-href")); 225 $(index).attr("data-href", null); 226 target = $(index).data('target'); 227 $href_html = $(index)[0].outerHTML; 228 if( target && typeof target !== 'undefined'){ 229 $href_html = $href_html.replace("data-target", "target"); 230 } 231 $(index)[0].outerHTML = $href_html.replace("<span", "<a").replace("</span", "</a"); 232 }); 233 234 $("img[data-ihref]").each(function(i, index) { 235 $(this).click(function(){ 236 link = $(this).attr("data-ihref"); 237 window.location =link; 238 }); 239 }); 240 241 $(document).on('click', 'a[data-href]', function(){ 242 let link = $(this).data('href'); 243 if(link.length){ 244 let target = $(this).attr('target'); 245 target = target ? target : '_self'; 246 window.open(link, target); 247 } 248 }); 249 250} 251 252function setDefaultImage(source) { 253 if (jQuery(source).attr("data-default-src")) { 254 var cpyImg = new Image(); 255 cpyImg.src = source.src; 256 if (cpyImg.width <= 120 && source.src != jQuery(source).attr("data-default-src")) { 257 source.src = jQuery(source).attr("data-default-src"); 258 } 259 } 260} 261 262function seo_menu() { 263 if (self.menu_items && (site_config_js.version == 1 || !site_config_js.version )) { 264 for (i in menu_items) { 265 var menu_item = menu_items[i]; 266 if (menu_item.menu_item_parent !== 0) { 267 var item_parent = jQuery("footer .menu-item-" + menu_item.menu_item_parent); 268 if (item_parent.length) { 269 if (item_parent.find(".sub-menu").length === 0) { 270 item_parent.append("<ul class='sub-menu' />"); 271 } 272 html = '<li class="' + ((menu_item.classes) ? menu_item.classes.join(' ') : '') + ' menu-item menu-item-type-taxonomy menu-item-object-category menu-item-' + menu_item.ID + '">\ 273 <a href="' + menu_item.url + '">' + menu_item.title + '</a></li>'; 274 item_parent.find(".sub-menu").append(html); 275 } 276 } 277 } 278 279 for (i in menu_items) { 280 var menu_item = menu_items[i]; 281 if (menu_item.menu_item_parent !== 0) { 282 var item_parent = jQuery("nav .menu-item-" + menu_item.menu_item_parent); 283 if (item_parent.length) { 284 if (item_parent.find(".sub-menu").length === 0) { 285 item_parent.addClass('has-sub-childs') 286 item_parent.append("<ul class='sub-menu parent-" + menu_item.menu_item_parent +"' />"); 287 } 288 if (jQuery("nav .menu-item-" + menu_item.ID).length === 0) { 289 html = '<li class="' + ((menu_item.classes) ? menu_item.classes.join(' ') : '') + ' menu-item menu-item-type-taxonomy menu-item-object-category menu-item-' + menu_item.ID + '">\ 290 <a href="' + menu_item.url + '">' + menu_item.title + '</a></li>' ; 291 item_parent.find(".sub-menu.parent-" + menu_item.menu_item_parent).append(html); 292 } 293 294 } 295 } 296 } 297 } 298 299 300} 301function effet_bloc_sommaire(){ 302 $("#content #results .thecontent .bloc_sommaire ul li.title").unbind().click(function(){ 303 var ul_child = $(this).parent(); 304 var post_child = $(ul_child).children('.post-child,.folder-link'); 305 306 var delayTime = 50; 307 if(!$(ul_child).hasClass('in')) { 308 for (var i = 0; i <= post_child.length - 1; i++) { 309 $(post_child[i]).delay(i * delayTime).fadeIn('fast','swing'); 310 } 311 $(ul_child).addClass('in'); 312 } else { 313 for (var j = post_child.length - 1; j >= 0; j--) { 314 $(post_child[j]).delay((post_child.length-j) * delayTime).fadeOut('fast','swing'); 315 } 316 $(ul_child).removeClass('in'); 317 } 318 }); 319} 320 321 322function ninja_form_add_img(){ 323 var element = jQuery(".ninja-forms-form-wrap .ajouter-une-image").last(); 324 if(element.length){ 325 element.show(); 326 element.click(function(){ 327 jQuery(".ninja-forms-form-wrap .field-wrap.hidden_field:hidden").first().show(300) ; 328 if(jQuery(".ninja-forms-form-wrap .field-wrap.hidden_field:hidden").length === 0){ 329 jQuery(this).hide("slow"); 330 } 331 }); 332 } 333} 334 335 336function isScriptAlreadyIncluded(src){ 337 var scripts = document.getElementsByTagName("script"); 338 for(var i = 0; i < scripts.length; i++) 339 if(scripts[i].getAttribute('src') == src) return true; 340 return false;
341} 342 343function send_GA(category, action, lebel, value, publicationDate=null){ 344 345// Vu que la nouvelle implementation est ajoutée côté GTM, nous sommes dans l'obligation d'envoyer nos events vers GTM et par la suite, ils seront ajoutés et interprètés par GA 346 347 if(typeof(value) === "undefined"){ 348 value = null; 349 } 350 let custom_datalayer = site_config_js.custom_datalayer ? site_config_js.custom_datalayer : 'dataLayer'; 351 if (window[custom_datalayer]) { 352 window[custom_datalayer] = window[custom_datalayer] || []; 353 window[custom_datalayer].push({ 354 event : category, 355 action: action, 356 label: lebel, 357 value: value, 358 publicationDate: publicationDate 359 }); 360 } 361 362 var args = {'category':category, 'action':action, 'lebel':lebel, 'value' :value, 'publicationDate': publicationDate}; 363 if(typeof consent_didomi !== 'undefined'){ 364 consent_didomi('google_analytics', wait_consent_before_send_GA,args); 365 } else{ 366 wait_consent_before_send_GA(args); 367 } 368} 369 370function wait_consent_before_send_GA(args){ 371 372 let category = args.category 373 let action = args.action 374 let lebel = args.lebel 375 let value = args.value 376 let publicationDate = args.publicationDate 377 378 var non_interaction = (typeof site_config_js.enable_event_non_interaction !== 'undefined' && site_config_js.enable_event_non_interaction == true && no_interaction) ? true : false; 379 if (typeof site_config_js["partners"] !== 'undefined' && site_config_js["partners"].analytics == true) { 380 if(window._gaq){ 381 if(value){ 382 _gaq.push(['_trackEvent', category, action, lebel, value, publicationDate]); 383 384 }else{ 385 _gaq.push(['_trackEvent', category, action, lebel, publicationDate]); 386 } 387 388 } if(window.gtag){ 389 var interaction = non_interaction ? {'nonInteraction': true} : ''; 390 if(value){ 391 if(interaction) { 392 gtag('event', action, { 'event_category': category, 'event_label': lebel, 'value': value, interaction, 'publicationDate': publicationDate }); 393 }else{ 394 gtag('event', action, { 'event_category': category, 'event_label': lebel, 'value': value, 'publicationDate': publicationDate}); 395 } 396 if(site_config_js.other_google_analytics_ids){ 397 jQuery.each(site_config_js.other_google_analytics_ids, function(index, value1) { 398 if (interaction) { 399 gtag('event', action, {'send_to': value1, 'event_category': category, 'event_label': lebel, 'value': value, interaction, 'publicationDate': publicationDate}); 400 } else { 401 gtag('event', action, {'send_to': value1, 'event_category': category, 'event_label': lebel, 'value': value, 'publicationDate': publicationDate }); 402 } 403 }); 404 } 405 }else{ 406 if (interaction) { 407 gtag('event', action, { 'event_category': category, 'event_label': lebel, interaction, 'publicationDate': publicationDate }); 408 } else { 409 gtag('event', action, { 'event_category': category, 'event_label': lebel, 'publicationDate': publicationDate }); 410 } 411 if(site_config_js.other_google_analytics_ids){ 412 jQuery.each(site_config_js.other_google_analytics_ids, function(index, value1) { 413 if (interaction) { 414 gtag('event', action, {'send_to': value1, 'event_category': category, 'event_label': lebel, interaction, 'publicationDate': publicationDate}); 415 } else { 416 gtag('event', action, {'send_to': value1, 'event_category': category, 'event_label': lebel, 'publicationDate': publicationDate }); 417 } 418 }); 419 } 420 } 421 }if(window.ga){ 422 var interaction = non_interaction ? {'nonInteraction' : 1} : ''; 423 if(value){ 424 if(interaction) { 425 ga('send', 'event', category, action, lebel, value, interaction, publicationDate); 426 }else{ 427 ga('send', 'event', category, action, lebel, value, publicationDate); 428 } 429 if(site_config_js.other_google_analytics_ids){ 430 for (var ga_name in site_config_js.other_google_analytics_ids) { 431 if(interaction) { 432 ga(ga_name + '.send', 'event', category, action, lebel, value, interaction, publicationDate); 433 }else{ 434 ga(ga_name + '.send', 'event', category, action, lebel, value, publicationDate); 435 } 436 } 437 } 438 }else{ 439 if(interaction){ 440 ga('send', 'event', category, action, lebel, interaction, publicationDate); 441 }else{ 442 ga('send', 'event', category, action, lebel, publicationDate); 443 } 444 if(site_config_js.other_google_analytics_ids){ 445 for (var ga_name in site_config_js.other_google_analytics_ids) { 446 if(interaction) { 447 ga(ga_name +'.send', 'event', category, action, lebel, interaction); 448 }else{ 449 ga(ga_name +'.send', 'event', category, action, lebel); 450 } 451 452 } 453 } 454 } 455 } 456 } 457} 458 459function send_events_GA(category, action, lebel){ 460 if(window.gtag){ 461 gtag('event', action, {'send_to': 'events', 'event_category': category, 'event_label': lebel }); 462 }if(window.ga){ 463 ga('events.send', 'event', category, action, lebel); 464 } 465} 466 467function pageview_GA(only_path_and_hash){ 468 469 470 if(window._gaq){
471 window._gaq.push( ['_trackPageview', only_path_and_hash]); 472 } if(window.gtag){ 473 474 gtag('event', 'page_view', { 'send_to': site_config_js.google_analytics_id }); 475 if(site_config_js.other_google_analytics_ids){ 476 jQuery.each(site_config_js.other_google_analytics_ids, function(index, value1) { 477 gtag('event', 'page_view', { 'send_to': value1 }); 478 }); 479 } 480 481 }if(window.ga){ 482 if (typeof site_config_js["partners"] !== 'undefined' && site_config_js["partners"].analytics == true) { 483 ga('send', 'pageview', only_path_and_hash); 484 485 if(site_config_js.other_google_analytics_ids){ 486 for (var ga_name in site_config_js.other_google_analytics_ids) { 487 ga( ga_name + '.send', 'pageview', only_path_and_hash); 488 } 489 } 490 } 491 } 492} 493 494 495function calc_new_sharer_size() { 496 $block_share = $('.sharer_after_comment .share-buttons'); 497 var width_em = $block_share.find('.total-shares em').width(); 498 var width_1 = $block_share.find('.total-shares').width(); 499 var width_2 = $block_share.find('.blockShare_horizontal').width(); 500 $block_share.width(width_1+width_2+15); 501} 502 503 504 505jQuery(document).on( "video_state_tracking", function(event, tracking_Params) { 506 var StateMessage = tracking_Params.event; 507 var videoPlayer = tracking_Params.videoPlayer; 508 var prsentPoints = [25, 50, 75]; 509 if(StateMessage === 0){ 510 StateMessage = 'Start'; 511 }else if( prsentPoints.indexOf(StateMessage) != -1 ){ 512 StateMessage = 'lecture à '+StateMessage+'% '; 513 } 514 if(site_config_js.is_preprod){ 515 console.log(StateMessage) ; 516 } 517 setTimeout(function(){ 518 send_GA( videoPlayer, StateMessage, self.location.href); 519 }, 3000); 520}); 521 522 523 524 525function menu_link_mouseover(this_){ 526 $this_ = $(this_) ; 527 var color = $this_.data('color-typo-hover') || '' ; 528 $this_.css('color',color , 'important' ); 529 var bg_color = $this_.data('color-fond-hover') || ''; 530 531 $this_.each(function () { 532 this.style.setProperty( 'color',color , 'important' ); 533 this.style.setProperty('background-color',bg_color,'important' ); 534 }); 535} 536 537function menu_link_onmouseout(this_){ 538 $this_ = $(this_) ; 539 var color = $this_.data('color-typo') || ''; 540 var bg_color = $this_.data('color-fond') || '' ; 541 $this_.each(function () { 542 this.style.setProperty( 'color',color , 'important' ); 543 this.style.setProperty('background-color',bg_color,'important' ); 544 }); 545} 546 547 548function show_default_sharer( id , url , title , description , image ){ 549 if( typeof Share == 'function' ){ 550 window.share_object = new Share( id, { 551 url: url, 552 title: title , 553 description: description, 554 image : image, 555 ontoggle:false , 556 inject_css:false, 557 inject_html:false, 558 ui : { button_font: false,icon_font: false }, 559 networks :{ 560 twitter :{ 561 before : function(elem){ 562 var twObj = $(elem).find('.social-network[data-network=twitter]'); 563 this.url = $(twObj).data('url'); 564 this.description = this.text = $(twObj).data('text'); 565 var hashtags = $(twObj).data('hashtags'); 566 var via = $(twObj).data('via'); 567 if(hashtags && hashtags != ''){ 568 this.url +='&hashtags='+hashtags; 569 } 570 if(via && via != ''){ 571 this.url +='&via='+via; 572 } 573 } 574 } 575 } 576 577 }); 578 } 579} 580/* Sticky menu with social button */ 581function fix_nav_scroll(){ 582 var $share_to_fix = $('.sharer_below_title .share-buttons'), 583 $share_sticky = $('.blockShare_fixed'), 584 $wind = $(window); 585 if($share_to_fix.length>0){ 586 $(document).scroll(function(){ 587 if(!$share_sticky.hasClass('navbar-fixed-top')) 588 offset_navbar = $share_to_fix.offset(); 589 if(offset_navbar.top<=$(this).scrollTop()) 590 $share_sticky.addClass('navbar-fixed-top'); 591 else 592 $share_sticky.removeClass('navbar-fixed-top'); 593 }); 594 } 595} 596 597 598(function( $ ) { 599 $.urlParam = function(name){ 600 var results = new RegExp('[\?&]' + name + '=([^&#]*)').exec(window.location.href); 601 if (results==null){ 602 return ''; 603 } 604 else{ 605 return results[1] || 0; 606 } 607 } 608}( jQuery )); 609 610 611 612if( site_config_js.new_share_bottons_mobile ){ 613 $( "#social_share_mobile #illustrate" ).on( "click", function() { 614 $( "#social_share_mobile .blockShare_horizontal ul" ).toggleClass( "show_sharer" ); 615 $( this ).toggleClass( "close_share" ); 616 }); 617} 618 619 620 621/** 622 * Bring posts from feed and reload posts div content 623 * @param int feed's paged 624 * @return false 625 */ 626 627function get_more_posts(paged){ 628 629 if (window.stored_posts && window.stored_posts.length != 0 ){ 630 631 $.each(window.stored_posts, function(key, value) {
632 if(value['id'] != site_config_js.post_id){ 633 $("#posts-ajax").append(post_template(value)); 634 } 635 }); 636 window.stored_posts = []; 637 window.load_more_content = true; 638 return false; 639 640 } else { 641 642 var data = { 643 feed : 'json2' 644 }; 645 646 if(paged > 1){ 647 data.paged = paged ; 648 } 649 650 $.ajax({ 651 url : '/', 652 type : 'GET', 653 dataType: 'json', 654 data : data, 655 success : function( response ) { 656 window.stored_posts = []; 657 if (response) { 658 var i = 1; 659 $.each(response['posts'], function(key, value) { 660 if ( i < 6 ) { 661 if(value['id'] != site_config_js.post_id){ 662 $("#posts-ajax").append(post_template(value)); 663 } 664 i++; 665 666 }else{ 667 window.stored_posts.push(value); 668 } 669 670 }); 671 } 672 $('#paged').val(parseInt(paged)+1); 673 window.load_more_content = true; 674 return false; 675 }, 676 }); 677 678 } 679 680} 681 682/** 683 * Prepare template for a given post 684 * @param post 685 * @return string 686 */ 687 688function post_template (post) { 689 690 var html = ""; 691 692 html += "<div class='col-xs-12 col-sm-6 item-post'><div class='thumbnail'>"; 693 694 html += "<div class='thumbnail-visu mobile'><a href='"+post['permalink'] +"'><img id='img_more_post' class='lazy-loaded img-responsive zoom-it wp-post-image' src='"+post['thumbnail_medium']+"' ></a></div>"; 695 html += '<h2 class="title"><a href="'+post['permalink'] +'">'+post['title'] +'</a></h2>'; 696 html += '<div class="addthis_toolbox" addthis:url="'+post['permalink'] + 697 '" addthis:title="'+post['title'] +'" addthis:description="'+post['excerpt'] + 698 '"></div>'; 699 html += "</div></div>"; 700 return html; 701} 702function flash_active(){ 703 if( navigator.mimeTypes.length > 0 ) 704 { 705 return navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin != null; 706 } 707 else if( window.ActiveXObject ) 708 { 709 try 710 { 711 new ActiveXObject( "ShockwaveFlash.ShockwaveFlash" ); 712 return true; 713 } 714 catch( oError ) 715 { 716 return false; 717 } 718 } 719 else 720 { 721 return false; 722 } 723} 724 725 726function second_tracking(url) { 727 window.open(url); 728} 729 730 731 732/** 733* Responsive Iframe/iframes 734*/ 735 window.addEventListener( "message", function(e) { 736 var data = e.data ; 737 if(data && data.indexOf){ 738 if(data.indexOf('iframe_height') > -1 && data.indexOf('iframe_id') > -1){ 739 /** For multi iframes 740 * 1- Include the following Script in the partner pages 741 * <script type='text/javascript' src='//www.viepratique.fr/wp-content/themes/reworldmedia/assets/javascripts/multi-iframe-autosize.js'></script> 742 * 2- Define iframe path as an id (ex: xxxx.com/yyyy.html => id="yyyy") 743 * 3- Enjoy! ;) 744 */ 745 var iframe = JSON.parse(e.data); 746 if(iframe.iframe_id){ 747 var iframe_obj = document.getElementById(iframe.iframe_id.replace('/','')); 748 if(iframe_obj) iframe_obj.style.height = iframe.iframe_height+"px"; 749 } 750 }else if(data.indexOf('height_iframe_') > -1){ 751 /** For one iframe 752 * 1- Include the following Script in the partner page 753 * <script type='text/javascript' src='//www.viepratique.fr/wp-content/themes/reworldmedia/assets/javascripts/iframe-autosize.js'></script> 754 */ 755 var height = data.substr(14); 756 var frame = document.getElementById('iframe-autosize'); 757 frame.style.height = height + "px"; 758 } 759 } 760 }); 761 762 763//window.addEventListener("DOMContentLoaded", function(e) { 764jQuery(document).ready( function(){ 765 var $refresh_duration = 300; 766 if( site_config_js.devs.refresh_manager_153552908 && site_config_js.refresh_meta_duration !== 'undefined'){ 767 $refresh_duration = site_config_js.refresh_meta_duration; 768 } 769 function addMetaRefresh(content) { 770 jQuery('head').append('<meta id="meta-refresh" http-equiv="refresh" content="'+ content +'">'); 771 } 772 if( site_config_js.enable_refresh_meta !== 'undefined' && site_config_js.enable_refresh_meta){ 773 site_config_js.refreshTimer = setTimeout(function(){ 774 addMetaRefresh(1); 775 }, $refresh_duration * 1000); 776 777 } 778 var refreshExtended = false;
779 jQuery('#commentform').on('focusin click input change', function(){ 780 if(refreshExtended){ 781 return; 782 } 783 refreshExtended = true; 784 clearTimeout(site_config_js.refreshTimer); 785 addMetaRefresh(3600); 786 }); 787}); 788 789 790function isIE(userAgent) { 791 userAgent = userAgent || navigator.userAgent; 792 return userAgent.indexOf("MSIE ") > -1 || userAgent.indexOf("Trident/") > -1 ; 793} 794 795 796if(site_config_js.devs.activer_le_lazyload_sur_le_home_diapos_3459){ 797 $("#carousel-gallery-generic, #custom-full-carousel-type-1").on('slide.bs.carousel', function (e) { 798 window.imgc= e ; 799 var img = $(e.relatedTarget).find("img.lazy-load"); 800 if(img.length){ 801 img.attr("src", img.data("src")).removeClass('lazy-load').addClass("lazy-loaded"); 802 } 803 804 var img2 = $(e.relatedTarget).next(".item").find("img.lazy-load"); 805 if(img2.length){ 806 img2.attr("src", img2.data("src")).removeClass('lazy-load').addClass("lazy-loaded"); 807 } 808 809 }); 810} 811 812 813 814 815var js_mobile = '' ; 816 817if(is_mobile){ 818 js_mobile = 'phone' ; 819 820}else if(is_tablet){ 821 js_mobile = 'tablet' ; 822 823}else{ 824 js_mobile = 'desktop' ; 825} 826 827if(site_config_js.nginx_mobile){ 828 send_GA('NginxMobile', 'phone', js_mobile, null, true); 829 830}else if(site_config_js.nginx_tablet){ 831 send_GA('NginxMobile', 'tablet', js_mobile, null, true); 832 833}else{ 834 send_GA('NginxMobile', 'desktop', js_mobile, null, true); 835} 836
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.