PageSourceSearch

https://memorialcamprivesaltes.eu/themes/memo/js/custom.js?tm6a87

js memorialcamprivesaltes.eu collected 2026-10-02 07:41:23 UTC 35,745 bytes, 1,164 lines download raw bytes

1(function ($) {
2  function applyWhenElementExists(selector, myFunction, intervalTime) {
3    var interval = setInterval(function () {
4      if (jQuery(selector).length > 0) {
5        myFunction();
6        clearInterval(interval);
7      }
8    }, intervalTime);
9  }
10
11  function markEmptyDateHours() {
12    $(".date-hours").each(function () {
13      var hasDate = $.trim($(this).find(".date").text()).length > 0;
14      var hasHours = $.trim($(this).find(".hours").text()).length > 0;
15      $(this).toggleClass("date-hours--empty", !hasDate && !hasHours);
16    });
17  }
18
19  $(document).ajaxComplete(function () {
20    if ($(".view-les-editions-du-memorial").length) {
21      $(".summary").each(function () {
22        if (!$(this).hasClass("open-ajax")) {
23          $(this).addClass("open-wajax");
24        }
25      });
26      $(".open-wajax").on("click", function () {
27        $(this).siblings().slideToggle();
28        $(this).toggleClass("active");
29      });
30      memorial_edition();
31    }
32
33    if (!$(".path-actualites").length) {
34      $(".split-date time").each(function () {
35        if (!$(this).hasClass("dated")) {
36          var for_date = $(this).text();
37          $(this).addClass("dated");
38          var datter = for_date.split(" ");
39          $(this).text(" ");
40          var date =
41            '<div class="date-formater"><div class="day">' +
42            datter[0] +
43            '</div><div class="my-wrap"><div class="month">' +
44            datter[1] +
45            '</div><div class="year">' +
46            datter[2] +
47            "</div></div></div>";
48          $(date).insertAfter(this);
49        }
50      });
51    }
52    markEmptyDateHours();
53    if (
54      $(".view-la-programmation-hors-les-murs").length &&
55      $(".select-styled").length == 0
56    ) {
57      var newhtml =
58        '<div class="tag-wrap"><div class="tag-wrap-inner">  <div class="select-styled"><svg xmlns="http://www.w3.org/2000/svg" width="20.775" height="28.447" viewBox="0 0 20.775 28.447"><path id="Location" d="M33.894,9.344A4.694,4.694,0,1,1,29.2,4.672a4.683,4.683,0,0,1,4.694,4.672m4.87,0a9.387,9.387,0,1,0-16.61,5.968L29.384,25.7l7.336-10.536a9.234,9.234,0,0,0,.723-1.038l.074-.106h-.012a9.271,9.271,0,0,0,1.258-4.673" transform="translate(-18.989 1)" fill="none" stroke="#ec5e20" stroke-width="2"/></svg></div><ul class="tag-place">';
59      $('fieldset[data-drupal-selector="edit-field-tag-target-id"]')
60        .find("input")
61        .each(function () {
62          var value = $(this).attr("value");
63          var text = $(this).siblings().text();
64          newhtml =
65            newhtml + '<li data-value="' + value + '">
65' + text + "</li>";
66        });
67      newhtml = newhtml + "</ul></div></div>";
68      //console.log(newhtml);
69      $(newhtml).insertAfter(
70        'fieldset[data-drupal-selector="edit-field-category-target-id"] .fieldset-wrapper'
71      );
72
73      $(".tag-place").hide();
74      $(".select-styled").on("click", function () {
75        $(this).toggleClass("active");
76        $(".tag-place").slideToggle("slow");
77      });
78      $(".tag-place li").on("click", function () {
79        var value = $(this).attr("data-value");
80        $('fieldset[data-drupal-selector="edit-field-tag-target-id"]')
81          .find("input")
82          .each(function () {
83            var input_val = $(this).attr("value");
84            if (input_val == value) {
85              $(this).trigger("click");
86            }
87          });
88      });
89    }
90  });
91
92  ///////// on scroll animation
93  $.fn.visible = function (partial) {
94    var $t = $(this),
95      $w = $(window),
96      viewTop = $w.scrollTop(),
97      viewBottom = viewTop + $w.height(),
98      _top = $t.offset().top,
99      _bottom = _top + $t.height(),
100      compareTop = partial === true ? _bottom : _top,
101      compareBottom = partial === true ? _top : _bottom;
102
103    return compareBottom <= viewBottom && compareTop >= viewTop;
104  };
105  $(window).on("scroll load", function (event) {
106    $(
107      ".animate-h h1, .animate-h h2, .cta-text.animate-h h3,.animate-element, .banner-wrapper h1,.node-65 .text-formatted h2"
108    ).each(function (i, el) {
109      var el = $(el);
110      if (el.visible(true)) {
111        el.addClass("active");
112      } else {
113        el.removeClass("active");
114      }
115    });
116  });
117  ///////// on scroll animation end
118
119  $(document).mouseup(function (e) {
120    var container = $(".search-form-main-menu, .open-search");
121    var containerx = $(".search-form-main-menu");
122    // if the target of the click isn't the container nor a descendant of the container
123    if (!container.is(e.target) && container.has(e.target).length === 0) {
124      containerx.slideUp(300);
125      containerx.toggleClass("active-search");
126    }
127  });
128
129  /////fb-swiper start
130  function updateFacebookFeedProgress(swiper) {
131    if (!swiper || !swiper.el) {
132      return;
133    }
134
135    var total = swiper.snapGrid && swiper.snapGrid.length ? swiper.snapGrid.length : 1;
136    var index = typeof swiper.snapIndex === "number" ? swiper.snapIndex : swiper.activeIndex || 0;
137    var progress = total <= 1 ? 1 : (index + 1) / total;
138
139    progress = Math.max(0, Math.min(1, progress));
140    $(swiper.el)
141      .closest(".facebook-feed-block")
142      .find(".swiper-btn-wrapper")
143      .css("--fb-progress", progress);
144  }
145
146  var temp_swiper = new Swiper(".facebook-feed", {
147    // or 'auto'
148    slidesPerView: 1,
149    spaceBetween: 10,
150    paginationClickable: true,
151    autoplay: {
152      delay: 5000,
153    },
154    loop: false,
155    navigation: {
156      nextEl: ".swiper-btn-wrapper .swiper-button-next",
157      prevEl: ".swiper-btn-wrapper .swiper-button-prev",
158    },
159    breakpoints: {
160      768: {
161        slidesPerView: 2,
162        spaceBetween: 20,
163      },
164      992: {
165        slidesPerView: 2,
166        spaceBetween: 24,
167      },
168      1280 : {
169        slidesPerView: 3,
170        spaceBetween: 24,
171      }
172    },
173  });
174
175  if (temp_swiper && typeof temp_swiper.on === "function") {
176    ["init", "slideChange", "transitionEnd", "resize", "breakpoint"].forEach(function (eventName) {
177      temp_swiper.on(eventName, function () {
178        updateFacebookFeedProgress(temp_swiper);
179      });
180    });
181    setTimeout(function () {
182      updateFacebookFeedProgress(temp_swiper);
183    }, 100);
184  }
185  ////fb-swiper end
186
187  $(document).ready(function () {
188    /////menu timelineclasses
189
190    $(".timeline-item").parent().parent().addClass("timeline-wrapper");
191    $(".timeline-item").parent().parent().parent().addClass("timeline-outer");
192    $(".start-year").each(function () {
193      var start_year = $(this).text();
194      start_final = $.trim(start_year);
195      console.log($(this).parent().find("end-year").length);
196      if ($(this).parent().find(".end-year").length > 0) {
197        var end_year = $(this).parent().find(".end-year").text();
198        end_final = $.trim(end_year);
199        console.log(end_final);
200        console.log(start_final);
201        let start_int = parseInt(start_final, 10);
202        let end_int = parseInt(end_final, 10);
203        $(this).parent().parent().addClass("multiple-year");
204        $(this)
205          .parent()
206          .parent()
207          .addClass("year" + (end_int - start_int));
208      } else {
209        $(this).parent().parent().addClass("single-year");
210      }
211    });
212
213    if ($(".hyperlinks").length) {
214      $(".hyperlinks")
215        .find("a")
216        .each(function () {
217          $(this).attr("target", "_blank");
218        });
219    }
220    if ($("body").hasClass("page-node-type-home")) {
221      if ($(".home-event-item").length == 0) {
222        $(".content-bottom-outer").remove();
223      }
224    }
225    if (
226      $("body").hasClass("page-node-type-actualites") ||
227      $("body").hasClass("page-node-type-ressources")
228    ) {
229      $(".paragraph--type--youtube-link")
230        .find(".youtube-iframe")
231        .addClass("container");
232    }
233
234    $(".return").on("click", function () {
235      history.go(-1);
236    });
237    var pathname = window.location.pathname;
238    var lang = $("html").attr("lang");
239    if (pathname == "/node/18" || pathname == "/fichiers-en-telechargement") {
240      if ($.cookie("espace") != "foo") {
241        window.location = "/espace-presse";
242      }
243    }
244    if ($(".node-31").length) {
245      if ($.cookie("document_inn") != "foo") {
246        if (lang == "es") {
247          window.location = "/es/los-espacios";
248        } else if (lang == "en") {
249          window.location = "/en/spaces";
250        } else {
251          window.location = "/les-espaces";
252        }
253      }
254    }
255    $(".play-pause-button").on("click", function () {
256      if ($(this).hasClass("audio-played")) {
257        $(this).removeClass("audio-played");
258        $(this).parent().removeClass("animate-audio");
259        $(this).parent().find("audio").trigger("pause");
260      } else {
261        $(".play-pause-button").each(function () {
262          $(this).parent().removeClass("animate-audio");
263          $(this).removeClass("audio-played");
264          $(this).parent().find("audio").trigger("pause");
265        });
266        $(this).addClass("audio-played");
267        $(this).parent().addClass("animate-audio");
268        $(this).parent().find("audio").trigger("play");
269      }
270    });
271    $(".open-search").on("click", function () {
272      $(this).toggleClass("active-search");
273      $(".search-form-main-menu").slideToggle(300);
274    });
275
276    $(".banner-bottom .left_title").on("click", function () {
277      $(".banner-bottom  .right-links").toggleClass("active-search");
278      $(".banner-bottom  .right-links").slideToggle(300);
279    });
280
281    if ($(".view-la-programmation-hors-les-murs").length) {
282      var newhtml =
283        '<div class="tag-wrap"><div class="tag-wrap-inner">  <div class="select-styled"><svg xmlns="http://www.w3.org/2000/svg" width="20.775" height="28.447" viewB
283ox="0 0 20.775 28.447"><path id="Location" d="M33.894,9.344A4.694,4.694,0,1,1,29.2,4.672a4.683,4.683,0,0,1,4.694,4.672m4.87,0a9.387,9.387,0,1,0-16.61,5.968L29.384,25.7l7.336-10.536a9.234,9.234,0,0,0,.723-1.038l.074-.106h-.012a9.271,9.271,0,0,0,1.258-4.673" transform="translate(-18.989 1)" fill="none" stroke="#ec5e20" stroke-width="2"/></svg></div><ul class="tag-place">';
284      $('fieldset[data-drupal-selector="edit-field-tag-target-id"]')
285        .find("input")
286        .each(function () {
287          var value = $(this).attr("value");
288          var text = $(this).siblings().text();
289          newhtml =
290            newhtml + '<li data-value="' + value + '">' + text + "</li>";
291        });
292      newhtml = newhtml + "</ul></div></div>";
293      //console.log(newhtml);
294      $(newhtml).insertAfter(
295        'fieldset[data-drupal-selector="edit-field-category-target-id"] .fieldset-wrapper'
296      );
297
298      $(".tag-place").hide();
299      $(".select-styled").on("click", function () {
300        $(this).toggleClass("active");
301        $(".tag-place").slideToggle("slow");
302      });
303      $(".tag-place li").on("click", function () {
304        var value = $(this).attr("data-value");
305        $('fieldset[data-drupal-selector="edit-field-tag-target-id"]')
306          .find("input")
307          .each(function () {
308            var input_val = $(this).attr("value");
309            if (input_val == value) {
310              $(this).trigger("click");
311            }
312          });
313      });
314    }
315
316    if (".page-node-type-temporary-exhibition".length) {
317      $(".paragraph--type--image").addClass("single-image-container");
318    }
319    applyWhenElementExists(
320      'input[type="checkbox"]',
321      function () {
322        if ($(".node-80").length || $(".node-145").length) {
323          var anchortext = [];
324          $(".field--name-field-anchores .field__item").each(function (i) {
325            var text = $(this).text();
326            var newone = text.split(" ");
327            var attr = newone.join("-");
328            anchortext[i] = attr;
329          });
330          $(".content-wrapper h2").each(function (j) {
331            $(this).addClass(anchortext[j]);
332          });
333          $(".field--name-field-anchores .field__item").on(
334            "click",
335            function () {
336              var text = $(this).text();
337              var newone = text.split(" ");
338              var attr = newone.join("-");
339              $("html, body").animate(
340                {
341                  scrollTop: $("." + attr).offset().top - 160,
342                },
343                2000
344              );
345            }
346          );
347
348          $(".accordian-text").hide();
349          $(".accordian-title").on("click", function () {
350            if (!$(this).hasClass("active")) {
351              $(".accordian-title").removeClass("active");
352              $(".accordian-text").slideUp();
353              $(this).addClass("active");
354              $(this).siblings().slideDown();
355            } else {
356              $(this).removeClass("active");
357              $(this).siblings().slideUp();
358            }
359          });
360        }
361      },
362      50
363    );
364
365    if ($(".node-77").length) {
366      $(".field--name-field-years .field__item").first().addClass("active");
367      $(".field--name-field-years .field__item").on("click", function () {
368        $(".field--name-field-years .field__item").removeClass("active");
369        var year = $(this).text();
370        var newy = year.split("/");
371        if (newy.length == 1) {
372          var year1 = newy[0].split(" ");
373          if (year1.length == 1) {
374            year = year1[0];
375          } else {
376            year = year1[1];
377          }
378        } else {
379          year = newy[0];
380        }
381        $(this).addClass("active");
382        $("html, body").animate(
383          {
384            scrollTop: $("." + year + "d").offset().top - 75,
385          },
386          2000
387        );
388      });
389
390      $(document).on("scroll", function () {
391        var scroll_top = $(window).scrollTop();
392        $(".our-history-item").each(function () {
393          var year = $(this).find(".year").text();
394          year = $.trim(year);
395          var height = $(this).offset().top - 150;
396          var inner_height = $(this).innerHeight();
397          if (scroll_top >= height && scroll_top <= height + inner_height) {
398            $(".field--name-field-years .field__item").each(function () {
399              var new_year = $(this).text();
400              if (new_year == year) {
401                $(".field--name-field-years .field__item").removeClass(
402                  "active"
403                );
404                $(this).addClass("active");
405              }
406            });
407          }
408        });
409      });
410    }
411
412    $(".submit-map").on("click", function () {
413      var input_passs = $(".input-for-direction").find("input").val();
414      var s = input_passs.replace(/\ /g, "+");
415      var s = s.replace(/\,/g, "+");
416      window.open(
417        "https://www.google.com/maps/dir/Memorial+De+Rivesaltes,+avenue+Christian+Bourquin,+66600+Salses-le-Ch%C3%A2teau,+France/" +
418          s,
419        "_blank"
420      );
421    });
422
423    if ($(".path-actualites").length) {
424      $(".split-date").each(function () {
425        var for_date = $(this).text();
426        var datter = for_date.split(" ");
427        $(this).text(" ");
428        var date =
429          '<div class="date-formater"><div class="day">' +
430          datter[0] +
431          '</div><div class="my-wrap"><div class="month">' +
432          datter[1] +
433          '</div><div class="year">' +
434          datter[2] +
435          "</div></div></div>";
436        $(this).append(date);
437      });
438    } else {
439      $(".split-date time").each(function () {
440        var for_date = $(this).text();
441        $(this).addClass("dated");
442        var datter = for_date.split(" ");
443        $(this).text(" ");
444        var date =
445          '<div class="date-formater"><div class="day">' +
446          datter[0] +
447          '</div><div class="my-wrap"><div class="month">' +
448          datter[1] +
449          '</div><div class="year">' +
450          datter[2] +
451          "</div></div></div>";
452        $(date).insertAfter(this);
453      });
454    }
455    markEmptyDateHours();
456    if ($(".node-1").length || $(".node-105").length) {
457      if ($.cookie("info") == "foo") {
458      } else {
459        $(".launchinfo").trigger("click");
460      }
461      $.cookie("info", "foo", { expires: 365 });
462    }
463    $("#lightgallery").lightGallery();
464
465    // header-fixed js
466
467    var $height = $(".header").height();
468    $(window).scroll(function () {
469      var scroll = $(window).scrollTop();
470      if (scroll >= $height) {
471        $(".header").addClass("sticky");
472        $("body").addClass("header-fixed");
473      } else {
474        $(".header").removeClass("sticky");
475        $("body").removeClass("header-fixed");
476      }
477    });
478    // end header-fixed js
479    /*  toggle mobile menu */
480    $(window).resize(function () {
481      var width_screen = window.innerWidth;
482      if (width_screen >= 991) {
483        $("body").removeClass("menu-is-open");
484        $(".submenu-wrap").show();
485        $(".has-children").removeClass("active");
486      } else {
487        $(".submenu-wrap").hide();
488      }
489    });
490    $(".menu-toggle").on("click", function () {
491      if ($("body").hasClass("menu-is-open")) {
492        $(".submenu-wrap").hide();
493        $(".has-children").removeClass("active");
494      }
495      $("body").toggleClass("menu-is-open");
496    });
497    $(".has-children").on("click", function () {
498      if ($("body").hasClass("menu-is-open")) {
499        if ($(this).hasClass("active")) {
500          $(this).removeClass("active");
501          $(this).siblings().slideUp();
502        } else {
503          $(".submenu-wrap").hide();
504          $(".has-children").removeClass("active");
505          $(this).addClass("active");
506          $(this).siblings().slideDown();
507        }
508      }
509    });
510    /*  toggle mobile menu */
511
512    /////////LES ÉDITIONS DU MÉMORIAl
513    if ($(".view-les-editions-du-memorial").length) {
514      $(".summary").each(function () {
515        $(this).addClass("open-ajax");
516      });
517      $(".open-ajax").on("click", function () {
518        $(this).siblings().slideToggle();
519        $(this).toggleClass("active");
520      });
521      memorial_edition();
522    }
523
524    if ($(".node-65").length) {
525      setTimeout(function () {
526        //do something special
527        $("#edit-type-de-demande option").first().remove();
528      }, 2000);
529    }
530    /////////LES ÉDITIONS DU MÉMORIAL end
531    $(".to-open-newletter").on("click", function () {
532      $(".launchnewletterpopup").trigger("click");
533    });
534    var home_swiper = new Swiper(".home-banner-swiper", {
535      loop: true,
536      paginationClickable: true,
537      pagination: {
538        el: ".home-banner-paginaiton",
539        clickable: true,
540      },
541      autoplay: {
542        delay: 5000,
543      },
544      navigation: {
545        nextEl: ".home-banner-next",
546        prevEl: ".home-banner-prev",
547      },
548    });
549
550    var arc_swiper = new Swiper(".arc-swiper", {
551      loop: true,
552      paginationClickable: true,
553      spaceBetween: 10,
554      pagination: {
555        el: ".arc-paginaiton",
556        clickable: true,
557      },
558      autoplay: {
559        delay: 5000,
560      },
561      navigation: {
562        nextEl: ".arc-next",
563        prevEl: ".arc-prev",
564      },
565    });
566    var mp3_swiper = new Swiper(".mp3-swiper", {
567      paginationClickable: true,
568      pagination: {
569        el: ".arc-paginaiton",
570        clickable: true,
571      },
572      navigation: {
573        nextEl: ".mp3-next",
574        prevEl: ".mp3-prev",
575      },
576    });
577
578    var resources = new Swiper(".resources-swiper", {
579      loop: true,
580      paginationClickable: true,
581      spaceBetween: 10,
582      pagination: {
583        el: ".temp-exhibition-paginaiton",
584        clickable: true,
585      },
586      autoplay: {
587        delay: 5000,
588      },
589      navigation: {
590        nextEl: ".resources-next",
591        prevEl: ".resources-prev",
592      },
593    });
594
595    if ($(".node-1").length || $(".node-105").length) {
596      if ($(".temp-exhibition-swiper .swiper-slide").length < 3) {
597        if ($(".temp-exhibition-swiper .swiper-slide").length == 1) {
598          $(".view-single-temporary-exhibition").find(".time").hide();
599          $(".view-single-temporary-exhibition").find(".title").hide();
600          $(".view-single-temporary-exhibition")
601            .find(".short-description")
602            .hide();
603          $(".view-single-temporary-exhibition").find(".link").hide();
604          $(".view-single-temporary-exhibition")
605            .find(".temporary-event")
606            .addClass("single-event-home");
607        }
608        $(".temp-exhibition-swiper").addClass("non-slider-content");
609        $(".navigation-pagination").hide();
610      } else {
611        var temp_swiper = new Swiper(".temp-exhibition-swiper", {
612          // or 'auto'
613          slidesPerColumn: 2,
614          slidesPerGroup: 2,
615          slidesPerColumnFill: "row",
616          paginationClickable: true,
617          pagination: {
618            el: ".temp-exhibition-paginaiton",
619            clickable: true,
620          },
621          autoplay: {
622            delay: 5000,
623          },
624          navigation: {
625            nextEl: ".temp-exhibition-next",
626            prevEl: ".temp-exhibition-prev",
627          },
628        });
629      }
630
631      var imge_url = $(".temporary-event-inner").data("url");
632      $(".temporary-event-inner")
633        .parent()
634        .css("background-image", "url(" + imge_url + ")");
635
636      // Rendre la vignette "exposition temporaire" cliquable vers l'URL editable au BO
637      // (le lien existe dans .title a / .link a mais est masque par le code ci-dessus).
638      $(".view-single-temporary-exhibition .temporary-event").each(function () {
639        var $event = $(this);
640        if ($event.children("a.temporary-event-link").length) {
641          return;
642        }
643        var $src = $event
644          .find(".temporary-event-inner .title a, .temporary-event-inner .link a")
645          .first();
646        var url = $src.attr("href");
647        if (url) {
648          $("<a>", {
649            class: "temporary-event-link",
650            href: url,
651            "aria-label": ($src.text() || "En savoir plus").trim(),
652          }).appendTo($event);
653        }
654      });
655    }
656    /////end home page
657
658    var menu1 = [];
659    var i = 0;
660    $(".date-day").each(function () {
661      menu1[i] = $(this).attr("data-day");
662      i++;
663    });
664    //console.log(menu1);
665    var psb_swiper = new Swiper(".lp-swiper", {
666      pagination: {
667        el: ".lp-paginaiton",
668        clickable: true,
669        renderBullet: function (index, className) {
670          return '<span class="' + className + '">' + menu1[index] + "</span>";
671        },
672      },
673      autoplay: {
674        delay: 5000,
675      },
676      navigation: {
677        nextEl: ".lp-next",
678        prevEl: ".lp-prev",
679      },
680    });
681    ////permanent exibition
682
683    var menu = [];
684    var i = 0;
685    $(".for-pagination").each(function () {
686      menu[i] = $(this).data("title");
687      i++;
688    });
689    var psb_swiper = new Swiper(".psb-swiper", {
690      spaceBetween: 30,
691      pagination: {
692        el: ".psb-paginaiton",
693        clickable: true,
694        renderBullet: function (index, className) {
695          return '<span class="' + className + '">' + menu[index] + "</span>";
696        },
697      },
698      autoplay: {
699        delay: 5000,
700      },
701      navigation: {
702        nextEl: ".psb-next",
703        prevEl: ".psb-prev",
704      },
705    });
706    $(".psb-swiper").mouseenter(function () {
707      psb_swiper.autoplay.stop();
708      // console.log('slider stopped');
709    });
710
711    $(".psb-swiper").mouseleave(function () {
712      psb_swiper.autoplay.start();
713      //console.log('slider started again');
714    });
715
716    var fws_swiper = new Swiper(".fws-swiper", {
717      loop: true,
718      autoplay: {
719        delay: 5000,
720      },
721      navigation: {
722        nextEl: ".fws-next",
723        prevEl: ".fws-prev",
724      },
725    });
726    ////permanent exibition end
727
728    ////temporary page
729    var ows_swiper = new Swiper(".ows-swiper", {
730      loop: true,
731      autoplay: {
732        delay: 5000,
733      },
734      navigation: {
735        nextEl: ".ows-next",
736        prevEl: ".ows-prev",
737      },
738    });
739
740    $(".te-item-bg").each(function () {
741      var img = $(this).attr("data-img");
742      $(this).css("background-image", "url(" + img + ")");
743    });
744    ////temporary page end
745
746    ////accordian
747    $(".answer").hide();
748    $(".answer").first().siblings().addClass("active");
749    $(".answer").first().show();
750    $(".queston").on("click", function () {
751      if (!$(this).hasClass("active")) {
752        $(".answer").slideUp();
753        $(".queston").removeClass("active");
754        $(this).addClass("active");
755        $(this).siblings().slideDown();
756      } else {
757        $(this).removeClass("active");
758        $(this).siblings().slideUp();
759      }
760    });
761    ////accordian end
762    if ($(".node-54").length) {
763      $(".for-desktop")
764        .find(".field--name-field-title")
765        .first()
766        .parent()
767        .addClass("active");
768      $(".for-desktop")
769        .find(".field--name-field-title")
770        .on("click", function () {
771          $(".for-desktop")
772            .find(".field--name-field-title")
773            .parent()
774            .removeClass("active");
775          $(this).parent().addClass("active");
776          var t1 = $(this).text();
777          $(".for-mobile")
778            .find(".field--name-field-title")
779            .each(function () {
780              var t2 = $(this).text();
781              if (t1 == t2) {
782                $(this).parent().trigger("click");
783              }
784            });
785        });
786    }
787
788    if ($(".node-366").length) {
789      $(".for-desktop")
790        .find(".field--name-field-title")
791        .first()
792        .parent()
793        .addClass("active");
794      $(".for-desktop")
795        .find(".field--name-field-title")
796        .on("click", function () {
797          $(".for-desktop")
798            .find(".field--name-field-title")
799            .parent()
800            .removeClass("active");
801          $(this).parent().addClass("active");
802          var t1 = $(this).text();
803          $(".for-mobile")
804            .find(".field--name-field-title")
805            .each(function () {
806              var t2 = $(this).text();
807              if (t1 == t2) {
808                $(this).parent().trigger("click");
809              }
810            });
811        });
812    }
813
814    /* To test the click event */
815    if ($(".node-19").length || $(".node-556").length ) {
816      $(".for-desktop")
817        .find(".field--name-field-tab-title")
818        .first()
819        .parent()
820        .addClass("active");
821      $(".for-desktop")
822        .find(".field--name-field-tab-title")
823        .on("click", function () {
824          $(".for-desktop")
825            .find(".field--name-field-tab-title")
826            .parent()
827            .removeClass("active");
828          $(this).parent().addClass("active");
829          var t1 = $(this).text();
830          $(".for-mobile")
831            .find(".field--name-field-tab-title")
832            .each(function () {
833              var t2 = $(this).text();
834              if (t1 == t2) {
835                $(this).parent().trigger("click");
836              }
837            });
838        });
839    }
840    ///L'EPCC
841    $(".field--name-field-other-content .tab-text").hide(300);
842    $(".field--name-field-other-content .tab-text").first().show(300);
843    $(".field--name-field-other-content .tab-text")
844      .first()
845      .siblings()
846      .addClass("active");
847    $(".field--name-field-other-content .tab-title").on("click", function () {
848      if (!$(this).hasClass("active")) {
849        $(".field--name-field-other-content .tab-text").hide(300);
850        $(".field--name-field-other-content .tab-title").removeClass("active");
851        if ($(window).width() >= 768) {
852          $(this).addClass("active");
853          $(this).siblings().show(300);
854        }
855      }
856      if ($(window).width() <= 767) {
857        $(this).toggleClass("active");
858        $(this).siblings().slideToggle(300);
859      }
860    });
861    if ($(".node-49").length || $(".node-64").length) {
862      var tech = getUrlParameter("id");
863      if (typeof tech !== "undefined") {
864        if (tech == 7) {
865          setTimeout(function () {
866            //do something special
867            $("#edit-sujet option:eq(4)").prop("selected", true);
868          }, 2000);
869        } else {
870          setTimeout(function () {
871            //do something special
872            $("#edit-sujet option:eq(3)").prop("selected", true);
873          }, 2000);
874        }
875      }
876
877      initMap();
878    }
879    ///L'EPCC end
880    ///espreess page
881    $('input[name="password"]').keypress(function (e) {
882      var key = e.which;
883
884      if (key == 13) {
885        // the enter key code
886        $(".form").find(".submit").trigger("click");
887      }
888    });
889    $(".les-doc").on("click", function () {
890      $(".launchpassword").trigger("click");
891      $(".error-message").hide();
892    });
893    var password1 = $('input[name="password"]').data("dummy");
894    $('input[name="password"]').removeAttr("data-dummy");
895    ///espreess page end
896    $(".form")
897      .find(".submit")
898      .on("click", function () {
899        $(".error-message").hide();
900        var input_passs = $(".form").find("input").val();
901        if (input_passs == password1) {
902          window.location = $(".popup-open .button").data("link");
903          var date = new Date();
904          var minutes = 2;
905          date.setTime(date.getTime() + minutes * 60 * 1000);
906          if ($(".node-52").length) {
907            $.cookie("document_inn", "foo", { expires: date });
908          } else {
909            $.cookie("espace", "foo", { expires: date });
910          }
911        } else {
912          $(".error-message").slideDown();
913        }
914      });
915
916
917      /*accordion js Start*/
918              $(".acc-title").click(function() {
919                var content = $(this).next(".acc-content");
920                var arrow = $(this).find(".arrow");
921                content.slideToggle();
922                $(this).toggleClass("active");
923                $(".acc-content").not(content).slideUp();
924                $(".acc-title").not(this).removeClass("active");
925            });
926      /*accordion js End*/
927  });
928
929  var getUrlParameter = function getUrlParameter(sParam) {
930    var sPageURL = decodeURIComponent(window.location.search.substring(1)),
931      sURLVariables = sPageURL.split("&"),
932      sParameterName,
933      i;
934
935    for (i = 0; i < sURLVariables.length; i++) {
936      sParameterName = sURLVariables[i].split("=");
937
938      if (sParameterName[0] === sParam) {
939        return sParameterName[1] === undefined ? true : sParameterName[1];
940      }
941    }
942  };
943  function memorial_edition() {
944    $(".summary-text").hide();
945    var selected = $('input[type="radio"]:checked').val();
946    if (selected != "All") {
947      //var for_cat=$('.memo-edition-item').first().attr('data-ctitle');
948      //console.log(for_cat);
949      var texo_html = $("#i" + selected + "i").html();
950
951      //var texo_html = ($('.categoery-with-description').first().html());
952      var new_texo = '<div class="texo-text">' + texo_html + "</div>";
953
954      if ($(".views-row").length && $(".view-empty").length == 0) {
955        $(new_texo).insertAfter(".view-filters");
956      }
957    }
958    $(".book-item").each(function () {
959      var value = $(this).text();
960      var value1 = value.split(":");
961      if (value1[1] == "" || value1[1] == " " || value1[1] == "  ") {
962        $(this).hide();
963      }
964    });
965  }
966  if (document.getElementById("mapid") && typeof L !== "undefined") {
967    var orangeIcon = L.icon({
968      iconUrl: "/themes/memo/images/Location.png",
969
970      iconSize: [21, 29], // size of the icon
971    });
972    var mymap = L.map("mapid").setView([42.808993, 2.892152], 13);
973    L.marker([42.808993, 2.892152], { icon: orangeIcon }).addTo(mymap);
974    // L.geoJSON(geojsonFeature).addTo(mymap);
975    L.tileLayer(
976      "https://api.mapbox.com/styles/v1/{id}/tiles/{z}/{x}/{y}?access_token={accessToken}",
977      {
978        attribution:
979          'Map data &copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors, Imagery © <a href="https://www.mapbox.com/">Mapbox</a>',
980        maxZoom: 18,
981        id: "mapbox/streets-v11",
982        tileSize: 512,
983        zoomOffset: -1,
984        accessToken:
985          "pk.eyJ1IjoicmVtaWYiLCJhIjoiY2t2MmNkenBwMDh1ZDJvcDFjbG1zY2xzdiJ9.q2dDA0LtESuRrGbw7Z5_1Q",
986      }
987    ).addTo(mymap);
988  }
989  var map;
990  function initMap() {
991    var myLatLng = { lat: 42.8089187, lng: 2.891711 };
992    var zoom = 11;
993    // 43.6040014,1.4360988 43.6040043,1.4359392 43.6049143,1.4359204
994    //var center= {lat: 43.6042801, lng: 1.4404145},
995    var map = new google.maps.Map(document.getElementById("map"), {
996      zoom: zoom,
997      center: { lat: 42.8089187, lng: 2.891711 },
998      styles: [
999        {
1000          elementType: "geometry",
1001          stylers: [
1002            {
1003              color: "#cfc1a5",
1004            },
1005          ],
1006        },
1007        {
1008          elementType: "labels.icon",
1009          stylers: [
1010            {
1011              visibility: "off",
1012            },
1013          ],
1014        },
1015        {
1016          elementType: "labels.text.fill",
1017          stylers: [
1018            {
1019              color: "#181b2f",
1020            },
1021            {
1022              weight: 1.5,
1023            },
1024          ],
1025        },
1026        {
1027          elementType: "labels.text.stroke",
1028          stylers: [
1029            {
1030              color: "#f5f5f5",
1031            },
1032          ],
1033        },
1034        {
1035          featureType: "poi",
1036          elementType: "geometry",
1037          stylers: [
1038            {
1039              color: "#eeeeee",
1040            },
1041          ],
1042        },
1043        {
1044          featureType: "poi",
1045          elementType: "labels.text.fill",
1046          stylers: [
1047            {
1048              color: "#757575",
1049            },
1050          ],
1051        },
1052        {
1053          featureType: "poi.park",
1054          elementType: "geometry",
1055          stylers: [
1056            {
1057              color: "#e9dbc4",
1058            },
1059          ],
1060        },
1061        {
1062          featureType: "poi.park",
1063          elementType: "labels.text.fill",
1064          stylers: [
1065            {
1066              color: "#9e9e9e",
1067            },
1068          ],
1069        },
1070        {
1071          featureType: "road",
1072          elementType: "geometry",
1073          stylers: [
1074            {
1075              color: "#867a69",
1076            },
1077            {
1078              weight: 1,
1079            },
1080          ],
1081        },
1082        {
1083          featureType: "road.arterial",
1084          elementType: "labels.text.fill",
1085          stylers: [
1086            {
1087              color: "#757575",
1088            },
1089          ],
1090        },
1091        {
1092          featureType: "road.highway",
1093          elementType: "geometry",
1094          stylers: [
1095            {
1096              color: "#867a69",
1097            },
1098          ],
1099        },
1100        {
1101          featureType: "road.highway",
1102          elementType: "labels.text.fill",
1103          stylers: [
1104            {
1105              color: "#616161",
1106            },
1107          ],
1108        },
1109        {
1110          featureType: "road.local",
1111          elementType: "labels.text.fill",
1112          stylers: [
1113            {
1114              color: "#9e9e9e",
1115            },
1116          ],
1117        },
1118        {
1119          featureType: "transit.line",
1120          elementType: "geometry",
1121          stylers: [
1122            {
1123              color: "#e5e5e5",
1124            },
1125          ],
1126        },
1127        {
1128          featureType: "transit.station",
1129          elementType: "geometry",
1130          stylers: [
1131            {
1132              color: "#eeeeee",
1133            },
1134          ],
1135        },
1136        {
1137          featureType: "water",
1138          elementType: "geometry",
1139          stylers: [
1140            {
1141              color: "#272a49",
1142            },
1143          ],
1144        },
1145        {
1146          featureType: "water",
1147          elementType: "labels.text.fill",
1148          stylers: [
1149            {
1150              color: "#9e9e9e",
1151            },
1152          ],
1153        },
1154      ],
1155    });
1156
1157    new google.maps.Marker({
1158      position: myLatLng,
1159      map,
1160      title: "Memorial",
1161      icon: "/themes/memo/images/Location.png",
1162    });
1163  }
1164})(jQuery);

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.