PageSourceSearch

https://acm.mc/wp-content/themes/acm-2025/assets/js/acm.js?ver=1789115635

js acm.mc collected 2026-10-02 05:30:13 UTC 17,951 bytes, 654 lines download raw bytes

1jQuery(document).ready(function($){
2
3    // $('input[name=inlineRadioOptions]').on('click', function(event) {
4    //     console.log($(this).val());
5    //     $('.affiche-container').show();
6    //     $('.affiche-container:not(.'+$(this).val()+')').hide('fast');
7    // });
8
9
10
11   /* ON CLICK / MOUSENTER / ETC */
12
13    let hideTimeout;
14
15    $('.bt-menu').on('mouseenter', function () {
16        clearTimeout(hideTimeout); // annule le timeout s’il existe
17
18        $('.row-menu-hover').removeClass('menu-hover-active');
19        $('.bt-menu').removeClass('active');
20
21        const menuid = $(this).data('menu');
22        $('#menu-hover' + menuid).addClass('menu-hover-active');
23        $('.bt-menu[data-menu="' + menuid + '"]').addClass('active');
24    });
25
26    $('.row-menu-hover, .bt-menu').on('mouseleave', function () {
27        hideTimeout = setTimeout(() => {
28            $('.row-menu-hover').removeClass('menu-hover-active');
29            $('.bt-menu').removeClass('active');
30        }, 250);
31    });
32
33    $('.row-menu-hover, .bt-menu').on('mouseenter', function () {
34        clearTimeout(hideTimeout); // si on revient dans le menu ou sur un bouton, on annule le timeout
35    });
36
37    $('.zone-logo-burger').on('mouseenter',function(event) {
38        $('.row-menu-hover').removeClass('menu-hover-active');
39    });
40
41    $('.zone-langues').on('mouseenter',function(event) {
42        $('.row-menu-hover').removeClass('menu-hover-active');
43    });
44
45    $('.header-top').on('mouseenter',function(event) {
46        $('.row-menu-hover').removeClass('menu-hover-active');
47    });
48
49    $('.icone-burger').on('click',function(event) {
50        $('.menu-burger').addClass('menu-burger-active');
51    });
52
53    $('.icone-burger-close').on('click',function(event) {
54        $('.menu-burger').removeClass('menu-burger-active');
55        $('.part-right').removeClass('part-right-visible');
56    });
57
58    $('.bt-responsive').on('click',function(event) {
59        var btid=$(this).data('responsive');
60        $('#contenu-part-right'+btid).addClass('part-right-visible');
61    });
62
63    $('.bt-responsive-close').on('click',function(event) {
64        $('.part-right').removeClass('part-right-visible');
65    });
66
67
68
69    /* FANCY APP */
70
71    Fancybox.bind(".gallery-icon a", {
72    });
73
74
75
76    /* SLICK SLIDERS */
77
78    $(".slider-homepage-content").slick({
79        infinite: true,
80        dots: false,
81        fade: true,
82        arrows: false,
83        autoplay: true,
84        autoplaySpeed: 4800,
85        speed: 500,
86        swipe: false,
87        pauseOnFocus: false,
88        pauseOnHover: false,
89        asNavFor: '.slider-homepage-nav'
90    });
91
92    $(".slider-homepage-nav").slick({
93        asNavFor: '.slider-homepage-content',
94        dots: false,
95        swipe: false,
96        speed: 500,
97        focusOnSelect: true,
98        pauseOnFocus: false,
99        pauseOnHover: false,
100        variableWidth: true,
101    });
102
103    $(".slider-homepage-prochaine-epreuve").slick({
104        slidesToShow: 1,
105        slidesToScroll: 1,
106        infinite: true,
107        dots: false,
108        arrows: true,
109        autoplay: false,
110        speed: 500,
111        focusOnSelect: true,
112        pauseOnFocus: true,
113        pauseOnHover: true,
114        responsive: [
115            {
116                breakpoint: 992,
117                settings: {
118                    slidesToShow: 1
119                }
120            },
121        ]
122    });
123
124    $(".slider-homepage-prochaines-epreuves").slick({
125        slidesToShow: 2,
126        slidesToScroll: 1,
127        infinite: true,
128        dots: false,
129        arrows: true,
130        autoplay: false,
131        speed: 500,
132        focusOnSelect: true,
133        pauseOnFocus: true,
134        pauseOnHover: true,
135        responsive: [
136            {
137                breakpoint: 992,
138                settings: {
139                    slidesToShow: 1,
140                }
141            },
142        ]
143    });
144
145    $(".slider-homepage-precedentes-epreuves").slick({
146        slidesToShow: 3,
147        slidesToScroll: 1,
148        infinite: true,
149        dots: false,
150        arrows: true,
151        autoplay: false,
152        speed: 500,
153        focusOnSelect: true,
154        pauseOnFocus: true,
155        pauseOnHover: true,
156        responsive: [
157            {
158                breakpoint: 992,
159                settings: {
160                    slidesToShow: 1
161                }
162            },
163        ]
164    });
165
166    $(".slider-actu-plein-format-background").slick({
167        infinite: true,
168        dots: false,
169        fade: true,
170        arrows: false,
171        speed: 500,
172        asNavFor: '.slider-actu-plein-format-nav',
173    });
174
175    $(".slider-actu-plein-format-nav").slick({
176        asNavFor: '.slider-actu-plein-format-background',
177        dots: false,
178        fade: true,
179        speed: 500,
180    });
181
182    $(".slider-logos-footer").slick({
183        slidesToShow: 5,
184        infinite: true,
185        dots: false,
186        arrows: false,
187        swipe: true,
188        autoplay: true,
189        autoplaySpeed: 4800,
190        speed: 500,
191        focusOnSelect: true,
192        pauseOnFocus: false,
193        pauseOnHover: false,
194        responsive: [
195            {
196                breakpoint: 992,
197                settings: {
198                    slidesToShow: 2
199                }
200            },
201        ]
202    });
203
204    $(".slider-actus-landing-epreuve").slick({
205        slidesToShow: 2,
206        infinite: true,
207        dots: false,
208        arrows: true,
209        swipe: true,
210        autoplay: true,
211        autoplaySpeed: 6000,
212        speed: 800,
213        focusOnSelect: true,
214        pauseOnFocus: true,
215        pauseOnHover: true,
216        responsive: [
217            {
218                breakpoint: 1200,
219                settings: {
220                    slidesToShow: 1
221                }
222            },
223            {
224                breakpoint: 992,
225                settings: {
226                    slidesToShow: 2
227                }
228            },
229            {
230                breakpoint: 768,
231                settings: {
232                    slidesToShow: 1
233                }
234            },
235        ]
236    });
237
238    $(".slider-box-partenaires").slick({
239        slidesToShow: 1,
240        infinite: true,
241        dots: false,
242        arrows: false,
243        swipe: true,
244        autoplay: true,
245        autoplaySpeed: 4800,
246        speed: 500,
247        focusOnSelect: true,
248        pauseOnFocus: false,
249        pauseOnHover: false,
250    });
251
252    $(".slider-galerie-image").slick({
253        slidesToShow: 3,
254        slidesToScroll: 1,
255        infinite: true,
256        dots: false,
257        arrows: true,
258        swipe: false,
259        autoplay: false,
260        autoplaySpeed: 4800,
261        speed: 500,
262        responsive: [
263            {
264                breakpoint: 1200,
265                settings: {
266                    slidesToShow: 2
267                }
268            },
269        ]
270    });
271
272    $(".slider-homepage-prochaines-epreuves-2025").slick({
273        slidesToShow: 3,
274        slidesToScroll: 1,
275        infinite: false,
276        dots: false,
277        arrows: true,
278        autoplay: false,
279        speed: 500,
280        focusOnSelect: true,
281        pauseOnFocus: true,
282        pauseOnHover: true,
283        responsive: [
284            {
285                breakpoint: 1400,
286                settings: {
287                    slidesToShow: 2
288                }
289            },
290            {
291                breakpoint: 992,
292                settings: {
293                    slidesToShow: 1
294                }
295            },
296            {
297                breakpoint: 768,
298                settings: {
299                    slidesToShow: 1,
300                    arrows: false,
301                    dots: true
302                }
303            },
304        ]
305    });
306
307    const totalNavItems = $('.slider-calendrier-homepage-2025-nav .slide').length;
308
309    $('.slider-calendrier-homepage-2025-for').slick({
310        slidesToShow: 1,
311        slidesToScroll: 1,
312        fade: true,
313        arrows: false,
314        infinite: false,
315        swipe: false,
316        draggable: false,
317        asNavFor: '.slider-calendrier-homepage-2025-nav'
318    });
319
320    $('.slider-calendrier-homepage-2025-nav').slick({
321        slidesToShow: totalNavItems,
322        slidesToScroll: 1,
323        asNavFor: '.slider-calendrier-homepage-2025-for',
324        focusOnSelect: true,
325        arrows: false,
326        infinite: false,
327        swipe: false,
328        draggable: false
329    });
330
331    $('.slider-actu-homepage-2025-for').slick({
332        slidesToShow: 1,
333        slidesToScroll: 1,
334        fade: true,
335        arrows: false,
336        autoplay: false,
337        speed: 800,
338        asNavFor: '.slider-actu-homepage-2025-nav'
339    });
340
341    $('.slider-actu-homepage-2025-nav').slick({
342        slidesToShow: 1,
343        slidesToScroll: 1,
344        focusOnSelect: true,
345        fade: true,
346        arrows: true,
347        infinite: true,
348        swipe: true,
349        draggable: true,
350        autoplay: false,
351        speed: 800,
352        pauseOnFocus: true,
353        pauseOnHover: true,
354        asNavFor: '.slider-actu-homepage-2025-for'
355    });
356
357    $(".slider-club-homepage-2025").slick({
358        slidesToShow: 1,
359        infinite: true,
360        fade: true,
361        dots: false,
362        arrows: true,
363        swipe: false
364    });
365
366    $(".main-landing-edition .slider-landing-pages-2025, .main-landing-epreuve-complete-v2 .slider-landing-pages-2025").slick({
367        slidesToShow: 4,
368        infinite: true,
369        dots: false,
370        arrows: true,
371        swipe: false,
372        responsive: [
373            {
374                breakpoint: 1200,
375                settings: {
376                    slidesToShow: 3,
377                }
378            },
379            {
380                breakpoint: 992,
381                settings: {
382                    slidesToShow: 2,
383                    arrows: false,
384                    dots: true,
385                    swipe: true
386                }
387            },
388            {
389                breakpoint: 576,
390                settings: {
391                    slidesToShow: 1,
392                    arrows: false,
393                    dots: true,
394                    swipe: true
395                }
396            },
397        ]
398    });
399
400    $(".main-landing-neutre .slider-landing-pages-2025, .main-landing-club-v2 .slider-landing-pages-2025").slick({
401        slidesToShow: 2,
402        infinite: true,
403        dots: false,
404        arrows: true,
405        swipe: false,
406        responsive: [
407            {
408                breakpoint: 1200,
409                settings: {
410                    arrows: false,
411                    dots: true,
412                    swipe: true
413                }
414            },
415            {
416                breakpoint: 576,
417                settings: {
418                    slidesToShow: 1,
419                    arrows: false,
420                    dots: true,
421                    swipe: true
422                }
423            },
424        ]
425    });
426
427    $(".slider-dernieres-actus-landing-2025").slick({
428        slidesToShow: 1,
429        infinite: true,
430        dots: false,
431        arrows: true,
432        swipe: false,
433        responsive: [
434            {
435                breakpoint: 576,
436                settings: {
437                    slidesToShow: 1,
438                    arrows: false,
439                    dots: true,
440                    swipe: true
441                }
442            },
443        ]
444    });
445
446    $(".slider-restaurant-landing-2025").slick({
447        slidesToShow: 1,
448        infinite: true,
449        dots: false,
450        arrows: true,
451        swipe: false,
452        autoplay: true,
453        autoplaySpeed: 3000,
454        speed: 1000,
455        responsive: [
456            {
457                breakpoint: 576,
458                settings: {
459                    slidesToShow: 1,
460                    arrows: false,
461                    dots: true,
462                    swipe: true,
463                    autoplay: false,
464                    autoplaySpeed: 3000,
465                    speed: 1000
466                }
467            },
468        ]
469    });
470
471
472
473    /* COLLAPSE DESC EPREUVE */
474
475    var $textePresentation = $('main.main-landing.tpl-2025 section.body-landing-pages .texte-presentation');
476    var $contenu = $textePresentation.find('.contenu-utilisateur');
477    var $button = $('main.main-landing.tpl-2025 section.body-landing-pages .button-texte-presentation');
478    var $shadow = $textePresentation.find('.shadow-overflow');
479
480    if ($contenu.outerHeight() < 480) {
481        $button.hide();
482        $shadow.hide();
483        $textePresentation.css('height', 'auto').attr('style', function(i, style) {
484            return (style || '') + 'height: auto !important;';
485        });
486    }
487
488
489
490    /* DIVERS */
491
492    var galWP = document.getElementById('gallery-1');
493
494    console.log(galWP);
495
496
497
498    function updateMarginHeaderHeight() {
499        var headerHeight = $('header').outerHeight();
500        $('.margin-header').css('height', headerHeight + 'px');
501      }
502
503      // Délai de 200ms après le chargement du DOM
504      setTimeout(function() {
505        updateMarginHeaderHeight();
506      }, 200);
507
508      // Recalcul si la fenêtre est redimensionnée
509      $(window).on('resize', function() {
510        updateMarginHeaderHeight();
511      });
512
513
514
515      function checkEpreuveHeight() {
516          var $box = $('.zone-affiche-epreuve .box-epreuve');
517          var boxHeight = $box.outerHeight();
518
519          if (boxHeight > 355) {
520            $box.css('height', '500px');
521            $('.zone-small-widget-landing-epreuve').hide();
522          }
523        }
524
525        // Délai pour s'assurer que tout est chargé
526        setTimeout(function() {
527          checkEpreuveHeight();
528        }, 200);
529
530
531    function ajusterHauteur() {
532        var $box = $('.main-landing-epreuve-complete-v2.tpl-2025 section.body-landing-pages .container-intro-page .box-intro-page');
533
534        if ($box.length) {
535            var hauteur = $box.outerHeight();
536            var nouvelleHauteur = hauteur - 145;
537
538            // Sécurité : empêche une hauteur négative
539            if (nouvelleHauteur < 0) {
540                nouvelleHauteur = 0;
541            }
542
543            // Application sur le parent
544            $box.closest('.container-intro-page').css('height', nouvelleHauteur + 'px');
545
546            console.log('Nouvelle hauteur appliquée au parent : ' + nouvelleHauteur + 'px');
547        }
548    }
549
550    // Exécution au chargement
551    ajusterHauteur();
552
553    // Fonction debounce pour limiter la fréquence du resize
554    var timer;
555    $(window).on('resize', function() {
556        clearTimeout(timer);
557        timer = setTimeout(function() {
558            ajusterHauteur();
559        }, 200); // délai de 200ms après la fin du redimensionnement
560    });
561
562
563    function verifierLiens() {
564        var $links = $('.main-landing-epreuve-complete-v2.tpl-2025 section.body-landing-pages .container-intro-page .box-intro-page .part-right .container-links .link-light-blue-2025');
565        var $abstract = $('.main-landing-epreuve-complete-v2.tpl-2025 section.body-landing-pages .container-intro-page .box-intro-page .part-left p.abstract');
566        var largeurFenetre = $(window).width();
567
568        // On retire la classe avant de recalculer (utile si on resize)
569        $abstract.removeClass('long-abstract');
570
571        if (largeurFenetre >= 1200 && largeurFenetre <= 1399) {
572            // Entre 1200px et 1399px → condition spéciale
573            if ($links.length > 4) {
574                $abstract.addClass('long-abstract');
575                console.log('Classe .long-abstract ajoutée (viewport 1200–1399px) - nombre de liens : ' + $links.length);
576            } else {
577                console.log('Pas assez de liens pour la plage 1200–1399px : ' + $links.length);
578            }
579        } else {
580            // En dehors de cette plage → condition normale
581            if ($links.length > 6) {
582                $abstract.addClass('long-abstract');
583                console.log('Classe .long-abstract ajoutée (autres résolutions) - nombre de liens : ' + $links.length);
584            } else {
585                console.log('Pas assez de liens (autres résolutions) : ' + $links.length);
586            }
587        }
588    }
589
590    // Revues Calameo : clic sur une couverture = lecteur du haut
591    $(document).on('click', '.revues-calameo__cover', function(event) {
592        event.preventDefault();
593
594        var $cover = $(this);
595        var $root = $cover.closest('.revues-calameo');
596        var embed = $cover.attr('data-embed');
597        var title = $cover.attr('data-title') || '';
598
599        if (!$root.length || !embed) {
600            return;
601        }
602
603        var $iframe = $('<iframe>', {
604            src: embed,
605            title: title,
606            allowtransparency: 'true',
607            allowfullscreen: 'true',
608            scrolling: 'no'
609        });
610
611        $root.find('.revues-calameo__viewer iframe').replaceWith($iframe);
612        $root.find('.revues-calameo__featured-title').text(title);
613
614        $root.find('.revues-calameo__item').removeClass('is-active');
615        $root.find('.revues-calameo__cover').removeClass('is-active').attr('aria-pressed', 'false');
616        $cover.addClass('is-active').attr('aria-pressed', 'true');
617        $cover.closest('.revues-calameo__item').addClass('is-active');
618
619        var $featured = $root.find('.revues-calameo__featured');
620        if ($featured.length) {
621            $('html, body').animate({
622                scrollTop: $featured.offset().top - 30
623            }, 300);
624        }
625    });
626
627    // Exécution au chargement
628    verifierLiens();
629
630    // Exécution au redimensionnement
631    $(window).on('resize', function() {
632        verifierLiens();
633    });
634
635
636});
637
638
639
640/* SCROLL EFFECT */
641
642$(window).on('scroll', function () {
643    if ($(window).width() >= 1200) {
644        var scrolled = $(window).scrollTop();
645        var $parallaxImage = $('.main-landing-neutre.tpl-2025 section.banner-tpl-2025 .image');
646
647        var translateY = scrolled * 0.8;
648        var scale = 1 + (scrolled / 3000);
649
650        $parallaxImage.css({
651            transform: 'translateY(' + translateY + 'px) scale(' + scale + ')'
652        });
653    }
654});

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.