PageSourceSearch

https://inuyama.gr.jp/assets/js/jquery.proj.js?1790280020

js inuyama.gr.jp collected 2026-09-24 20:00:30 UTC 39,875 bytes, 895 lines download raw bytes

1;
2(function ($) {
3    $(function () {
4        $.proj.resStatus = $.proj.getResStatus();
5        $.proj.common();
6        $.proj.initMenu();
7    });
8
9    $.proj = {
10        width: [750, 960, 1200],
11        resizeTimer: false,
12        resStatus: '',
13        resizeWindow: function () {
14            if ($.proj.resizeTimer !== false) {
15                clearTimeout($.proj.resizeTimer);
16            }
17            $.proj.resizeTimer = setTimeout(function () {
18                const r = $.proj.getResStatus();
19                if (r != $.proj.resStatus) {
20                    if (r >= 1) {
21                        $('.home-map .map-main-search-list-sel dd').attr('style', '');
22                        $('body').removeClass('js-menuopen');
23                    } else {
24
25                    }
26                    $.proj.resStatus = r;
27                    $.proj.initMenu();
28                }
29                $.proj.scrollWindow();
30            }, 200);
31        },
32        getResStatus: function () {
33            const w = window.innerWidth ? window.innerWidth : $(window).width();
34            for (let i=0; i<$.proj.width.length; i++) {
35                if (w <= $.proj.width[i]) {
36                    return i + 1;
37                }
38            }
39            return $.proj.width.length + 1;
40        },
41
42        scrollWindow : function() {
43            const scrollTop = $(window).scrollTop();
44            const windowHeight = $(window).height();
45
46            if (scrollTop > 0) {
47                if (!$('.pagetop').hasClass('is-show')) {
48                    $('.pagetop').addClass('is-show');
49                }
50            } else {
51                if ($('.pagetop').hasClass('is-show')) {
52                    $('.pagetop').removeClass('is-show');
53                }
54            }
55
56            if (scrollTop > 0) {
57                if (!$('.price-float').hasClass('is-show')) {
58                    $('.price-float').addClass('is-show');
59                }
60            } else {
61                if ($('.price-float').hasClass('is-show')) {
62                    $('.price-float').removeClass('is-show');
63                }
64            }
65
66            $(".js-anime").each(function (i) {
67                const elemPos = $(this).offset().top + 50;
68                if (scrollTop >= elemPos - windowHeight) {
69                    if (!$(this).hasClass("js-anime-on")) {
70                        if ($(this).data('anime') && !$(this).hasClass( $(this).data('anime') )) {
71                            $(this).addClass( $(this).data('anime') );
72                        }
73                        $(this).show().addClass("js-anime-on");
74
75                        if ($(this).hasClass('js-anime-container')) {
76                            $('.js-anime', $(this)).each(function(){
77                                if (!$(this).hasClass("js-anime-on")) {
78                                    if ($(this).data('anime') && !$(this).hasClass( $(this).data('anime') )) {
79                                        $(this).addClass( $(this).data('anime') );
80                                    }
81                                    $(this).show().addClass("js-anime-on");
82                                }
83                            });
84                        }
85                    }
86                } else {
87                  //$(this).removeClass("js-anime-on");
88                }
89            });
90        },
91
92        initMenuComp : false,
93        initMenu : function () {
94            const bodyid = $('body').attr('id');
95
96            if (bodyid == 'home') {
97                $.proj.home();
98            } else if (bodyid == 'event') {
99                $.proj.event();
100            } else if (bodyid == 'modelcourse') {
101                $.proj.modelcourse();
102            } else if (bodyid == 'inuyama') {
103                $.proj.inuyama();
104            } else if (bodyid == 'sdgs') {
105                $.proj.sdgs();
106            } 
107
108
109            $.proj.initMenuComp = true;
110        },
111        
112        searchCat : [],
113        modalSwiper : {},
114        picupSwiperSlide : 0,
115        detailSwiperSlide : 0,
116        detailSwiperMain : null,
117        detailSwiperSub : null,
118        common : function () {
119            $(window).on('resize', function () {
120                $.proj.resizeWindow();
121            });
122
123            $(window).on('scroll', function () {
124                $.proj.scrollWindow();
125            });
126            $.proj.scrollWindow();
127
128            $(window).on('load', function() {
129                $.proj.scrollWindow();
130
131            });
132            
133            $("._language .language-txt").click(function() {
134                $(".popup").toggle();
135            }); 
136            
137            $('.header-menu').on('click', function () {
138                $('body').toggleClass('js-menuopen');
139            });
140            
141            $(".nav-menu .nav-menu-01 .nav-menu-toggle").on("click", function () {
142                $(this).next().slideToggle();
143                $(this).toggleClass("active");
144            });
145            
146            $('.price-float-close').on('click', function () {
147                $('.price-float').remove();
148            });
149            
150            $(document).on('click', function(e) {
151                if ($('body').hasClass('js-modalsearchopen')) {
152                    if (!$(e.target).closest('.modalsearch-sec .modal-con').length) {
153                        $('body').removeClass('js-modalsearchopen');
154                        $('.modalsearch-sec').fadeOut();
155                    }
156                }
157            });
158            
159            if ($('.modalsearch-sec').length) {
160                $('.header-search-btn').on('click', function(){
161                    $('.modalsearch-sec').fadeIn();
162                    $('body').addClass('js-modalsearchopen');
163                    return false;
164                });
165
166                $('.modalsearch-sec .modal-close').on('click', function(){
167                    $('.modalsearch-sec').fadeOut();
168                    $('body').removeClass('js-modalsearchopen');
169                });
170            }
171            
172            $.proj.picupSwiperSlide = $('.list-picup .picup-swiper .swiper-slide').length;
173            new Swiper('.list-picup .picup-swiper', {
174                slidesPerView: 'auto',
175                centeredSlides: true,
176                loop: true,
177                navigation: {
178                    prevEl: ".list-picup ._prev",
179                    nextEl: ".list-picup ._next",
180                },
181                breakpoints: {
182                    750: {
183                        centeredSlides: $.proj.picupSwiperSlide > 2,
184                        loop: $.proj.picupSwiperSlide > 2,
185                        centerInsufficientSlides: $.proj.picupSwiperSlide <= 2,
186                    },
187                },
188            });
189            
190            if ($('.detail-swiper').length) {
191                // スライド3個のとき、右に余白ができるのを回避
192                $.proj.detailSwiperSlide = $('.detail-swiper .detail-swiper-main .swiper-slide').length;
193                if ($.proj.detailSwiperSlide > 0) {
194                    if ($.proj.detailSwiperSlide > 2 && $.proj.detailSwiperSlide <= 4) {
195                        let slidehtml = $('.detail-swiper .detail-swiper-main .swiper-wrapper').html();
196                        let len = $.proj.detailSwiperSlide;
197                        while (len <= 4) {
198                            $('.detail-swiper .detail-swiper-main .swiper-wrapper').append(slidehtml);
199                            len = $('.detail-swiper .detail-swiper-main .swiper-slide').length;
200                        }
201                        $('.detail-swiper-sub .swiper-slide:first-child').addClass('swiper-slide-thumb-active');
202                        $('.detail-swiper-sub .swiper-slide').on('click', function(){
203                            if (!$(this).hasClass('swiper-slide-thumb-active')) {
204                                $('.detail-swiper-sub .swiper-slide.swiper-slide-thumb-active').removeClass('swiper-slide-thumb-active');
205                                const index = $('.detail-swiper-sub .swiper-slide').index($(this));
206                                $.proj.detailSwiperMain.slideToLoop(index);
207                                $(this).addClass('swiper-slide-thumb-active');
208                            }
209                        });
210                    } else {
211                        $.proj.detailSwiperSub = new Swiper(".detail-swiper .detail-swiper-sub", {
212                            slidesPerView: 'auto',
213                        });
214                    }
215                    $.proj.detailSwiperMain = new Swiper(".detail-swiper .detail-swiper-main", {
216                        slidesPerView: 'auto',
217                        centeredSlides: true,
218                        loop: true,
219                        thumbs: {
220                          swiper: $.proj.detailSwiperSub
221                        },
222                        navigation: {
223                            prevEl: ".detail-swiper ._prev",
224                            nextEl: ".detail-swiper ._next",
225                        },
226                        breakpoints: {
227                            750: {
228                                centeredSlides: $.proj.detailSwiperSlide > 2,
229                                loop: $.proj.detailSwiperSlide > 2,
230                                centerInsufficientSlides: $.proj.detailSwiperSlide <= 2,
231                            },
232                        },
233                        on: {
234                            slideChange: function(swiper) {
235                                if ($.proj.detailSwiperSlide <= 4) {
236                                    $('.detail-swiper-sub .swiper-slide.swiper-slide-thumb-active').removeClass('swiper-slide-thumb-active');
237                                    $('.detail-swiper-sub .swiper-slide:nth-child('+(swiper.realIndex % $.proj.detailSwiperSlide + 1)+')').addClass('swiper-slide-thumb-active');
238                                }
239                            }
240                        }
241                    });
242                }
243            }
244            
245            new Swiper('.detail-imageslide .imageslide-swiper-main', {
246                slidesPerView: 'auto',
247                loop: true,
248                navigation: {
249                    prevEl: ".detail-imageslide ._prev",
250                    nextEl: ".detail-imageslide ._next",
251                },
252                pagination: {
253                    el: ".detail-imageslide .swiper-pagination",
254                    clickable: true,
255                }
256            });
257            
258            $(".detail-toggle .toggle-heading").on("click", function () {
259                $(this).next().slideToggle();
260                $(this).toggleClass("active");
261            });
262            
263            new Swiper('.detail-spot .spot-swiper', {
264                slidesPerView: 'auto',
265                loop: true,
266                navigation: {
267                    prevEl: ".detail-spot ._prev",
268                    nextEl: ".detail-spot ._next",
269                }
270            });
271            
272            if ($('.sidebar .sidebar-swiper').length) {
273                $('.sidebar .sidebar-swiper').each(function(i){
274                    $(this).addClass('sidebar-swiper-'+i);
275                    new Swiper('.sidebar-swiper-'+i+' .sidebar-swiper-in', {
276                        slidesPerView: 'auto',
277                        loop: true,
278                        navigation: {
279                            prevEl: ".sidebar-swiper-"+i+" ._prev",
280                            nextEl: ".sidebar-swiper-"+i+" ._next",
281                        },
282                        pagination: {
283                            el: ".sidebar-swiper-"+i+" .swiper-pagination",
284                            clickable: true,
285                        }
286                    });
287                });
288            }
289            
290            if ($('._moreset').length) {
291                $('._moreset').each(function(){
292                    const settar = $(this);
293                    if (!settar.data('more')) settar.data('more', 20);
294                    const more = Number(settar.data('more'));
295                    const itemlen = $('._moreitem', settar).length;
296                    if (itemlen > more) {
297                        settar.data('morecnt', 1);
298                        $("._moreitem:nth-child(n+" + (more+1) + ")", settar).hide();
299                        $(".more-btn", settar).on('click', function(){
300                            const more = Number(settar.data('more'));
301                            const morecnt = Number(settar.data('morecnt')) + 1;
302                            settar.data('morecnt', morecnt);
303                            $("._moreitem", settar).addClass('_moreshow');
304                            $("._moreitem:nth-child(n+" + (more*morecnt+1) + ")", settar).removeClass('_moreshow');
305                            $("._moreitem._moreshow", settar).show();
306                            if (!$("._moreitem", settar).not('._moreshow').length) {
307                                $(this).remove();
308                            }
309                        });
310                    } else {
311                        $(".more-btn", settar).remove();
312                    }
313                });
314            }
315            
316            $(document).on('click', function(e) {
317                if ($('body').hasClass('js-modalopen')) {
318                    if (!$(e.target).closest('.modal-sec .modal-con').length) {
319                        $('body').removeClass('js-modalopen');
320                        $('.modal-sec').fadeOut();
321                    }
322                }
323                if ($('body').hasClass('js-modalmovieopen')) {
324                    if (!$(e.target).closest('.modal-sec .modal-con').length) {
325                        $('.modal-movie-sec').fadeOut('normal', function(){
326                            $('.modal-movie-box').empty();
327                        });
328                        $('body').removeClass('js-modalmovieopen');
329                    }
330                }
331            });
332            
333            if ($('.modal-sec').length) {
334                $('._modal, ._modal02').on('click', function(){
335                    const modalclass = $(this).data('modal') ? $(this).data('modal') : '_detail';
336                    $('.modal-sec.'+modalclass).fadeIn();
337                    $('body').addClass('js-modalopen');
338                    const index = $(this).data('index');
339                    if (!isNaN(index)) {
340                        $.proj.modalSwiper[modalclass].slideToLoop(index);
341                    }
342                    return false;
343                });
344
345                $('.modal-sec .modal-close').on('click', function(){
346                    $('.modal-sec').fadeOut();
347                    $('body').removeClass('js-modalopen');
348                });
349
350                $('.modal-sec').each(function(){
351                    if ($(this).attr('class') == 'modal-sec') {
352                        $(this).addClass('_detail').data('modal', '_detail');
353                    }
354                    const modalclass = $(this).data('modal');
355                    $.proj.modalSwiper[modalclass] = new Swiper('.modal-sec.'+modalclass+' .modal-swiper', {
356                        slidesPerView: 'auto',
357                        loop: true,
358                        navigation: {
359                            prevEl: ".modal-sec."+modalclass+" ._prev",
360                            nextEl: ".modal-sec."+modalclass+" ._next",
361                        },
362                        pagination: {
363                            el: ".modal-sec."+modalclass+" .swiper-pagination",
364                            clickable: true,
365                            type: "fraction"
366                        }
367                    });
368                });
369            }
370            
371            $(document).on('click', function(e) {
372                if ($('body').hasClass('js-modalpictogramopen')) {
373                    if (!$(e.target).closest('.modalpictogram-sec .modal-con').length) {
374                        $('body').removeClass('js-modalpictogramopen');
375                        $('.modalpictogram-sec').fadeOut();
376                    }
377                }
378            });
379            
380            if ($('.modalpictogram-sec').length) {
381                $('.txt-pictogram').on('click', function(){
382                    $('.modalpictogram-sec').fadeIn();
383                    $('body').addClass('js-modalpictogramopen');
384                    return false;
385                });
386
387                $('.modalpictogram-sec .modal-close').on('click', function(){
388                    $('.modalpictogram-sec').fadeOut();
389                    $('body').removeClass('js-modalpictogramopen');
390                });
391
392            }
393            
394      // 検索条件
395      if ($('.search-main-item').length) {
396        // ジャンル・エリア
397        $('.search-main-item').each(function(){
398          const cat = $(this).data('cat');
399          $.proj.searchCat.push(cat);
400          
401          const tar = $(this);
402          $(".search-main-label", tar).on("click", function () {
403            if (!$(".search-main-"+cat+" .search-main-popup").hasClass('_show')) $(".search-main-popup").removeClass('_show');
404            $(".search-main-"+cat+" .search-main-popup").toggleClass('_show');
405            $('body').addClass('js-search-'+cat);
406            return false;
407          });
408          $(".search-main-popup-close", tar).on("click", function () {
409            $(".search-main-"+cat+" .search-main-popup").removeClass('_show');
410            $('body').removeClass('js-search-'+cat);
411          });
412        });
413        
414        $('.search-main-item input[type="checkbox"]').on('change', function(){
415          //$.proj.dispSearchCond();
416        });
417        
418        // 訪問時期
419        if ($(".search-main-visit").length) {
420          const dt = new Date();
421          const y = dt.getFullYear();
422          const m = dt.getMonth() + 1;
423          const d = dt.getDate() + 1;
424          $('.search-main-visit-date').each(function(){
425            const cat = $(this).data('cat');
426            const tar = $(this);
427            $('.search-main-visit-txt', tar).on('focus', function(){
428              $('.search-main-visit-popup', tar).show();
429              $('body').addClass('js-search-'+cat);
430              return false;
431            });
432            $.proj.setSearchVisitCalender(tar, y, m);
433            $('.search-main-visit-prev', tar).on('click', function(){
434              $.proj.nextSearchVisitCalender(tar, -1);
435            });
436            $('.search-main-visit-next', tar).on('click', function(){
437              $.proj.nextSearchVisitCalender(tar, 1);
438            });
439            $('.search-main-visit-today', tar).on('click', function(){
440              $('.search-main-visit-txt', tar).val( y + '-' + String(m).padStart(2, '0') + '-' + String(d).padStart(2, '0') );
441              //$.proj.dispSearchCond();
442            });
443            $('.search-main-visit-clear', tar).on('click', function(){
444              $('.search-main-visit-txt', tar).val('');
445              //$.proj.dispSearchCond();
446            });
447          });
448          $('.search-main-visit-btn').on('click', function(){
449            $('.search-main-visit-start .search-main-visit-txt').removeClass('_done');
450            $('.search-main-visit-end .search-main-visit-txt').removeClass('_done');
451            if ($('.search-main-visit-start .search-main-visit-txt').val() != '') {
452              $('.search-main-visit-start .search-main-visit-txt').addClass('_done');
453            }
454            if ($('.search-main-visit-end .search-main-visit-txt').val() != '') {
455              $('.search-main-visit-end .search-main-visit-txt').addClass('_done');
456            }
457            //$.proj.dispSearchCond();
458            $(".search-main-visit .search-main-popup").removeClass('_show');
459            $('body').removeClass('js-search-visit');
460          });
461        }
462        
463        // キーワード
464        if ($('.search-main-input').length) {
465          $('.search-main-input').on('keyup', function(){
466            //$.proj.dispSearchCond();
467          });
468        }
469        
470        if ($('.search-main-visit-start .search-main-visit-txt').val() != '') $('.search-main-visit-start .search-main-visit-txt').addClass('_done');
471        if ($('.search-main-visit-end .search-main-visit-txt').val() != '') $('.search-main-visit-end .search-main-visit-txt').addClass('_done');
472        //$.proj.dispSearchCond();
473      }
474        
475      $('body').on('click touchend', function(e){
476        // ヘッダー検索
477        if ($('body').hasClass('js-hsearch-open')) {
478          if (!$(e.target).closest(".header-search .search-popup").length) {
479            $('.header-search .search-popup').hide();
480            $('body').removeClass('js-hsearch-open');
481          }
482        }
483        if ($('body').hasClass('js-hsearchsp-open')) {
484          if (!$(e.target).closest(".header-search-sp").length && !$(e.target).closest(".header-search-sp").length) {
485            $('.header-search-sp .lang-popup').removeClass('is-show');
486            $('.header-search-sp .search-popup').removeClass('is-show');
487            $('body').removeClass('js-hsearchsp-open');
488          }
489        }
490        // 検索
491        for (let i=0; i<$.proj.searchCat.length; i++) {
492          const cat = $.proj.searchCat[i];
493          if ($('body').hasClass('js-search-'+cat)) {
494            if (!$(e.target).closest(".search-main-"+cat+" .search-main-popup").length) {
495              $(".search-main-"+cat+" .search-main-popup").removeClass('_show');
496              $('body').removeClass('js-search-'+cat);
497            }
498          }
499        }
500        if ($('body').hasClass('js-search-visit-start')) {
501          if (!$(e.target).closest(".search-main-visit-start").length) {
502            $('.search-main-visit-start .search-main-visit-popup').hide();
503            $('body').removeClass('js-search-visit-start');
504          }
505        }
506        if ($('body').hasClass('js-search-visit-end')) {
507          if (!$(e.target).closest(".search-main-visit-end").length) {
508            $('.search-main-visit-end .search-main-visit-popup').hide();
509            $('body').removeClass('js-search-visit-end');
510          }
511        }
512      });
513            
514            /**
515             * タブ
516             * 1ページに複数配置する場合、tabcontents に tabcontents-* のクラスを追加して、tabmenu に data-con="*" を設定する(*は任意の文字列)
517             * 1つの tabmenu で複数の tabcontents を切り替える場合は同じクラスをつける
518             * 1ページにタブが1つしかない場合、tabcontents-* のクラス追加は不要
519             */
520            if ($('.tabmenu').length) {
521                $('.tabmenu').each(function(){
522                    const tab = $(this);
523                    const con = tab.data('tabcon') ? $('.tabcontents-'+tab.data('tabcon')) : $('.tabcontents');
524
525                    // デフォルト
526                    let index = $('li.active', tab).length ? $('li', tab).index( $('li.active', tab) ) : 0;
527
528                    $('li.active', tab).removeClass('active');
529                    $('.tab.active', con).removeClass('active');
530
531                    $('li:nth-child('+(index+1)+')', tab).addClass('active');
532                    $('.tab:nth-child('+(index+1)+')', con).addClass('active');
533
534                    // 切替
535                    $('li', tab).on('click', function () {
536                        if ($(this).not('active')) {
537                            $(this).addClass('active').siblings('li').removeClass('active');
538                            const index = $('li', tab).index( $(this) );
539                            con.each(function(){
540                                $('.tab', $(this)).eq(index).addClass('active').siblings('div').removeClass('active');
541                            });
542                        }
543                    });
544                });
545            }
546
547            $('.mokuji-btn').on('click', function () {
548                $('.mokuji').toggleClass('is-open');
549                $('.mokuji-btn').attr('aria-expanded', $('.mokuji-btn').attr('aria-expanded')=='false'?'true':'false');
550                $('.mokuji-list').attr('aria-hidden', !$('.mokuji-btn').attr('aria-hidden')=='false'?'true':'false');
551            });
552        },
553        
554
555        // ホーム
556        homeFeatureSwiper : null,
557        homeFeatureSwiperSlide : 0,
558        homeMcSwiper : null,
559        homeMcSwiperSlide : 0,
560        home : function () {
561            // 初回のみ
562            if (!$.proj.initMenuComp) {
563                
564                new Swiper('.home-mainimg .mainimg-swiper', {
565                    slidesPerView: 'auto',
566                    effect: 'fade',
567                    autoplay: {
568                        delay: 3000,
569                    },
570                    loop: true,
571                    navigation: {
572                        prevEl: ".home-mainimg ._prev",
573                        nextEl: ".home-mainimg ._next",
574                    },
575                    pagination: {
576                        el: ".home-mainimg .swiper-pagination",
577                        clickable: true,
578                    }
579                });
580                
581                
582                // スライドが5個以下のとき、右に余白ができるのを回避
583                $.proj.homeFeatureSwiperSlide = $('.home-feature .feature-swiper .swiper-slide').length;
584                if ($.proj.homeFeatureSwiperSlide > 0) {
585                    if ($.proj.homeFeatureSwiperSlide <= 5) {
586                        let slidehtml = $('.home-feature .feature-swiper .swiper-wrapper').html();
587                        let len = $.proj.homeFeatureSwiperSlide;
588                        while (len <= 5) {
589                            $('.home-feature .feature-swiper .swiper-wrapper').append(slidehtml);
590                            len = $('.home-feature .feature-swiper .swiper-slide').length;
591                        }
592                    }
593                    $.proj.homeFeatureSwiper = new Swiper('.home-feature .feature-swiper', {
594                        slidesPerView: 'auto',
595                        loop: true,
596                        centeredSlides: true,
597                        autoplay: {
598                            delay: 3000,
599                        },
600                        on : {
601                            slideChange : function(swiper){
602                                const index = swiper.realIndex % $.proj.homeFeatureSwiperSlide;
603                                $(".home-feature .swiper-pagination-bullet.swiper-pagination-bullet-active").removeClass('swiper-pagination-bullet-active');
604                                $(".home-feature .swiper-pagination-bullet").eq(index).addClass('swiper-pagination-bullet-active');
605                            }
606                        }
607                    });
608                    for (let i=0; i<$.proj.homeFeatureSwiperSlide; i++) {
609                        $(".home-feature .swiper-pagination").append('<span class="swiper-pagination-bullet"></span>');
610                    }
611                    $(".home-feature .swiper-pagination-bullet").on('click', function(){
612                        const index = $(".home-feature .swiper-pagination-bullet").index($(this));
613                        $.proj.homeFeatureSwiper.slideToLoop(index);
614                    });
615                }
616                
617                new Swiper('.home-event .event-swiper', {
618                    slidesPerView: 'auto',
619                    loop: true,
620                    navigation: {
621                        prevEl: ".home-event ._prev",
622                        nextEl: ".home-event ._next",
623                    }
624                });
625                
626                new Swiper('.home-travelinfo .ti-swiper', {
627                    slidesPerView: 'auto',
628                    loop: true,
629                    navigation: {
630                        prevEl: ".home-travelinfo ._prev",
631                        nextEl: ".home-travelinfo ._next",
632                    }
633                });
634                
635                // スライドが5個以下のとき、右に余白ができるのを回避
636                $.proj.homeMcSwiperSlide = $('.home-modelcourse .mc-swiper .swiper-slide').length;
637                if ($.proj.homeMcSwiperSlide > 0) {
638                    if ($.proj.homeMcSwiperSlide <= 5) {
639                        let slidehtml = $('.home-modelcourse .mc-swiper .swiper-wrapper').html();
640                        let len = $.proj.homeMcSwiperSlide;
641                        while (len <= 5) {
642                            $('.home-modelcourse .mc-swiper .swiper-wrapper').append(slidehtml);
643                            len = $('.home-modelcourse .mc-swiper .swiper-slide').length;
644                        }
645                    }
646                    $(".home-modelcourse .swiper-pagination .swiper-pagination-total").text($.proj.homeMcSwiperSlide);
647                    new Swiper('.home-modelcourse .mc-swiper', {
648                        slidesPerView: 'auto',
649                        loop: true,
650                        navigation: {
651                            prevEl: ".home-modelcourse ._prev",
652                            nextEl: ".home-modelcourse ._next",
653                        },
654                        breakpoints: {
655                            750: {
656                                centeredSlides: true,
657                            },
658                        },
659                        on : {
660                            slideChange : function(swiper){
661                                const index = swiper.realIndex % $.proj.homeMcSwiperSlide;
662                                $(".home-modelcourse .swiper-pagination .swiper-pagination-current").text(index+1);
663                            }
664                        }
665                    });
666                }
667
668                $('.home-map ._spotdetail').on('click', function () {
669                    $('.map-main-search-spot').toggleClass('_open');
670                });
671                
672                $('.home-map ._spotclose').on('click', function () {
673                    $(".map-main-search-spot").removeClass('_open');
674                });
675                
676                $('.map-main-search-list-sel li').on('click', function(){
677                    if (!$(this).hasClass('_current')) {
678                        $('.map-main-search-list-sel li._current').removeClass('_current');
679                        $(this).addClass('_current');
680                        $('.map-main-search-list-sel dt').text($('span', $(this)).text());
681                    }
682                });
683                $(".home-map .map-main-search-list-sel dt").on("click", function () {
684                    $(this).next().slideToggle();
685                    $('.home-map .map-main-search-list-sel dl').toggleClass('active');
686                });
687                
688                new Swiper('.home-website .website-swiper', {
689                    slidesPerView: 'auto',
690                    loop: true,
691                    navigation: {
692                        prevEl: ".home-website ._prev",
693                        nextEl: ".home-website ._next",
694                    }
695                });
696
697            }
698        },
699        
700        // イベント
701        event : function () {
702            // 初回のみ
703            if (!$.proj.initMenuComp) {
704                $(".event-calendar .event-calendar-ttl").on("click", function () {
705                    $(this).next().slideToggle();
706                    $(this).toggleClass("active");
707                });
708            }
709        },
710        
711        // モデルコース
712        modelcourse : function () {
713            // 初回のみ
714            if (!$.proj.initMenuComp) {
715                const swiper = new Swiper(".sub-swiper", {
716                  loop: true,
717                  slidesPerView: 2,
718                  spaceBetween: 20,
719                  pagination: {
720                    el: ".mc-slider .swiper-pagination"
721                  },                    
722                  navigation: {
723                    nextEl: ".mc-slider ._next",
724                    prevEl: ".mc-slider ._prev"
725                  },
726                  breakpoints: {
727                    750: {
728                      slidesPerView: 5,
729                      spaceBetween: 30,
730                    }
731                  }
732                });
733                
734                /*
735                const swiper2 = new Swiper(".main-swiper", {
736                  thumbs: {
737                    swiper: swiper
738                  },
739                  pagination: {
740                    el: ".mc-slider .swiper-pagination"
741                  },                    
742                  navigation: {
743                    nextEl: ".mc-slider ._next",
744                    prevEl: ".mc-slider ._prev"
745                  }
746                });
747                */
748                
749                if ($('.spot-main-fig').length) {
750                  $('.spot-main-fig').each(function(i){
751                    const tar = $(this);
752                    if ($('.spot-main-fig-swiper', tar).length) {
753                      $('.spot-main-fig-swiper', tar).addClass('spot-main-fig-swiper-'+i);
754                      const swiper = new Swiper(".spot-main-fig-swiper-"+i, {
755                        effect: 'fade',
756                        fadeEffect: {
757                          crossFade: true
758                        },
759                        loop: true
760                      });
761                      if ($('ul', tar).length) {
762                        $('li:nth-child(1)', tar).addClass('_current');
763                        $('li', tar).data('swiper', swiper).on('click', function(){
764                          if (!$(this).hasClass('_current')) {
765                            $('li._current', tar).removeClass('_current');
766                            $(this).addClass('_current');
767                            const swiper = $(this).data('swiper');
768                            const index = $('li', tar).index($(this));
769                            swiper.slideToLoop(index);
770                          }
771                        });
772                      }
773                    }
774                  });
775                }
776            }
777        },
778        
779        // はじめての犬山
780        inuyama : function () {
781            // 初回のみ
782            if (!$.proj.initMenuComp) {
783                
784                new Swiper('.inuyama-top .top-swiper-main', {
785                    slidesPerView: 1,
786                    spaceBetween: 0,
787                    loop: true,
788                    navigation: {
789                        prevEl: ".inuyama-top ._prev",
790                        nextEl: ".inuyama-top ._next",
791                    },
792                    breakpoints: {
793                        750: {
794                            slidesPerView: 3,
795                            spaceBetween: 45
796                        },
797                    },
798                });
799
800                new Swiper('.inuyama-park .park-swiper-main', {
801                    slidesPerView: 1,
802                    spaceBetween: 0,
803                    loop: true,
804                    navigation: {
805                        prevEl: ".inuyama-park ._prev",
806                        nextEl: ".inuyama-park ._next",
807                    },
808                    breakpoints: {
809                        750: {
810                            slidesPerView: 3,
811                            spaceBetween: 45
812                        },
813                    },
814                });
815                
816                new Swiper('.inuyama-gourmet .gourmet-swiper-main', {
817                    slidesPerView: 'auto',
818                    loop: true,
819                    navigation: {
820                        prevEl: ".inuyama-gourmet ._prev",
821                        nextEl: ".inuyama-gourmet ._next",
822                    }
823                });
824                
825                $(document).on('click', function(e) {
826                    if ($('body').hasClass('js-inuyamamodalopen')) {
827                        if (!$(e.target).closest('.inuyama-modal .modal-con').length) {
828                            $('body').removeClass('js-inuyamamodalopen');
829                            $('.inuyama-modal').fadeOut();
830                        }
831                    }
832                });
833
834                $('.inuyama-history').on('click', function(){
835                    $('.modal_history').fadeIn();
836                    $('body').addClass('js-inuyamamodalopen');
837                    return false;
838                });
839                $('.inuyama-faq').on('click', function(){
840                    $('.modal_faq').fadeIn();
841                    $('body').addClass('js-inuyamamodalopen');
842                    return false;
843                });
844                $('.detail-main .inuyama-about').on('click', function(){
845                    $('.modal_about').fadeIn();
846                    $('body').addClass('js-inuyamamodalopen');
847                    return false;
848                });
849                $('.inuyama-profile').on('click', function(){
850                    $('.modal_profile').fadeIn();
851                    $('body').addClass('js-inuyamamodalopen');
852                    return false;
853                });
854
855                $('.inuyama-modal .modal-close').on('click', function(){
856                    $('.inuyama-modal').fadeOut();
857                    $('body').removeClass('js-inuyamamodalopen');
858                });
859
860            }
861        },
862        
863        // SDGs
864        sdgs : function () {
865            // 初回のみ
866            if (!$.proj.initMenuComp) {
867                new Swiper('.sdgs-case .sdgs-case-swiper', {
868                    slidesPerView: 'auto',
869                    loop: true,
870                    navigation: {
871                        prevEl: ".sdgs-case ._prev",
872                        nextEl: ".sdgs-case ._next",
873                    }
874                });
875                
876                // 宝もの
877                $('.sdgs-takara-list-iframe').on('click', function(){
878                    const yt = $(this).data('yt');
879                    $('.modal-movie-box').html('<iframe width="560" height="315" src="https://www.youtube.com/embed/'+yt+'?rel=0" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>');
880                    $('.modal-movie-sec').fadeIn();
881                    $('body').addClass('js-modalmovieopen');
882                    return false;
883                });
884            
885                $('.modal-movie-sec .modal-close').on('click', function(){
886                    $('.modal-movie-sec').fadeOut('normal', function(){
887                        $('.modal-movie-box').empty();
888                    });
889                    $('body').removeClass('js-modalmovieopen');
890                });
891            }
892        }
893        
894    };
895})(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.