PageSourceSearch

https://www.coop-lifeservice.co.jp/js/functions.js

js coop-lifeservice.co.jp collected 2026-10-05 23:35:03 UTC 74,181 bytes, 2,226 lines download raw bytes

1/*-----------------------
2 * 共通変数定義
3 ------------------------*/
4var breakPoint1 = 640;
5var breakPoint2 = 1120;
6var $window = $(window);
7var $body = $("body");
8var $html = $("html");
9var $bodyHtml = $("body,html");
10var winwidth = window.innerWidth;
11var _touch = "ontouchstart" in document ? "touchstart" : "click";
12
13$window.on("load resize", function () {
14    if ($body.innerHeight() < $window.innerHeight()) {
15        $(".c-footer08").addClass("is-fixed");
16    }
17
18    if ($(".c-footer08.is-fixed").length) {
19        var hFooter = $(".c-footer08.is-fixed").innerHeight();
20        if ($body.innerHeight() + hFooter >= $window.innerHeight()) {
21            $(".c-footer08").removeClass("is-fixed");
22        }
23    }
24});
25
26/*-----------------------
27 * DOMロード後に発火
28 ------------------------*/
29$(function () {
30    /*-----------------------
31	* 共通
32	------------------------*/
33
34    if (!$("#is-request").length) {
35        //スムーススクロール
36        $('a[href^="#"]').on(_touch, function (e) {
37            var destination = $(this).attr("href");
38            var destinationPos;
39            var top = 60;
40            if ($(".p-sosaiFaq").length > 0) {
41                top = 75;
42            }
43            if ($(".reformServiceScroll-js").length > 0) {
44                top = 80;
45            }
46            if ($(".p-sosaiKnowledgeAttendee").length > 0) {
47                top = 80;
48            }
49            if ($(this).hasClass("p-hokenLpScroll-js")) {
50                top = 20;
51            }
52            if ($(this).hasClass("p-hokenLpScroll-js2")) {
53                top = 0;
54                console.log(top);
55            }
56            if ($window.width() < breakPoint1 + 1) {
57                top = 50;
58                if ($(".reformServiceScroll-js").length > 0) {
59                    top = 60;
60                }
61                if ($(this).hasClass("p-hokenLpScroll-js")) {
62                    top = 20;
63                }
64                if ($(this).hasClass("p-hokenLpScroll-js2")) {
65                    top = 0;
66                    console.log(top);
67                }
68            }
69            if (!(destination == "#" || $(this).hasClass("u-noSmoothScroll"))) {
70                $bodyHtml.animate(
71                    {
72                        scrollTop: $(destination).offset().top - top,
73                    },
74                    1000,
75                );
76            }
77            return false;
78        });
79    }
80
81    //スクロールでフェードイン表示
82    if ($(".u-fadeIn").length > 0) {
83        window.sr = ScrollReveal({
84            origin: "bottom",
85            distance: "30px",
86            duration: "1000",
87            delay: "300",
88        });
89        sr.reveal(".u-fadeIn");
90    }
91
92    //フィックスメニュー 横スクロール対応
93    window.addEventListener("scroll", _handleScroll, false);
94    function _handleScroll() {
95        $(".u-headPcScroll").css({
96            left: -window.scrollX + "px",
97        });
98    }
99
100    //電話番号リンク PC無効化
101    $('a[href^="tel:"]').on("click", function () {
102        winwidth = window.innerWidth;
103        if (winwidth <= breakPoint1) {
104            return true;
105        } else {
106            return false;
107        }
108    });
109
110    //DIVなど範囲リンク
111    if ($(".u-biggerLink").length > 0) {
112        $(".u-biggerLink").biggerlink();
113    }
114
115    //高さ揃え
116    if ($(".u-matchHeight").length > 0) {
117        $(".u-matchHeight").matchHeight();
118    }
119
120    //.c-step__body
121    if ($(".c-step__body").length > 0) {
122        $(".c-step__body").matchHeight();
123    }
124
125    //
126    var scrollPosi;
127    function bodyFix() {
128        scrollPosi = $(window).scrollTop();
129        $body.css({
130            position: "fixed",
131            width: "100%",
132            "z-index": "1",
133            top: -scrollPosi,
134        });
135    }
136    function bodyFixReset() {
137        $body.css({
138            position: "relative",
139            width: "auto",
140            top: "auto",
141        });
142        $bodyHtml.scrollTop(scrollPosi);
143    }
144
145    //スマホメニュー開閉(共通)
146    $(".c-spMenuBtn").on(_touch, function () {
147        if ($(this).hasClass("is-open")) {
148            bodyFixReset();
149            $(this).removeClass("is-open");
150            $(".c-spMenu")
151                .stop()
152                .animate(
153                    {
154                        opacity: 0,
155                    },
156                    300,
157                    function () {
158                        $(this).removeClass("is-open").removeAttr("style");
159                    },
160                );
161        } else {
162            bodyFix();
163            $(this).addClass("is-open");
164            $(".c-spMenu").addClass("is-open").stop().animate(
165                {
166                    opacity: 1,
167                },
168                300,
169            );
170        }
171    });
172    $(".c-spMenuCloseBtn").on(_touch, function () {
173        bodyFixReset();
174        $(".c-spMenuBtn").removeClass("is-open");
175        $(".c-spMenu")
176            .stop()
177            .animate(
178                {
179                    opacity: 0,
180                },
181                300,
182                function () {
183                    $(this).removeClass("is-open").removeAttr("style");
184                },
185            );
186    });
187
188    $(".c-spMenuBtn2").on(_touch, function () {
189        if ($(this).hasClass("is-open")) {
190            //googleサイト内検索modalが開いていた場合はmodalを閉じる
191            if ($("#js-overlay2").hasClass("is-open2")) {
192                $("#js-overlay2").removeClass("is-open2");
193                $("#js-modal2").removeClass("is-open2");
194            }
195            bodyFixReset();
196            $(this).removeClass("is-open");
197            $(".c-spMenu2")
198                .stop()
199                .animate(
200                    {
201                        opacity: 0,
202                    },
203                    300,
204                    function () {
205                        $(this).removeClass("is-open").removeAttr("style");
206                    },
207                );
208        } else {
209            bodyFix();
210            $(this).addClass("is-open");
211            $(".c-spMenu2").addClass("is-open").stop().animate(
212                {
213                    opacity: 1,
214                },
215                300,
216            );
217        }
218    });
219    $(".c-spMenuCloseBtn2").on(_touch, function () {
220        bodyFixReset();
221        $(".c-spMenuBtn2").removeClass("is-open");
222        $(".c-spMenu2")
223            .stop()
224            .animate(
225                {
226                    opacity: 0,
227                },
228                300,
229                function () {
230                    $(this).removeClass("is-open").removeAttr("style");
231                },
232            );
233    });
234
235    //スマホメニュー アコーディオン(共通)
236    $(".c-spMenuAccordionBtn").each(function () {
237        $(this).on(_touch, function () {
238            if (!$(this).parents(".c-spMenuAccordion").hasClass("is-open")) {
239                $(this).parents(".c-spMenuAccordion").addClass("is-open");
240            } else {
241                $(this).parents(".c-spMenuAccordion").removeClass("is-open");
242            }
243        });
244        $(this)
245            .prev("em")
246            .on(_touch, function () {
247                if (
248                    !$(this).parents(".c-spMenuAccordion").hasClass("is-open")
249                ) {
250                    $(this).parents(".c-spMenuAccordion").addClass("is-open");
251                } else {
252                    $(this)
253                        .parents(".c-spMenuAccordion")
254                        .removeClass("is-open");
255                }
256            });
257    });
258    $('[data-toggle="true"]').on("click", function () {
259        $target = $(this.dataset.target);
260        const state = $target.attr("data-open") === "true";
261        $(this).attr("data-open", !state);
262        $target.attr("data-open", !state);
263    });
264
265    //spアンカーリンク挙動制御 id="js-anchor-sp"
266    if ($("#js-anchor-sp").length) {
267        var closeEvt = window._touch || 'click';
268        var normalize = function (path) {
269            return (path || '/').replace(/\/+$/, '') || '/';
270        };
271
272        $(document).on('click', '#js-anchor-sp', function (e) {
273            var path = this.pathname || '/';
274            var hash = this.hash || '';
275            if (window.innerWidth > 767 || !hash || normalize(window.location.pathname) !== normalize(path)) return;
276
277            var $target = $('#' + $.escapeSelector(hash.slice(1)));
278            if (!$target.length) return;
279
280            e.preventDefault();
281
282            var $menuBtn = $('.c-spMenuBtn2');
283            if ($menuBtn.hasClass('is-open')) $menuBtn.trigger(closeEvt);
284
285            setTimeout(function () {
286                history.replaceState(null, '', path + hash);
287                $('html, body').stop().animate({scrollTop: $target.offset().top}, 200);
288            }, 250);
289        });
290    }
291
292    /*--------------------------------------------------------------------------------------------*/
293
294    /*-----------------------
295	* サービスサイト
296	------------------------*/
297
298    //サービスサイトTOPスライダー
299    if ($(".p-serviceTop01").length > 0) {
300        $(".p-serviceTop01__slide").on("init", function () {
301            $('.slick-slide[data-slick-index="0"]').addClass("u-moving");
302        });
303        $(".p-serviceTop01__slide").slick({
304            fade: true,
305            arrows: false,
306            speed: 2000,
307            autoplay: true,
308            autoplaySpeed: 4000,
309            swipe: false,
310            draggable: false,
311            pauseOnHover: false,
312            pauseOnFocus: false,
313        });
314        $(".p-serviceTop01__slide").on(
315            "beforeChange",
316            function (event, slick, currentSlide, nextSlide) {
317                var slide_num = $(".slick-slide").length;
318                $(
319                    '.slick-slide[data-slick-index="' +
320                        (currentSlide - 1) +
321                        '"]',
322                ).removeClass("u-moving");
323                $(
324                    '.slick-slide[data-slick-index="' + nextSlide + '"]',
325                ).addClass("u-moving");
326                if (currentSlide == 0) {
327                    $(
328                        '.slick-slide[data-slick-index="' +
329                            (slide_num - 1) +
330                            '"]',
331                    ).removeClass("u-moving");
332                }
333            },
334        );
335    }
336
337    /*--------------------------------------------------------------------------------------------*/
338
339    /*-----------------------
340	 * フォーム(カート)スマホ時項目出力(共通)
341	 ------------------------*/
342    $(".col-title").each(function () {
343        var colName = $(this).parent("td").attr("class");
344        var colTitle = $("th." + colName).html();
345        $(this).html("<p>" + colTitle + "</p>");
346    });
347
348    /*-----------------------
349	 * フォーム カレンダー入力(共通)
350	 ------------------------*/
351    if ($(".u-datepicker").length > 0) {
352        $(".u-datepicker").datepicker({
353            dateFormat: "yy-mm-dd",
354        });
355    }
356
357    /*--------------------------------------------------------------------------------------------*/
358
359    /*-----------------------
360	* チケット 保険 リフォーム くらしのサービス 葬祭
361	------------------------*/
362
363    //検索窓
364    if ($(".c-headSearchBoxBtnPc--1").length > 0) {
365        $(".c-headSearchBoxBtnPc--1").append('<div class="c-overlay02"></div>');
366        var headSearchBox1 = $(
367            ".c-headSearchBoxBtnPc--1 .c-overlay02, .c-headSearchBoxBtnPc--1 .c-headSearchBoxPc",
368        );
369        var headSearchBox1on = $(".c-headSearchBoxBtnPc--1 span");
370        var headSearchBox1off = $(".c-headSearchBoxBtnPc--1 .c-overlay02");
371        headSearchBox1on.on(_touch, function () {
372            headSearchBox1.fadeIn();
373        });
374        headSearchBox1off.on(_touch, function () {
375            headSearchBox1.fadeOut(function () {
376                $(this).removeAttr("style");
377            });
378        });
379    }
380
381    /*--------------------------------------------------------------------------------------------*/
382
383    /*-----------------------
384	* チケット
385	------------------------*/
386
387    //チケット TOP スライダー
388    if ($(".p-ticketTop01").length > 0) {
389        $(".p-ticketTop01__slide").slick({
390            dots: true,
391            arrows: true,
392            centerMode: true,
393            centerPadding: "20%",
394            speed: 500,
395            autoplay: true,
396            autoplaySpeed: 5000,
397            responsive: [
398                {
399                    breakpoint: breakPoint1,
400                    settings: {
401                        centerMode: false,
402                    },
403                },
404            ],
405        });
406
407        $(".p-ticketTop01__slide .u-matchHeight").matchHeight();
408        $window.on("resize", function () {
409            $(".p-ticketTop01__slide .u-matchHeight").matchHeight();
410        });
411    }
412
413    if ($(window).width() > breakPoint1 + 1) {
414        var num = $(".p-ticketTop01__slide").find("li").length;
415        if (num == 1) {
416            //console.log(num);
417            $("head").append(
418                "<style>.p-ticketTop01__slide .slick-slide {left: 100%}</style>",
419            );
420        }
421    }
422
423    //チケットTOP カテゴリタブ切り替え(jQueryUI) + カルーセル
424    if ($(".p-ticketTop03").length > 0) {
425        $(".p-ticketTop03__content01__cateBox__items__slider").slick({
426            arrows: true,
427            dots: false,
428            slidesToShow: 3,
429            swipe: false,
430            draggable: false,
431            speed: 500,
432            autoplay: true,
433            autoplaySpeed: 5000,
434            responsive: [
435                {
436                    breakpoint: breakPoint1,
437                    settings: {
438                        slidesToShow: 2,
439                    },
440                },
441            ],
442        });
443        $(
444            ".p-ticketTop03__content01__cateBox__items__slider .u-matchHeight",
445        ).matchHeight();
446        $(".p-ticketTop03__content01__cateBox__cateList li").on(
447            _touch,
448            function () {
449                if (!$(this).hasClass("is-open")) {
450                    var tabID = $(this).attr("data-tabId");
451                    $(
452                        ".p-ticketTop03__content01__cateBox__cateList li",
453                    ).removeClass("is-open");
454                    $(".p-ticketTop03__content01__cateBox__items").removeClass(
455                        "is-open",
456                    );
457                    $(this).addClass("is-open");
458                    $(tabID).addClass("is-open");
459                    $(".p-ticketTop03__content01__cateBox__items__slider")
460                        .slick("setPosition")
461                        .slick("slickGoTo", 0);
462                    $(
463                        ".p-ticketTop03__content01__cateBox__items__slider .u-matchHeight",
464                    ).matchHeight();
465                }
466            },
467        );
468        $window.on("resize", function () {
469            $(
470                ".p-ticketTop03__content01__cateBox__items__slider .u-matchHeight",
471            ).matchHeight();
472        });
473    }
474
475    //チケットTOP アコーディオン
476    $(".p-ticketTop06__content01__case__accordionBtn").each(function () {
477        $(this).on(_touch, function () {
478            if ($(window).width() < breakPoint1 + 1) {
479                if (
480                    !$(this)
481                        .parent(".p-ticketTop06__content01__case")
482                        .hasClass("is-open")
483                ) {
484                    $(this)
485                        .parent(".p-ticketTop06__content01__case")
486                        .addClass("is-open");
487                } else {
488                    $(this)
489                        .parent(".p-ticketTop06__content01__case")
490                        .removeClass("is-open");
491                }
492            }
493        });
494    });
495    //お申し込み方法・お届けまでの流れ アコーディオン
496    $(".p-ticketFlow02__content01__case__accordionBtn").each(function () {
497        $(this).on(_touch, function () {
498            if ($(window).width() < breakPoint1 + 1) {
499                if (
500                    !$(this)
501                        .parent(".p-ticketFlow02__content01__case")
502                        .hasClass("is-open")
503                ) {
504                    $(this)
505                        .parent(".p-ticketFlow02__content01__case")
506                        .addClass("is-open");
507                } else {
508                    $(this)
509                        .parent(".p-ticketFlow02__content01__case")
510                        .removeClass("is-open");
511                }
512            }
513        });
514    });
515
516    //チケット 特集一覧 その他の特集スライダー
517    if ($(".p-ticketFeature03").length > 0) {
518        $(".p-ticketFeature03__slider").slick({
519            arrows: true,
520            dots: false,
521            swipe: false,
522            draggable: false,
523            speed: 500,
524            autoplay: false,
525            autoplaySpeed: 5000,
526            responsive: [
527                {
528                    breakpoint: breakPoint1,
529                    settings: {
530                        dots: true,
531                    },
532                },
533            ],
534        });
535    }
536
537    //チケット 商品詳細 スライダー
538    if ($(".p-ticketServiceDetail01").length > 0) {
539        $(".p-ticketServiceDetail01__content02__slider").slick({
540            arrows: true,
541            dots: true,
542            swipe: false,
543            draggable: false,
544            speed: 500,
545            autoplay: false,
546            autoplaySpeed: 5000,
547            // centerMode: true,
548            responsive: [
549                {
550                    breakpoint: breakPoint1,
551                    settings: {
552                        dots: true,
553                        swipe: true,
554                        draggable: true,
555                    },
556                },
557            ],
558        });
559    }
560
561    /*--------------------------------------------------------------------------------------------*/
562
563    /*-----------------------
564	* 保険
565	------------------------*/
566
567    //保険 TOP MVスライド
568    if ($(".p-hokenTop01").length > 0) {
569        $(".p-hokenTop01__slider").slick({
570            fade: true,
571            arrows: false,
572            speed: 7000,
573            autoplay: true,
574            autoplaySpeed: 4000,
575            swipe: false,
576            draggable: false,
577            pauseOnHover: false,
578            pauseOnFocus: false,
579        });
580    }
581
582    // //保険商品ページ 資料請求 チェック動作
583    // $('.c-hokenItemSerect').each(function() {
584    // 	$(this).find('input[type="checkbox"]').prop('checked', false);
585    // 	$(this).find('.c-hokenItemCheck input[type="checkbox"]').change(function() {
586    // 		if ($(this).prop('checked') == true) {
587    // 			$(this).parents('.c-hokenItemSerect__item').addClass('is-checked');
588    // 		} else {
589    // 			$(this).parents('.c-hokenItemSerect__item').removeClass('is-checked');
590    // 			$(this).parents('.c-hokenItemSerect').find('.c-hokenItemCheckAll input[type="checkbox"]').prop('checked', false);
591    // 		}
592    // 		if ($(this).parents('.c-hokenItemSerect').find('.c-hokenItemCheck input[type="checkbox"]:checked').length == $(this).parents('.c-hokenItemSerect').find('.c-hokenItemSerect__item').length) {
593    // 			$('.c-hokenItemCheckAll input[type="checkbox"]').prop('checked', true);
594    // 		}
595    // 	});
596    // 	$(this).find('.c-hokenItemCheckAll input[type="checkbox"]').change(function() {
597    // 		if ($(this).prop('checked') == true) {
598    // 			$(this).parents('.c-hokenItemSerect').find('.c-hokenItemCheck input[type="checkbox"]').prop('checked', true);
599    // 			$(this).parents('.c-hokenItemSerect').find('.c-hokenItemSerect__item').addClass('is-checked');
600    // 		} else {
601    // 			$(this).parents('.c-hokenItemSerect').find('.c-hokenItemCheck input[type="checkbox"]').prop('checked', false);
602    // 			$(this).parents('.c-hokenItemSerect').find('.c-hokenItemSerect__item').removeClass('is-checked');
603    // 		}
604    // 	});
605    // 	$('.c-hokenItemSerect__item__request a').on(_touch, function() {
606    // 		$(this).parents('.c-hokenItemSerect').find('.c-hokenItemCheckAll input[type="checkbox"]').prop('checked', false);
607    // 		$(this).parents('.c-hokenItemSerect').find('.c-hokenItemCheck input[type="checkbox"]').prop('checked', false);
608    // 		$(this).parents('.c-hokenItemSerect__item').find('.c-hokenItemCheck input[type="checkbox"]').prop('checked', true);
609    // 		return true;
610    // 	});
611    // });
612
613    // iframe内 アンカーリンク
614    $(".iframeLink").on("click", function () {
615        var $iframe = $("#myiframe");
616        var param = $(this).attr("value"),
617            param = "#" + param;
618
619        anchorLink($iframe, param, 800);
620    });
621
622    function loadAnchorLink() {
623        var $iframe = $("#myiframe");
624        var param = self.location.hash;
625
626        $iframe.load(function () {
627            anchorLink($iframe, param, 10);
628        });
629    }
630    loadAnchorLink();
631
632    function anchorLink($iframe, param, speed) {
633        if (param != "") {
634            var target = $iframe.contents().find(param),
635                iframeTop = $iframe.offset().top,
636                targetTop = target.offset().top,
637                headerHeight = $("header").outerHeight() + 10;
638
639            $("body,html").animate(
640                { scrollTop: iframeTop + targetTop - headerHeight },
641                speed,
642                "swing",
643            );
644            return false;
645        }
646    }
647
648    /*--------------------------------------------------------------------------------------------*/
649
650    /*-----------------------
651	* リフォーム
652	------------------------*/
653
654    //リフォーム ンテナンススケジュール タブ切り替え
655    $(".p-reformCalendar03__tab__btn").on(_touch, function () {
656        if (!$(this).hasClass("is-open")) {
657            var tabID = $(this).attr("data-tabId");
658            $(".p-reformCalendar03__tab__btn").removeClass("is-open");
659            $(".p-reformCalendar03__content").removeClass("is-open");
660            $(
661                '.p-reformCalendar03__tab__btn[data-tabId="' + tabID + '"]',
662            ).addClass("is-open");
663            $(tabID).addClass("is-open");
664        }
665    });
666
667    /*--------------------------------------------------------------------------------------------*/
668
669    /*-----------------------
670	* くらしのサービス
671	------------------------*/
672
673    //くらしのサービス TOP スライダー
674    if ($(".p-kurashiTop01").length > 0) {
675        $(".p-kurashiSlider").slick({
676            dots: true,
677            arrows: false,
678            centerMode: true,
679            centerPadding: "10%",
680            speed: 500,
681            autoplay: true,
682            autoplaySpeed: 5000,
683            variableWidth: true,
684            appendDots: $(".p-kurashiTop01__sliderBord .slick-dotBox"),
685            responsive: [
686                {
687                    breakpoint: breakPoint1,
688                    settings: {
689                        arrows: false,
690                        centerMode: false,
691                        adaptiveHeight: true,
692                        variableWidth: false,
693                    },
694                },
695            ],
696        });
697
698        $(".slick-prev2").on(_touch, function () {
699            $(".p-kurashiSlider").slick("slickPrev");
700        });
701        $(".slick-next2").on(_touch, function () {
702            $(".p-kurashiSlider").slick("slickNext");
703        });
704
705        $(".slick-prev3").on(_touch, function () {
706            $(".p-kurashiSlider").slick("slickPrev");
707        });
708        $(".slick-next3").on(_touch, function () {
709            $(".p-kurashiSlider").slick("slickNext");
710        });
711    }
712
713    if ($(".p-kurashiSlider li").length === 1) {
714        $(".slick-arrow3,.p-kurashiTop01__sliderBord").hide();
715    }
716
717    //くらしのサービス  特集一覧 その他の特集スライダー
718    if ($(".p-kurashiFeature03").length > 0) {
719        $(".p-kurashiFeature03__slider").slick({
720            arrows: true,
721            dots: false,
722            swipe: false,
723            draggable: false,
724            speed: 500,
725            autoplay: false,
726            autoplaySpeed: 5000,
727            responsive: [
728                {
729                    breakpoint: breakPoint1 + 1,
730                    settings: {
731                        dots: true,
732                    },
733                },
734            ],
735        });
736    }
737
738    //くらしのサービス お掃除カレンダー 今月枠複製
739    if ($(".p-kurashiCalendarBox").length > 0) {
740        /*
741        var dateMonth = new Date().getMonth() + 1;
742        if (dateMonth) {
743            $('.p-kurashiCalendar01__content01__txt01__' + dateMonth).addClass('is-thisMonth');
744            $('.p-kurashiCalendarBox--' + dateMonth).addClass('is-thisMonth');//*.addClass('is-thisMonth--' + dateMonth);
745        }
746        */
747        var kurashiCalendarThisMonth = $(
748            ".p-kurashiCalendar01__content02__calendarList",
749        )
750            .children(".is-thisMonth")
751            .clone();
752        $(".p-kurashiCalendar01__content01__calendar").html(
753            kurashiCalendarThisMonth,
754        );
755    }
756
757    //くらしのサービス 商品詳細 スライダー
758    if ($(".p-kurashiServiceDetail01__content01__slide").length > 0) {
759        $(".p-kurashiServiceDetail01__content01__slide").slick({
760            dots: true,
761            arrows: true,
762            speed: 500,
763            autoplay: true,
764            autoplaySpeed: 5000,
765            appendDots: $(
766                ".p-kurashiServiceDetail01__content01__sliderBord  .slider-dot",
767            ),
768            responsive: [
769                {
770                    breakpoint: breakPoint1,
771                    settings: {
772                        arrows: false,
773                    },
774                },
775            ],
776        });
777        $(".slider-prev").on(_touch, function () {
778            $(".p-kurashiServiceDetail01__content01__slide").slick("slickPrev");
779        });
780        $(".slider-next").on(_touch, function () {
781            $(".p-kurashiServiceDetail01__content01__slide").slick("slickNext");
782        });
783    }
784
785    if ($(".p-kurashiServiceDetail01__content01__slide li").length <= 1) {
786        $(".p-kurashiServiceDetail01__content01__sliderBord").hide();
787    }
788
789    //くらしのサービス カート リスト複製
790    if ($(".page-kurashi_cart").length > 0) {
791        var kurashiCartList = $(".p-kurashiCartList")
792            .children(".l-container02")
793            .clone();
794        $(".p-kurashiCartList2").html(kurashiCartList);
795    }
796
797    /*--------------------------------------------------------------------------------------------*/
798
799    /*-----------------------
800	* 葬祭
801	------------------------*/
802
803    //葬祭 カテゴリータイトル下に白背景ブロック挿入(サブナビありの場合)
804    if ($(".c-sosaiNaviPc").length > 0) {
805        $(".c-head07CateTitle").after(
806            '<div class="c-head07CateTitleBg"></div>',
807        );
808    }
809
810    //葬祭 コープの就活応援 タブ切り替え
811    $(".p-sosaiSeminar03__list__btn").on(_touch, function () {
812        if (!$(this).hasClass("is-open")) {
813            var tabID = $(this).attr("data-tabId");
814            $(".p-sosaiSeminar03__list__btn").removeClass("is-open");
815            $(".p-sosaiSeminar03__content").removeClass("is-open");
816            $(this).addClass("is-open");
817            $(tabID).addClass("is-open");
818        }
819    });
820
821    //葬祭 遺言・相続に関するご相談 タブ切り替え
822    $(".p-sosaiInheritance04__list__btn").on(_touch, function () {
823        if (!$(this).hasClass("is-open")) {
824            var tabID = $(this).attr("data-tabId");
825            $(".p-sosaiInheritance04__list__btn").removeClass("is-open");
826            $(".p-sosaiInheritance04__content").removeClass("is-open");
827            $(this).addClass("is-open");
828            $(tabID).addClass("is-open");
829        }
830    });
831
832    //葬祭  斎場情報詳細 スライダー
833    // if ($('.p-sosaiHallDetail02__content01__slideArea').length > 0) {
834    // 	$('.p-sosaiHallDetail02__content01__slideArea__slide ul').slick({
835    // 		arrows : true,
836    // 		dots : false,
837    // 		swipe : false,
838    // 		fade: true,
839    // 		draggable : false,
840    // 		speed : 500,
841    // 		autoplay : false,
842    // 		autoplaySpeed : 5000,
843    // 	});
844    // 	$('.p-sosaiHallDetail02__content01__slideArea__thumbnail li').each(function(){
845    // 		$(this).on(_touch, function(){
846    // 			var slideNum = $(this).index();
847    // 			$('.p-sosaiHallDetail02__content01__slideArea__slide ul').slick('slickGoTo', slideNum);
848
849    // 			var imgsrc = $(this).attr('src');
850    // 			//alert(imgsrc);
851    // 		});
852    // 	});
853    // }
854
855    if ($(".p-sosaiHallDetail02__content01__slideArea").length > 0) {
856        $(".slider-single").slick({
857            slidesToShow: 1,
858            slidesToScroll: 1,
859            arrows: true,
860            fade: false,
861            adaptiveHeight: true,
862            infinite: true,
863            useTransform: true,
864            speed: 400,
865        });
866
867        $(".slider-nav")
868            .on("init", function (event, slick) {
869                $(".slider-nav .slick-slide.slick-current").addClass(
870                    "is-active",
871                );
872            })
873            .slick({
874                slidesToShow: 5,
875                slidesToScroll: 1,
876                dots: false,
877                infinite: false,
878                variableWidth: true,
879                autoplay: false,
880                fade: false,
881            });
882        $(".slider-single").on(
883            "afterChange",
884            function (event, slick, currentSlide) {
885                $(".slider-nav").slick("slickGoTo", currentSlide);
886                var currrentNavSlideElem =
887                    '.slider-nav .slick-slide[data-slick-index="' +
888                    currentSlide +
889                    '"]';
890                $(".slider-nav .slick-slide.is-active").removeClass(
891                    "is-active",
892                );
893                $(currrentNavSlideElem).addClass("is-active");
894            },
895        );
896
897        $(".slider-nav").on("click", ".slick-slide", function (event) {
898            event.preventDefault();
899            var goToSingleSlide = $(this).data("slick-index");
900
901            $(".slider-single").slick("slickGoTo", goToSingleSlide);
902        });
903    }
904
905    //葬祭 ラビュー(しずおか)の料金プラン アコーディオン
906    $(".p-sosaiPrice-shizuokaPlanArea__detail").each(function () {
907        $(this)
908            .children("dt")
909            .on(_touch, function () {
910                if ($(this).parent().hasClass("is-open")) {
911                    $(this).parent().removeClass("is-open");
912                    $(this).next("dd").stop().slideUp("fast");
913                } else {
914                    $(this).parent().addClass("is-open");
915                    $(this).next("dd").stop().slideDown("fast");
916                }
917            });
918    });
919
920    /*--------------------------------------------------------------------------------------------*/
921    if (
922        $(".c-head03Pc").length > 0 ||
923        $(".c-head04Pc").length > 0 ||
924        $(".c-head05Pc").length > 0 ||
925        $(".c-head06Pc").length > 0
926    ) {
927        $(".c-headCateTitle").after('<div class="c-headCateTitleBg"></div>');
928    }
929});
930
931/*--------------------------------------------------------------------------------------------*/
932
933/*-----------------------
934 * windowロード後に発火
935 ------------------------*/
936$(window).on("load", function () {
937    /*-----------------------
938	* 共通
939	------------------------*/
940
941    //windowロード後に画面表示(カバーレイヤー外す)
942    $(".c-overlay01").hide(0);
943
944    if ($(window).innerWidth() <= 500) {
945        let table_scroll = $(".c-contentPost01").find(".c-tbStyle1");
946        table_scroll.each(function () {
947            let table_width = parseInt($(this).css("min-width"), 10);
948            if (table_width > $(window).innerWidth() - 40) {
949                $(this).wrapAll('<div class="table-scroll"></div>');
950            }
951        });
952    }
953
954    /*--------------------------------------------------------------------------------------------*/
955});
956
957/*--------------------------------------------------------------------------------------------*/
958
959/*-----------------------
960 * windowロード・リサイズ後に発火
961 ------------------------*/
962$(window).on("load resize", function () {
963    /*-----------------------
964	* くらしのサービス
965	------------------------*/
966
967    //くらしのサービス お掃除カレンダー 高ã
967•調整
968    $(".p-kurashiCalendarBox__txt").removeAttr("style");
969    var maxHeight = 0;
970    for (i = 0; i <= $(".p-kurashiCalendarBox__txt").length; i++) {
971        if ($(".p-kurashiCalendarBox__txt").eq(i).innerHeight() > maxHeight) {
972            maxHeight = $(".p-kurashiCalendarBox__txt").eq(i).innerHeight();
973        }
974    }
975    $(".p-kurashiCalendarBox__txt").innerHeight(maxHeight);
976});
977
978/*--------------------------------------------------------------------------------------------*/
979
980/*--------------------------------------------------------------------------------------------*/
981
982/*-----------------------
983 * windowロード及びスクロールで発火
984 ------------------------*/
985
986$window.on("load scroll", function () {
987    if ($(window).innerWidth() < 500) {
988        $(".table-scroll").removeClass("hide");
989        $(".table-scroll").length &&
990            $(".table-scroll").on("scroll", function () {
991                10 < $(this).scrollLeft()
992                    ? $(this).addClass("is-hide")
993                    : $(this).removeClass("is-hide");
994            });
995    } else {
996        $(".table-scroll").addClass("hide");
997    }
998
999    /*-----------------------
1000	* 葬祭
1001	------------------------*/
1002
1003    //葬祭メニュー追従(サブナビありの場合)
1004    if ($(".c-sosaiNaviPc").length > 0) {
1005        if ($window.scrollTop() >= 120) {
1006            $(".c-sosaiNaviPc")
1007                .css({
1008                    top: 0,
1009                    position: "fixed",
1010                })
1011                .addClass("u-headPcScroll");
1012        } else {
1013            $(".c-sosaiNaviPc")
1014                .removeAttr("style")
1015                .removeClass("u-headPcScroll");
1016        }
1017    }
1018
1019    /*--------------------------------------------------------------------------------------------*/
1020    if (
1021        $(".c-head03Pc").length > 0 ||
1022        $(".c-head04Pc").length > 0 ||
1023        $(".c-head05Pc").length > 0 ||
1024        $(".c-head06Pc").length > 0
1025    ) {
1026        if ($window.scrollTop() >= 50) {
1027            $(".c-headCateTitle").css({
1028                "padding-top": "10px",
1029                top: 0,
1030                position: "fixed",
1031            });
1032            $(".c-headCateTitleBg").css({
1033                height: "60px",
1034                top: 0,
1035                position: "fixed",
1036            });
1037            $(".c-head03BtnPc").css({
1038                top: 0,
1039                position: "fixed",
1040            });
1041            $(".c-head03BtnPc__btn").css({
1042                height: "60px",
1043            });
1044            $(".c-head03BtnPc__btn--1 a").css({
1045                "padding-top": "35px",
1046                "background-position": "center 10px",
1047            });
1048            $(".c-head03BtnPc__btn--2 a span").css({
1049                height: "60px",
1050                "padding-top": "16px",
1051                "background-position": "49% 17px",
1052            });
1053            $(".c-head04BtnPc").css({
1054                top: 0,
1055                position: "fixed",
1056            });
1057            $(".c-head05BtnPc").css({
1058                top: 0,
1059                position: "fixed",
1060            });
1061            $(".c-head06BtnPc").css({
1062                top: 0,
1063                position: "fixed",
1064            });
1065        } else {
1066            $(
1067                ".c-headCateTitle, .c-head03BtnPc, .c-head03BtnPc__btn, .c-head03BtnPc__btn--1 a, .c-head03BtnPc__btn--2 a span, .c-head04BtnPc, .c-head05BtnPc, .c-head05BtnPc__btn, .c-head05BtnPc__btn--1, .c-head06BtnPc, .c-head06BtnPc__btn, .c-head06BtnPc__btn a, .c-headCateTitleBg",
1068            ).removeAttr("style");
1069        }
1070    }
1071
1072    var tg_cartBtn_flex1 =
1073            $(window).scrollTop() + $(".c-hokenBlock01__title").innerHeight(),
1074        content__flex1 = $(".c-hokenBlock01__title").offset().top;
1075
1076    if (tg_cartBtn_flex1 > content__flex1) {
1077        $(".c-cartBtn__fixed").show().addClass("is-active");
1078    } else {
1079        $(".c-cartBtn__fixed").removeClass("is-active");
1080    }
1081
1082    if ($(window).innerWidth() < 768) {
1083        tg_cartBtn_flex2 =
1084            $(window).scrollTop() +
1085            $(".p-hokenRequest02-2").find(".p-hokenCart").innerHeight() +
1086            $(".p-hokenRequest02-2").find(".c-cartBtn__flex2").innerHeight();
1087    } else {
1088        tg_cartBtn_flex2 =
1089            $(window).scrollTop() +
1090            $(".p-hokenRequest02-2").find(".p-hokenCart").innerHeight() +
1091            $(".p-hokenRequest02-2").innerHeight() +
1092            80;
1093    }
1094
1095    var content__flex2 = $(".p-hokenRequest02-2")
1096        .find(".p-hokenCart")
1097        .offset().top;
1098
1099    if (tg_cartBtn_flex2 > content__flex2) {
1100        $(".c-cartBtn__fixed").removeClass("is-active");
1101    }
1102});
1103
1104/*--------------------------------------------------------------------------------------------*/
1105
1106// コンポーネントJS
1107/*--------------------------------------------------------------------------------------------*/
1108$(function () {
1109    $(".c-sidebarListMenu__list-box")
1110        .not(".is-open")
1111        .find(".c-sidebarListMenu__list-item")
1112        .hide();
1113    $(".jsShowHide").click(function (e) {
1114        e.preventDefault();
1115        $(this).parents(".c-sidebarListMenu__list-box").toggleClass("is-open");
1116        $(this).parent().next().slideToggle();
1117    });
1118
1119    $(".c-listLink__item").not(".is-open").find(".c-listLink__list").hide();
1120    $(".jsShowMore").click(function (e) {
1121        e.preventDefault();
1122        $(this).parents(".c-listLink__item").toggleClass("is-open");
1123        $(this).next().slideToggle();
1124    });
1125
1126    if ("objectFit" in document.documentElement.style === false) {
1127        var container = document.getElementsByClassName("jsFitCover");
1128        for (var i = 0; i < container.length; i++) {
1129            var imageSource = container[i].querySelector("img").src;
1130            var imageHeight = container[i].querySelector("img").height;
1131            container[i].querySelector("img").style.display = "none";
1132            container[i].style.backgroundSize = "cover";
1133            container[i].style.backgroundImage = "url(" + imageSource + ")";
1134            container[i].style.backgroundPosition = "center center";
1135            container[i].style.height = imageHeight + "px";
1136        }
1137    }
1138
1139    if ($(".jsSlider1").length > 0) {
1140        $(".jsSlider1").slick({
1141            slidesToShow: 3,
1142            slidesToScroll: 1,
1143            autoplay: true,
1144            dots: true,
1145            focusOnSelect: true,
1146            appendDots: $(".slider-dot"),
1147            prevArrow: $(".slider-prev"),
1148            nextArrow: $(".slider-next"),
1149            responsive: [
1150                {
1151                    breakpoint: 767,
1152                    settings: {
1153                        slidesToShow: 1,
1154                        centerMode: true,
1155                        centerPadding: 0,
1156                    },
1157                },
1158            ],
1159        });
1160
1161        $(".jsSlider1").on("setPosition", function () {
1162            $(this).find(".slick-slide").height("auto");
1163            var slickTrack = $(this).find(".slick-track");
1164            var slickTrackHeight = $(slickTrack).height();
1165            var sliderImageHeight = $(".c-article__image").height();
1166            $(this)
1167                .find(".slick-slide")
1168                .css("height", slickTrackHeight + "px");
1169            $(this)
1170                .find(".c-article__content")
1171                .css("height", "calc(100% - " + sliderImageHeight + "px)");
1172        });
1173    }
1174
1175    if ($(".jsSlider1--col2").length > 0) {
1176        $(".jsSlider1--col2").slick({
1177            slidesToShow: 2,
1178            slidesToScroll: 1,
1179            autoplay: true,
1180            dots: true,
1181            focusOnSelect: true,
1182            appendDots: $(".slider-dot"),
1183            prevArrow: $(".slider-prev"),
1184            nextArrow: $(".slider-next"),
1185            responsive: [
1186                {
1187                    breakpoint: 767,
1188                    settings: {
1189                        slidesToShow: 1,
1190                        centerMode: true,
1191                        centerPadding: 0,
1192                    },
1193                },
1194            ],
1195        });
1196
1197        $(".jsSlider1--col2").on("setPosition", function () {
1198            $(this).find(".slick-slide").height("auto");
1199            var slickTrack = $(this).find(".slick-track");
1200            var slickTrackHeight = $(slickTrack).height();
1201            var sliderImageHeight = $(".c-article__image").height();
1202            $(this)
1203                .find(".slick-slide")
1204                .css("height", slickTrackHeight + "px");
1205            $(this)
1206                .find(".c-article__content")
1207                .css("height", "calc(100% - " + sliderImageHeight + "px)");
1208        });
1209    }
1210
1211    if ($(".jsSlider2").length > 0) {
1212        $(".jsSlider2").slick({
1213            slidesToShow: 3,
1214            slidesToScroll: 1,
1215            autoplay: false,
1216            // autoplay: true,
1217            dots: true,
1218            focusOnSelect: true,
1219            appendDots: $(".slider-dot"),
1220            prevArrow: $(".slider-prev"),
1221            nextArrow: $(".slider-next"),
1222            responsive: [
1223                {
1224                    breakpoint: 767,
1225                    settings: {
1226                        slidesToShow: 1,
1227                        centerMode: true,
1228                        variableWidth: true,
1229                    },
1230                },
1231            ],
1232        });
1233    }
1234});
1235
1236// Search service
1237
1238var services = $("#service .c-card2__item").clone();
1239
1240//pagination
1241var pagination = $(".pagination");
1242if (pagination.length > 0) {
1243    function setPagination(items) {
1244        pagination.jPages({
1245            containerID: "service",
1246            perPage: items,
1247            startPage: 1,
1248            startRange: 1,
1249            midRange: 10,
1250            endRange: 0,
1251            first: false,
1252            last: false,
1253        });
1254    }
1255
1256    // setPagination(8);
1257
1258    function showPage(breakpoint) {
1259        if (breakpoint.matches) {
1260            setPagination(4);
1261            $("#type_service").change(function () {
1262                var val = $(this).val();
1263                $("#service").empty();
1264                var serviceItem = services.filter(function (idx, el) {
1265                    return (
1266                        val === "ALL" ||
1267                        $(el)
1268                            .find(".c-card2__title")
1269                            .text()
1270                            .indexOf("" + val + "") >= 0
1271                    );
1272                });
1273                serviceItem.appendTo("#service");
1274
1275                if (serviceItem.length <= 4) {
1276                    $("#pagination").addClass("display-none");
1277                } else {
1278                    $("#pagination").removeClass("display-none");
1279                }
1280
1281                var newPerPage = parseInt(4);
1282                $("div.holder").jPages("destroy").jPages({
1283                    containerID: "service",
1284                    perPage: newPerPage,
1285                });
1286            });
1287        } else {
1288            setPagination(8);
1289            $("#type_service").change(function () {
1290                var val = $(this).val();
1291                $("#service").empty();
1292                var serviceItem = services.filter(function (idx, el) {
1293                    return (
1294                        val === "ALL" ||
1295                        $(el)
1296                            .find(".c-card2__title")
1297                            .text()
1298                            .indexOf("" + val + "") >= 0
1299                    );
1300                });
1301                serviceItem.appendTo("#service");
1302
1303                if (serviceItem.length <= 8) {
1304                    $("#pagination").addClass("display-none");
1305                } else {
1306                    $("#pagination").removeClass("display-none");
1307                }
1308
1309                var newPerPage = parseInt(8);
1310                $("div.holder").jPages("destroy").jPages({
1311                    containerID: "service",
1312                    perPage: newPerPage,
1313                });
1314            });
1315        }
1316    }
1317
1318    var breakpoint = window.matchMedia("(max-width:" + breakPoint1 + "px)");
1319    breakpoint.addListener(showPage);
1320    if ($("#service").length > 0) {
1321        showPage(breakpoint);
1322    }
1323}
1324
1325/* pagination  /service/kurashi/feature & /service/kurashi/service
1326--------------------------------------------------------------------------------------------*/
1327$(function () {
1328    if ($("#kurashi-js").length > 0) {
1329        var kurashiPager01 = $("#kurashi-js .c-card2__item").clone();
1330        var item02 = 12;
1331        if ($(window).width() < breakPoint1 + 1) {
1332            item02 = 10;
1333        }
1334        if (kurashiPager01.length <= item02) {
1335            $(".c-kurashiPager01").hide();
1336        } else {
1337            $(".c-kurashiPager01").show();
1338        }
1339        $(".kurashiPager01-js").jPages({
1340            containerID: "kurashi-js",
1341            perPage: item02,
1342            startPage: 1,
1343            startRange: 1,
1344            midRange: 10,
1345            endRange: 1,
1346            callback: function (pages, items) {
1347                $("#kurashiPager01-js").html(pages.current + "/" + pages.count);
1348            },
1349        });
1350        $(".kurashiPager01-js a").removeAttr("href");
1351
1352        $(".kurashiPager01-js a").on("click", function () {
1353            $("body,html").animate(
1354                {
1355                    scrollTop: 0,
1356                },
1357                1000,
1358            );
1359            return true;
1360        });
1361    }
1362});
1363
1364/* pagination  /service/kurashi/service/detail.php
1365--------------------------------------------------------------------------------------------*/
1366$(function () {
1367    if ($("#kurashi02-js").length > 0) {
1368        var kurashiPager02 = $("#kurashi02-js .c-card2__item").clone();
1369        var item03 = 4;
1370        if (kurashiPager02.length <= item03) {
1371            $(".c-kurashiPager01").hide();
1372        } else {
1373            $(".c-kurashiPager01").show();
1374        }
1375        $(".kurashiPager01-js").jPages({
1376            containerID: "kurashi02-js",
1377            perPage: item03,
1378            startPage: 1,
1379            startRange: 1,
1380            midRange: 10,
1381            endRange: 1,
1382            callback: function (pages, items) {
1383                $("#kurashiPager01-js").html(pages.current + "/" + pages.count);
1384            },
1385        });
1386        $(".kurashiPager01-js a").removeAttr("href");
1387    }
1388});
1389
1390/* pagination  /service/ticket/feature
1391--------------------------------------------------------------------------------------------*/
1392$(function () {
1393    if ($("#ticket-js").length > 0) {
1394        var ticketPager01 = $("#ticket-js .c-tiketItems01__item").clone();
1395        var item03 = 9;
1396        if ($(window).width() < breakPoint1 + 1) {
1397            item03 = 10;
1398        }
1399        if (ticketPager01.length <= item03) {
1400            $(".c-ticketPager01").hide();
1401        } else {
1402            $(".c-ticketPager01").show();
1403        }
1404        $(".ticketPager01-js").jPages({
1405            containerID: "ticket-js",
1406            perPage: item03,
1407            startPage: 1,
1408            startRange: 1,
1409            midRange: 10,
1410            endRange: 1,
1411            callback: function (pages, items) {
1412                $("#ticketPager01-js").html(pages.current + "/" + pages.count);
1413            },
1414        });
1415        $(".ticketPager01-js a").removeAttr("href");
1416
1417        $(".ticketPager01-js a").on("click", function () {
1418            $("body,html").animate(
1419                {
1420                    scrollTop: $(".p-ticketFeature01__text").offset().top - 70,
1421                },
1422                1000,
1423            );
1424            return true;
1425        });
1426    }
1427});
1428
1429/* pagination  /service/ticket/service
1430--------------------------------------------------------------------------------------------*/
1431$(function () {
1432    if ($("#ticketService-js").length > 0) {
1433        var ticketPager02 = $(
1434            "#ticketService-js .c-tiketItems02__item",
1435        ).clone();
1436        var item03 = 9;
1437        if ($(window).width() < breakPoint1 + 1) {
1438            item03 = 10;
1439        }
1440        if (ticketPager02.length <= item03) {
1441            $(".c-ticketPager01").hide();
1442        } else {
1443            $(".c-ticketPager01").show();
1444        }
1445        $(".ticketPager01-js").jPages({
1446            containerID: "ticketService-js",
1447            perPage: item03,
1448            startPage: 1,
1449            startRange: 1,
1450            midRange: 10,
1451            endRange: 1,
1452            callback: function (pages, items) {
1453                $("#ticketPager01-js").html(pages.current + "/" + pages.count);
1454            },
1455        });
1456        $(".ticketPager01-js a").removeAttr("href");
1457
1458        $(".page-ticket_service .ticketPager01-js a").on("click", function () {
1459            $("body,html").animate(
1460                {
1461                    scrollTop: 0,
1462                },
1463                1000,
1464            );
1465            return true;
1466        });
1467    }
1468});
1469
1470/* pagination  /service/ticket/service/detail.php
1471--------------------------------------------------------------------------------------------*/
1472$(function () {
1473    $(window).on("resize", function () {
1474        if ($(window).width() <= breakPoint1 + 1) {
1475            $("#ticketService02-js li:nth-of-type(4)").css({
1476                display: "",
1477                opacity: "1",
1478            });
1479        } else {
1480            $("#ticketService02-js li:nth-of-type(4)").css({
1481                display: "none",
1482                opacity: "",
1483            });
1484        }
1485    });
1486    if ($("#ticketService02-js").length > 0) {
1487        var ticketPager02 = $(
1488            "#ticketService02-js .c-tiketItems02__item",
1489        ).clone();
1490        var item = 3;
1491        if ($(window).width() < breakPoint1 + 1) {
1492            item = 4;
1493        }
1494        if (ticketPager02.length <= item) {
1495            $(".c-ticketPager01").hide();
1496        } else {
1497            $(".c-ticketPager01").show();
1498        }
1499        $(".ticketPager01-js").jPages({
1500            containerID: "ticketService02-js",
1501            perPage: item,
1502            startPage: 1,
1503            startRange: 1,
1504            midRange: 10,
1505            endRange: 1,
1506            callback: function (pages, items) {
1507                $("#ticketPager01-js").html(pages.current + "/" + pages.count);
1508            },
1509        });
1510        $(".ticketPager01-js a").removeAttr("href");
1511    }
1512});
1513
1514/* pagination  /service/sosai/hall/kanagawa
1515--------------------------------------------------------------------------------------------*/
1516$(function () {
1517    if ($("#kanagawa-js").length > 0) {
1518        var sosaiPager01 = $("#kanagawa-js dl").clone();
1519        $(".sosaiPager01-js").jPages({
1520            containerID: "kanagawa-js",
1521            perPage: 5,
1522            startPage: 1,
1523            startRange: 1,
1524            midRange: 2,
1525            endRange: 1,
1526        });
1527        if (sosaiPager01.length <= 5) {
1528            $(".c-sosaiPager01").hide();
1529        } else {
1530            $(".c-sosaiPager01").show();
1531        }
1532        $(".sosaiPager01-js a").removeAttr("href");
1533
1534        $(".sosaiPager01-js a").on("click", function () {
1535            $("body,html").animate(
1536                {
1537                    scrollTop: $(".sosaiHallKanagawa03").offset().top - 70,
1538                },
1539                1000,
1540            );
1541            return true;
1542        });
1543    }
1544});
1545
1546/* checkbox checked when lick lable
1547 --------------------------------------------------------------------------------------------*/
1548$("[data-labelfor]").click(function () {
1549    $("#" + $(this).attr("data-labelfor")).prop(
1550        "checked",
1551        function (i, oldVal) {
1552            return !oldVal;
1553        },
1554    );
1555});
1556/*-----------------------
1557 * スクロールしたら表示する
1558 ------------------------*/
1559$(function () {
1560    var topBtn = $(".c-pagetop");
1561    var hfooter = $(
1562        ".c-foot01, .c-foot02, .c-foot03, .c-foot04, .c-foot05, .c-foot06, .c-foot07",
1563    ).height();
1564    topBtn.hide();
1565    //スクロールが100に達したらボタン表示
1566    $(window).scroll(function () {
1567        if ($(window).width() > 767) {
1568            if (
1569                $(this).scrollTop() < 100 ||
1570                $(this).scrollTop() >
1571                    $(document).height() - $(window).height() - hfooter
1572            ) {
1573                //if ($(this).scrollTop() > 100) {
1574                topBtn.fadeOut();
1575            } else {
1576                topBtn.fadeIn();
1577            }
1578        } else {
1579            if ($(this).scrollTop() > 100) {
1580                topBtn.fadeIn();
1581            }
1582        }
1583    });
1584    //スクロールしてトップ
1585    topBtn.click(function () {
1586        $("body,html").animate(
1587            {
1588                scrollTop: 0,
1589            },
1590            500,
1591        );
1592        return false;
1593    });
1594});
1595
1596/* smoth crolling
1597 --------------------------------------------------------------------------------------------*/
1598
1599if (!$("#is-request").length) {
1600    $(document).on("click", 'a[href^="#"]', function (event) {
1601        event.preventDefault();
1602        $("html, body").animate(
1603            {
1604                scrollTop: $($.attr(this, "href")).offset().top - 50,
1605            },
1606            500,
1607        );
1608    });
1609}
1610
1611/* current tab js service/info
1612 --------------------------------------------------------------------------------------------*/
1613// $(function() {
1614// 	var pathname = window.location.href.replace(window.location.origin, "");
1615// 	$('.p-serviceInfoIndex02__tab a').removeClass('current');
1616// $('.p-serviceInfoIndex02__tab a[href="'+pathname+'"]').addClass('current');
1617// });
1618
1619/* typewriter service/reform
1620 --------------------------------------------------------------------------------------------*/
1621$(function () {
1622    // if ($('.p-reformTop').length > 0) {
1623    // 	var str = "<p class='p-reformTop01__txt01--color2'> 笑顔があふれる<br class='sp-only'><span style='color:red;'>快適リフォーム</span> <br>しませんか?</p>",
1624    // 	i = 0, isTag, text;
1625    // 	(function type() {
1626    // 		text = str.slice(0, ++i);
1627    // 		if (text === str) return;
1628    // 		document.getElementById('typewriter').innerHTML = text;
1629    // 		var char = text.slice(-1);
1630    // 		if( char === '<' ) isTag = true;
1631    // 		if( char === '>' ) isTag = false;
1632    // 		if (isTag) return type();
1633    // 		setTimeout(type, 50);
1634    // 	}());
1635    // }
1636    //$(' .p-reformTop01__txt01--color2').fadeIn(1000);
1637});
1638
1639/* fadeIn service/reform
1640 --------------------------------------------------------------------------------------------*/
1641$(function () {
1642    $(".js-fade").on(
1643        "inview",
1644        function (event, isInView, visiblePartX, visiblePartY) {
1645            if (isInView) {
1646                $(this).stop().addClass("is-effect");
1647            }
1648        },
1649    );
1650});
1651
1652/* fadeIn service/sosai
1653 --------------------------------------------------------------------------------------------*/
1654$(function () {
1655    $(".js-fade02").on(
1656        "inview",
1657        function (event, isInView, visiblePartX, visiblePartY) {
1658            if (isInView) {
1659                $(this).stop().addClass("is-fade02");
1660            }
1661        },
1662    );
1663    $(".js-fade03").on(
1664        "inview",
1665        function (event, isInView, visiblePartX, visiblePartY) {
1666            if (isInView) {
1667                $(this).stop().addClass("is-fade03");
1668            }
1669        },
1670    );
1671    $(".js-move").on(
1672        "inview",
1673        function (event, isInView, visiblePartX, visiblePartY) {
1674            if (isInView) {
1675                $(this).stop().addClass("is-move");
1676            }
1677        },
1678    );
1679});
1680
1681/* pager service/ticket/service
1682 --------------------------------------------------------------------------------------------*/
1683$(".p-ticketService02__pagerPC ul > li > a").click(function () {
1684    $(this).parent().addClass("is-active").siblings().removeClass("is-active");
1685});
1686
1687/* click open sp menu service/ticket
1688 --------------------------------------------------------------------------------------------*/
1689$(".ticketSP > dt > a").each(function () {
1690    $(this).removeAttr("href");
1691    $(this).on(_touch, function () {
1692        if (!$(this).parents(".c-spMenuAccordion").hasClass("is-open")) {
1693            $(this).parents(".c-spMenuAccordion").addClass("is-open");
1694        } else {
1695            $(this).parents(".c-spMenuAccordion").removeClass("is-open");
1696        }
1697    });
1698});
1699
1700/* click open sp menu service/reform
1701 --------------------------------------------------------------------------------------------*/
1702$(".c-spMenuAccordion2 > dt > a").each(function () {
1703    $(this).removeAttr("href");
1704    $(this).on(_touch, function () {
1705        if (!$(this).parents(".c-spMenuAccordion2").hasClass("is-open")) {
1706            $(this).parents(".c-spMenuAccordion2").addClass("is-open");
1707        } else {
1708            $(this).parents(".c-spMenuAccordion2").removeClass("is-open");
1709        }
1710    });
1711});
1712
1713/* click open sp menu service/kurashi
1714 --------------------------------------------------------------------------------------------*/
1715$(".c-head06GnaviSp__navi > dt > a").each(function () {
1716    $(this).removeAttr("href");
1717    $(this).on(_touch, function () {
1718        if (!$(this).parents(".c-head06GnaviSp__navi").hasClass("is-open")) {
1719            $(this).parents(".c-head06GnaviSp__navi").addClass("is-open");
1720        } else {
1721            $(this).parents(".c-head06GnaviSp__navi").removeClass("is-open");
1722        }
1723    });
1724});
1725
1726/* click open sp menu service/sosai
1727 --------------------------------------------------------------------------------------------*/
1728$(".c-head07GnaviSp__navi > dt > a").each(function () {
1729    $(this).removeAttr("href");
1730    $(this).on(_touch, function () {
1731        if (!$(this).parents(".c-head07GnaviSp__navi").hasClass("is-open")) {
1732            $(this).parents(".c-head07GnaviSp__navi").addClass("is-open");
1733        } else {
1734            $(this).parents(".c-head07GnaviSp__navi").removeClass("is-open");
1735        }
1736    });
1737});
1738
1739/* page service/faq.php
1740 --------------------------------------------------------------------------------------------*/
1741if ($(".p-serviceFaq").length > 0) {
1742    $(function () {
1743        $(".is-open").find(".p-serviceFaq__box__a").show();
1744    });
1745    $(".p-serviceFaq__box__q").on("click", function () {
1746        $(this).parent().toggleClass("is-open");
1747        $(this).next().slideToggle(500);
1748    });
1749}
1750
1751/* page service/ticket/faq
1752 --------------------------------------------------------------------------------------------*/
1753if ($(".p-ticketFaq").length > 0) {
1754    $(function () {
1755        $(".is-open").find(".p-ticketFaq__box__a").show();
1756    });
1757    $(".p-ticketFaq__box__q").on("click", function () {
1758        $(this).parent().toggleClass("is-open");
1759        $(this).next().slideToggle(500);
1760    });
1761}
1762
1763/* page service/hoken, service/hoken/faq
1764 --------------------------------------------------------------------------------------------*/
1765if ($(".p-hokenFaq, .p-hokenFaqChild").length > 0) {
1766    $(function () {
1767        $(".is-open").find(".p-hokenFaq__box__a").show();
1768    });
1769    $(".p-hokenFaq__box__q").on("click", function () {
1770        $(this).parent().toggleClass("is-open");
1771        $(this).next().slideToggle(500);
1772    });
1773}
1774
1775/* page service/reform/faq
1776 --------------------------------------------------------------------------------------------*/
1777if ($(".p-reformFaq").length > 0) {
1778    $(function () {
1779        $(".is-open").find(".p-reformFaq__box__a").show();
1780    });
1781    $(".p-reformFaq__box__q").on("click", function () {
1782        $(this).parent().toggleClass("is-open");
1783        $(this).next().slideToggle(500);
1784    });
1785}
1786
1787/* page service/kurashi/faq
1788 --------------------------------------------------------------------------------------------*/
1789if ($(".p-kurashiFaq").length > 0) {
1790    $(function () {
1791        $(".is-open").find(".p-kurashiFaq__box__a").show();
1792    });
1793    $(".p-kurashiFaq__box__q").on("click", function () {
1794        $(this).parent().toggleClass("is-open");
1795        $(this).next().slideToggle(500);
1796    });
1797}
1798
1799/* page service/sosai/faq
1800 --------------------------------------------------------------------------------------------*/
1801if ($(".p-sosaiFaq").length > 0) {
1802    $(function () {
1803        $(".is-open").find(".p-sosaiFaq__box__a").show();
1804    });
1805    $(".p-sosaiFaq__box__q").on("click", function () {
1806        $(this).parent().toggleClass("is-open");
1807        $(this).next().slideToggle(500);
1808    });
1809}
1810
1811/* page service/contact.php
1812 --------------------------------------------------------------------------------------------*/
1813if ($(".p-serviceContact").length > 0) {
1814    $(".js-contact").hide();
1815    $(".p-serviceContact__title02").on("click", function () {
1816        $(this).toggleClass("is-close");
1817        $(this).next(".js-contact").slideToggle(500);
1818    });
1819}
1820
1821/* page /service/reform/calendar/
1822 --------------------------------------------------------------------------------------------*/
1823if ($(".p-reformCalendar").length > 0) {
1824    if ($(window).width() < 767) {
1825        $(".p-reformCalendar__box__content").hide();
1826    }
1827    $(function () {
1828        $(".is-open02").find("p-reformCalendar__box__content").show();
1829    });
1830    $(".p-reformCalendar__box__title").on("click", function () {
1831        $(this).parent().toggleClass("is-open02");
1832        $(this).next().slideToggle(500);
1833    });
1834}
1835
1836/* Check portrait or landscape
1837 --------------------------------------------------------------------------------------------*/
1838$(window).on("load resize", function (e) {
1839    if ($(window).width() < 767) {
1840        applyOrientation();
1841    }
1842});
1843
1844function applyOrientation() {
1845    if (window.innerHeight > window.innerWidth) {
1846        $(".p-ticketTop01__slide__img")
1847            .addClass("portrait")
1848            .removeClass("landscape");
1849    } else {
1850        $(".p-ticketTop01__slide__img")
1851            .addClass("landscape")
1852            .removeClass("portrait");
1853    }
1854}
1855
1856$(document).ready(function () {
1857    $("#myiframe").load(function () {
1858        if (typeof $(this).attr("height") == "undefined") {
1859            $(this).height(
1860                this.contentWindow.document.documentElement.scrollHeight,
1861            );
1862        }
1863    });
1864    $("#myiframe").triggerHandler("load");
1865
1866    $("#myiframe02").load(function () {
1867        if (typeof $(this).attr("height") == "undefined") {
1868            $(this).height(
1869                this.contentWindow.document.documentElement.scrollHeight + 60,
1870            );
1871        }
1872    });
1873    $("#myiframe02").triggerHandler("load");
1874});
1875
1876$(document).ready(function () {
1877    if ($(window).width() > 767) {
1878        var kurashiHeight = $(".c-foot06Navi01__content").height();
1879        var newkurashiHeight = kurashiHeight / 3 + 30;
1880        $(".c-foot06Navi01__content dl").css("height", newkurashiHeight);
1881    }
1882});
1883
1884$(document).ready(function () {
1885    if ($(window).width() > 767) {
1886        var ticketHeight = $(".c-foot03Navi").height();
1887        var newticketHeight = ticketHeight / 2 + 30;
1888        $(".c-foot03Navi dl").css("height", newticketHeight);
1889    }
1890});
1891
1892/*
1893 --------------------------------------------------------------------------------------------*/
1894
1895$(document).ready(function () {
1896    if ($("body").hasClass("page-sosai_hall_area")) {
1897        var sosai_offset = $(".sosaiHallKanagawa03__content01").offset().top;
1898        $("html, body").animate({ scrollTop: sosai_offset - 100 });
1899    }
1900});
1901
1902$(document).ready(function () {
1903    if ($("body").hasClass("page-sosai_hall_area")) {
1904        var sosai_offset = $(".sosaiHallKanagawa03__content01").offset().top;
1905        $("html, body").animate({ scrollTop: sosai_offset - 100 }, 2000);
1906    }
1907});
1908
1909function msieversion() {
1910    var ua = window.navigator.userAgent;
1911    var msie = ua.indexOf("MSIE ");
1912
1913    if (msie > 0 || !!navigator.userAgent.match(/Trident.*rv\:11\./)) {
1914        // If Internet Explorer, return version number
1915        $(".c-step2").find("li").addClass("fixed-center");
1916        $(".c-hokenMoushikomi .c-hokenBtn03").addClass("fixed-center");
1917        $(".c-hokenMoushikomi .c-hokenBtn04").addClass("fixed-center");
1918    }
1919
1920    return false;
1921}
1922msieversion();
1923
1924$(".p-hokenLpSippei3__info").matchHeight();
1925
1926$(document).ready(function () {
1927    $(".p-hokenLpKega6__q").on("click", function () {
1928        var parent = $(this).parents(".p-hokenLpKega6__txt1");
1929        parent.find(".p-hokenLpKega6__a").slideToggle(300);
1930        $(this).toggleClass("is-active");
1931    });
1932});
1933
1934/* accordion
1935--------------------------------------------------------------------------------------------*/
1936
1937$(".js-accordion").on("click", function () {
1938    if (!$(this).hasClass("is-active")) {
1939        $(this).addClass("is-active").siblings().slideToggle("slow");
1940    } else {
1941        $(this).removeClass("is-active").siblings().slideToggle("slow");
1942    }
1943    return false;
1944});
1945
1946/* ======================================
1947body fix
1948====================================== */
1949var scrollPosi;
1950
1951function bodyFix() {
1952    scrollPosi = $(window).scrollTop();
1953    $body.css({
1954        position: "fixed",
1955        width: "100%",
1956        "z-index": "1",
1957        top: -scrollPosi,
1958        // "overflow-y": "scroll",
1959    });
1960}
1961
1962function bodyFixReset() {
1963    $body.css({
1964        position: "relative",
1965        width: "auto",
1966        top: "0",
1967    });
1968    $bodyHtml.scrollTop(scrollPosi);
1969}
1970
1971$(".c-cartBtn__btn05.next,.p-hokenRequest .next").on("click", function () {
1972    $(".c-hoken__popup").fadeIn();
1973    bodyFix();
1974});
1975
1976$("#popup_close").on("click", function () {
1977    $(".c-hoken__popup").fadeOut();
1978    bodyFixReset();
1979});
1980
1981// check safari
1982if (
1983    navigator.userAgent.indexOf("Safari") != -1 &&
1984    navigator.userAgent.indexOf("Chrome") == -1
1985) {
1986    $("body").addClass("u-safari");
1987}
1988var OSName = "Unknown OS";
1989if (navigator.appVersion.indexOf("Mac") != -1) OSName = "MacOS";
1990var isChrome = !!window.chrome;
1991if (OSName == "MacOS" && isChrome == true) {
1992    $("body").addClass("u-chromemac");
1993}
1994
1995/**
1996 * アンケートフォーム|保険|ご意向アンケート
1997 */
1998(() => {
1999    const input = $(".js-checkbox1 input[type=checkbox]");
2000    const inputLi = $(".js-checkbox1 .c-checkbox");
2001
2002    if (input) {
2003        input.on("change", function () {
2004            changeCheckboxDisabled();
2005        });
2006
2007        // ページロード時にQ.1の④にチェックが入っている場合にページ表示を切り替える
2008        changeCheckboxDisabled();
2009    }
2010
2011    function changeCheckboxDisabled() {
2012        if ($("#checkbox04:checked").length) {
2013            inputLi.addClass("is-disable");
2014            $(this).parents(".c-checkbox").removeClass("is-disable");
2015
2016            $("[data-form=layout-forma]").addClass("is-hide");
2017            $("[data-form=layout-formb]").removeClass("is-hide");
2018        } else {
2019            inputLi.removeClass("is-disable");
2020
2021            $("[data-form=layout-formb]").addClass("is-hide");
2022            $("[data-form=layout-forma]").removeClass("is-hide");
2023        }
2024
2025        if (
2026            $("#checkbox01:checked").length ||
2027            $("#checkbox02:checked").length ||
2028            $("#checkbox03:checked").length
2029        ) {
2030            $("#checkbox04").parents(".c-checkbox").addClass("is-disable");
2031        } else {
2032            $("#checkbox04").parents(".c-checkbox").removeClass("is-disable");
2033        }
2034    }
2035})();
2036(() => {
2037    if ($(".u-datepicker").length > 0) {
2038        $(".u-datepicker").datepicker({
2039            dateFormat: "yy-mm-dd",
2040        });
2041    }
2042})();
2043
2044const modal = $("#js-modal");
2045const overlay = $("#js-overlay");
2046const close = $("#js-close");
2047const open = $("#js-open");
2048const image = $("#js-image");
2049const imageList = $(".c-list09__sublist img"); // 修正: すべての画像要素を取得
2050
2051open.on("click", function () {
2052    modal.addClass("open");
2053    overlay.addClass("open");
2054});
2055
2056overlay.on("click", function () {
2057    modal.removeClass("open");
2058    overlay.removeClass("open");
2059});
2060
2061close.on("click", function () {
2062    modal.removeClass("open");
2063    overlay.removeClass("open");
2064});
2065
2066imageList.on("click", function () {
2067    // 修正: すべての画像要素に対してクリックイベントを追加
2068    const movieSrc = determineMovieSrc($(this).attr("src")); // 修正: $(this)を使用してクリックされた画像のソースを取得する
2069    if (movieSrc) {
2070        const iframe = $(
2071            '<iframe width="100%" height="100%" frameborder="0" allowfullscreen></iframe>',
2072        );
2073        iframe.attr("src", movieSrc);
2074        $("#js-modal").empty().append(iframe);
2075        modal.addClass("open");
2076        overlay.addClass("open");
2077    }
2078});
2079
2080image.on("click", function () {
2081    const movieSrc = determineMovieSrc($(this).attr("src")); // 修正: $(this)を使用してクリックされた画像のソースを取得する
2082    console.log("movieSrc", movieSrc);
2083    if (movieSrc) {
2084        const iframe = $(
2085            '<iframe width="100%" height="100%" frameborder="0" allowfullscreen></iframe>',
2086        );
2087        iframe.attr("src", movieSrc);
2088        $("#js-modal").empty().append(iframe);
2089        modal.addClass("open");
2090        overlay.addClass("open");
2091    }
2092});
2093
2094function determineMovieSrc(imageSrc) {
2095    if (imageSrc.includes("movie01.png")) {
2096        return "https://api01-platform.stream.co.jp/apiservice/plt3/MTYyNg%3d%3d%23MjMyMzE%3d%23280%23168%230%2333E620FE6400%23OzEwOzEwOzEw%23/1";
2097    } else if (imageSrc.includes("movie02.png")) {
2098        return "https://storage.googleapis.com/sjvideo/a7e55ea5d05a5511a06aa77f8b98caf3a04e36c011a5790672cd0703b4c9a28e";
2099    } else if (imageSrc.includes("movie03.png")) {
2100        return "https://coopkyosaimovie.jp/00/coop3shippei.mp4";
2101    } else if (imageSrc.includes("movie04.png")) {
2102        return "https://www.youtube.com/embed/8qsa_maUkM0";
2103    } else if (imageSrc.includes("movie05.png")) {
2104        return "https://www.youtube.com/embed/T8G4oK2lie4";
2105    } else if (imageSrc.includes("movie06.png")) {
2106        return "https://www.youtube.com/embed/RxNDftGjhx8";
2107    } else if (imageSrc.includes("movie07.png")) {
2108        return "https://youtu.be/8S9wo_HuYDg";
2109    } else {
2110        return null;
2111    }
2112}
2113
2114$(document).ready(function () {
2115    // 特定のページのURLを含む場合のみスクリプトを実行 ポップアップありの場合のバナー処理
2116    if (window.location.href.indexOf("/lp/pokke_column/20240325/") > -1) {
2117        let banner = $(".js-banner1"),
2118            banner_close = $(".js-banner1-close");
2119        banner_btn = $(".js-banner1-btn");
2120
2121        $(window).on("load", function () {
2122            banner.addClass("is-show");
2123            bodyFix();
2124        });
2125
2126        banner_close.on("click", function () {
2127            banner.removeClass("is-show");
2128            banner_btn.addClass("is-active");
2129            bodyFixReset();
2130        });
2131
2132        banner_btn.on("click", function () {
2133            banner_btn.removeClass("is-active");
2134            banner.addClass("is-show");
2135            bodyFix();
2136        });
2137
2138        $(document).on("mouseup", function (e) {
2139            var container = $(".c-banner1__wrap");
2140
2141            // if the target of the click isn't the container nor a descendant of the container
2142            if (
2143                !container.is(e.target) &&
2144                container.has(e.target).length === 0
2145            ) {
2146                banner.removeClass("is-show");
2147                banner_btn.addClass("is-active");
2148                bodyFixReset();
2149            }
2150        });
2151    }
2152});
2153
2154// ポッケアプリ フローティングバナー ポップアップなしの場合
2155$(document).ready(function () {
2156    let pokke_banner = $(".js-pokke-banner-btn");
2157    if (pokke_banner.length) {
2158        pokke_banner.addClass("is-active");
2159    }
2160});
2161
2162/* ======================================
2163保険 スムーススクロール
2164====================================== */
2165// 保険を探すの場合のみ ページ遷移後に検索結果までスクロール
2166$(window).on("load", function () {
2167    var path = window.location.pathname;
2168
2169    if (path.match(/^\/hoken\/search\/(category|purpose|company)\/.+$/)) {
2170        var target = $("#anchor");
2171        setTimeout(function () {
2172            if (target.length) {
2173                $bodyHtml.animate(
2174                    {
2175                        scrollTop: target.offset().top - 50,
2176                    },
2177                    1000,
2178                );
2179            }
2180        }, 500);
2181    }
2182});
2183
2184/* ======================================
2185保険 共通 SP menuにgoogleサイト内検索modalを設定
2186====================================== */
2187
2188$(document).ready(function () {
2189    const modal2 = $("#js-modal2");
2190    const overlay2 = $("#js-overlay2");
2191    const close2 = $("#js-close2");
2192    const open2 = $("#js-open2");
2193    const body2 = $body;
2194
2195    open2.on("click", function () {
2196        modal2.addClass("is-open2");
2197        overlay2.addClass("is-open2");
2198        bodyFix();
2199    });
2200    close2.on("click", function () {
2201        modal2.removeClass("is-open2");
2202        overlay2.removeClass("is-open2");
2203        bodyFixReset();
2204    });
2205    overlay2.on("click", function () {
2206        modal2.removeClass("is-open2");
2207        overlay2.removeClass("is-open2");
2208        bodyFixReset();
2209    });
2210});
2211
2212$window.on("load resize", function () {
2213    const modal2 = $("#js-modal2");
2214    const overlay2 = $("#js-overlay2");
2215    const close2 = $("#js-close2");
2216    const open2 = $("#js-open2");
2217    const body2 = $bodyHtml;
2218    const breakPoint2 = 640;
2219    if (breakPoint2 < $window.width()) {
2220        if (modal2.hasClass("is-open2")) {
2221            modal2.removeClass("is-open2");
2222            overlay2.removeClass("is-open2");
2223            bodyFixReset();
2224        }
2225    }
2226});

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.