PageSourceSearch

https://www.woodfriends.jp/resource/js/scripts.js?t=1791136610

js woodfriends.jp collected 2026-10-04 17:57:15 UTC 258,904 bytes, 6,490 lines download raw bytes

1// require jQuery JavaScript Library v2.1.0
2/* ============================================================
3 * defineFoundationVariable
4 * ============================================================ */
5
6/* ------------------------------------------------------------
7 * [ userAgent ] http://www.useragentstring.com/pages/useragentstring.php
8 * ------------------------------------------------------------ */
9var ua = window.navigator.userAgent;
10var appVer = window.navigator.appVersion;
11
12//PC
13var isIE = ua.indexOf("MSIE") != -1 || ua.indexOf("Trident") != -1;
14var isIE6 = isIE && appVer.indexOf("MSIE 6") != -1;
15var isIE7 = isIE && appVer.indexOf("MSIE 7.") != -1;
16var isIE8 = isIE && ua.indexOf("Trident/4.") != -1;
17var isIE9 = isIE && ua.indexOf("Trident/5.") != -1;
18var isIE10 = isIE && ua.indexOf("Trident/6.") != -1;
19var isIE11 = ua.indexOf("Trident/7.") != -1;
20
21var isFirefox = ua.indexOf("Firefox") != -1;
22var isChrome = ua.indexOf("Chrome") != -1;
23var isSafari = ua.indexOf("Safari") != -1;
24
25//Mobile (smartphone + tablet)
26var isMobileSafari = ua.match(/iPhone|iPad|iPod/i) ? true : false;
27var isMobileSafariTypeT = ua.match(/ipad/i) ? true : false;
28var isMobileSafariTypeS = ua.match(/iphone|ipod/i) ? true : false;
29var isAndroid = ua.indexOf("Android") != -1;
30var isMobileAndroidTypeT = isAndroid && ua.indexOf("Mobile") == -1;
31var isMobileAndroidTypeS = isAndroid && ua.indexOf("Mobile") != -1;
32var isAndroidChrome = isChrome && isAndroid;
33var isAndroidFirefox = isFirefox && isAndroid;
34var isMobileFirefox = isFirefox && ua.indexOf("Mobile") != -1;
35var isTabletFirefox = isFirefox && ua.indexOf("Tablet") != -1;
36
37//PC or Mobile
38var isTablet = isMobileSafariTypeT || isMobileAndroidTypeT || isTabletFirefox;
39var isSmartPhone =
40    isMobileSafariTypeS || isMobileAndroidTypeS || isMobileFirefox;
41var isMobile = isTablet || isSmartPhone || isAndroidChrome || isAndroidFirefox;
42var isPC = !isMobile && $(window).width() > 767;
43var boxSlide;
44var boxSlideEviroment;
45
46if (isMobileSafari) $("html").addClass("isSafari");
47
48/* ------------------------------------------------------------
49 * [ Location ]
50 * ------------------------------------------------------------ */
51var locationHref = window.location.href, // http://www.google.com:80/search?q=demo#test
52    locationProtocol = window.location.protocol, // http:
53    locationHostname = window.location.hostname, // www.google.com
54    locationHost = window.location.host, // www.google.com:80
55    locationPort = window.location.port, // 80
56    locationPath = window.location.pathname, // /search
57    locationSearch = window.location.search, // ?q=demo
58    locationHash = window.location.hash; // #test
59
60var count = 0;
61
62(function ($) {
63    /* ============================================================
64     * Execute JavaScript when the DOM is fully loaded.
65     * ============================================================ */
66    $(document).on("ready", function () {
67        var lang = $("html").attr("lang");
68        var titleElemText = window.document.title; //jQueryで<head>要素内の情報を取得できないためこの記法
69
70        var txtOriginal = titleElemText.replace(/\s/g, "");
71        var txt = encodeURI(txtOriginal);
72        var url = location.href;
73
74        var hashTags = ""; //Twitterで使用
75
76        // facebook ----------------------------------------------------------------------------
77        $(".media_sns__facebook").append(
78            '<a href="https://www.facebook.com/woodfriends" target="_blank" class="brightover js_ga_SNSshare__facebook"><i class="fa fa-facebook"></i></a>'
79        );
80        //$('.media_sns__facebook').append('<a href="//www.facebook.com/sharer/sharer.php?u=' + url + '" target="_blank" class="brightover js_ga_SNSshare__facebook"><i class="fa fa-facebook"></i></a>');
81
82        // twitter  ----------------------------------------------------------------------------
83        $(".media_sns__twitter").append(
84            '<a href="//twitter.com/intent/tweet?url=' +
85                url +
86                "&amp;text=[" +
87                txt +
88                "]&amp;hashtags=" +
89                hashTags +
90                '" target="_blank" class="brightover js_ga_SNSshare__twitter"><i class="fa fa-twitter"></i></a>'
91        );
92
93        $(".btn-tel").on("click", function () {
94            if (isPC) {
95                return false;
96            }
97        });
98        if (isIE11) {
99            $("body").addClass("isIE11");
100        }
101        //autoHeight
102        $(".js_equalHeight").autoColHeight({
103            equalElement: "> li",
104            equalChildEle: ".js_equal_box",
105        });
106
107        $(".js_equal_items").autoColHeight({
108            equalElement: "> li",
109        });
110
111        $(".lst_menu").autoColHeight({
112            equalElement: "> li",
113            equalChildEle: ".box_menu__title",
114        });
115
116        $(".lst_value").autoColHeight({
117            equalElement: "> li",
118            equalChildEle: ".box_value__content",
119        });
120
121        $(".js_history_back").on("click", function () {
122            let current_url = window.location.href;
123            if (current_url.indexOf("step3") > 0) {
124                window.location.href = "../estimate/step2-1.php";
125                return false;
126            }
127            if (current_url.indexOf("step2") > 0) {
128                window.location.href = "../estimate/step1.php";
129                return false;
130            }
131            history.back();
132            return false;
133        });
134
135        $("body").on("click", ".is_disable", function (e) {
136            e.preventDefault();
137            return false;
138        });
139
140        function showMapPopup() {
141            $(document).on("click", ".map_control area", function (e) {
142                e.preventDefault();
143                var $this = $(this);
144                var $parent = $this.closest(".map_container");
145                var imgMap = $parent.find(".map_image");
146                $this.toggleClass("active");
147                var popupId = $this.attr("href");
148                var popup = $(popupId);
149                $(".map_control area")
150                    .not($this)
151                    .each(function () {
152                        $(this).removeClass("active");
153                        var popupIdx = $(this).attr("href");
154                        var popupX = $(popupIdx);
155                        popupX.hide();
156                    });
157                if ($this.hasClass("active")) {
158                    if (popup.length) {
159                        imgMap.attr("src", $this.attr("data-source"));
160                        imgMap.addClass("isModalOpened");
161                        updateModal();
162                        popup.fadeIn();
163                    }
164                } else {
165                    if (popup.length) {
166                        popup.fadeOut();
167                    }
168                }
169            });
170            $(document).on("click", ".modal__close", function (e) {
171                $(this).parents(".js_map_modal").fadeOut();
172                var $parent = $(this).closest(".map_container");
173                var imgMap = $parent.find(".map_image");
174                imgMap.removeClass("isModalOpened");
175                imgMap.attr("src", imgMap.attr("data-origin"));
176            });
177            $(document).on("click", ".js_map_modal", function (e) {
178                e.stopPropagation();
179                e.preventDefault();
180            });
181
182            function updateModal() {
183                $(".map_image").each(function () {
184                    var _this = $(this);
185                    var imgOriginW = _this.attr("data-width");
186                    var imgOriginH = _this.attr("data-height");
187                    var imgW = _this.width();
188                    var imgH = _this.height();
189                    var distance = {
190                        w: 0.6 * (imgOriginW - imgW),
191                        h: 0.6 * (imgOriginH - imgH),
192                    };
193                    var modalELe = _this
194                        .closest(".map_container")
195                        .find(".js_map_modal");
196
197                    modalELe.each(function () {
198                        $(this).css({
199                            marginTop: -distance.h,
200                            marginLeft: -distance.w,
201                        });
202                    });
203                });
204            }
205            $(window).resize(function () {
206                updateModal();
207            });
208        }
209        showMapPopup();
210        /* ------------------------------------------------------------
211         * [ call smoothScroll ]
212         * ------------------------------------------------------------ */
213        smoothScroll();
214
215        /* ------------------------------------------------------------
216         * [ tel link prevent ]
217         * ------------------------------------------------------------ */
218        if (isPC) {
219            $(".js_acr_phone").addClass("disable");
220            $("body").on("click", ".js_acr_phone", function (e) {
221                e.preventDefault();
222                return false;
223            });
224        }
225        /* ------------------------------------------------------------
226         * [ call menuInit ]
227         * ------------------------------------------------------------ */
228        $(".js_menu").menuInit({
229            menuParentClass: ".js_menu_parent",
230            menuContentClass: ".js_menu_content",
231            triggerClass: ".js_menu_trigger",
232            collapse: true,
233            animateSpeed: 300,
234            sync: true,
235        });
236
237        /* ------------------------------------------------------------
238         * [ call anchorExpanded ]
239         * ------------------------------------------------------------ */
240        $(".js_accordion_trigger").menuInit({
241            menuParentClass: ".js_accordion",
242            menuContentClass: ".js_accordion_content",
243            triggerClass: ".js_accordion_trigger",
244            collapse: false,
245            animateSpeed: 300,
246            sync: true,
247            openFirstMenu: false,
248            toggleIcon: ".js_accordion_icon",
249            openIcon: "fa-chevron-up",
250            closeIcon: "fa-chevron-down",
251        });
252
253        $(".js_accordion_trigger02").menuInit({
254            menuParentClass: ".js_accordion",
255            menuContentClass: ".js_accordion_content",
256            triggerClass: ".js_accordion_trigger02",
257            collapse: false,
258            animateSpeed: 300,
259            sync: true,
260            openFirstMenu: false,
261            toggleIcon: ".js_accordion_icon",
262            openIcon: "fa-angle-up",
263            closeIcon: "fa-angle-down",
264        });
265        /* ------------------------------------------------------------
266         * [ call tabInit ]
267         * ------------------------------------------------------------ */
268        $(".js_tab_trigger").tabInit();
269
270        addAccordionSP();
271
272        /* ------------------------------------------------------------
273         * [ call anchorExpanded ]
274         * ------------------------------------------------------------ */
275        $(".js_anchor_expanded").anchorExpanded();
276
277        /* ------------------------------------------------------------
278         * [ Popup views]
279         * ------------------------------------------------------------ */
280        if (isPC && $.fn.magnificPopup)
281            $(".js_popup").magnificPopup({
282                type: "image",
283                preloader: false,
284            });
285        /* ------------------------------------------------------------
286         * [ Top slider]
287         * ------------------------------------------------------------ */
288        if (isPC) {
289            if ($(".main_image").length > 0 && $.fn.bgswitcher) {
290                $.BgSwitcher.defaultConfig.images = [
291                    "/resource/img/top_main_0.jpg",
292                    1,
293                    5,
294                ];
295                var config = {
296                    duration: 2000,
297                    interval: 3000,
298                };
299                $(".main_image__contain").bgswitcher(config);
300            }
301        } else {
302            if ($(".main_image").length > 0 && $.fn.bgswitcher) {
303                $.BgSwitcher.defaultConfig.images = [
304                    "/resource/img/top_main_sp0.jpg",
305                    1,
306                    5,
307                ];
308                var config = {
309                    duration: 2000,
310                    interval: 3000,
311                };
312                $(".main_image__contain").bgswitcher(config);
313            }
314        }
315        /* ------------------------------------------------------------
316         * [ call bxSlider ]
317         * ------------------------------------------------------------ */
318        var footerSlider = $(".lst_slider").bxSlider({
319            mode: "horizontal",
320            infiniteLoop: true,
321            easing: "swing",
322            auto: true,
323            pager: false,
324            slideMargin: 10,
325            touchEnabled: true,
326            minSlides: 6,
327            maxSlides: 6,
328            moveSlides: 1,
329            slideWidth: 270,
330            randomStart: true,
331        });
332        $("#lst_slider_control__next").click(function () {
333            footerSlider.goToNextSlide();
334            return false;
335        });
336
337        $("#lst_slider_control__prev").click(function () {
338            footerSlider.goToPrevSlide();
339            return false;
340        });
341
342        function preventAccordionSP() {
343            if ($(window).width() > 767) {
344                $(".js_accordion_sp .js_accordion_trigger").addClass(
345                    "is_disable"
346                );
347                $(".js_accordion_sp .js_accordion_content").show();
348            } else {
349                $(".js_accordion_sp .js_accordion_trigger").removeClass(
350                    "is_disable"
351                );
352                $(".js_accordion_sp .js_accordion_content").hide();
353            }
354        }
355        preventAccordionSP();
356        $(window).resize(function () {
357            preventAccordionSP();
358        });
359
360        /*
361		$(window).scroll(function(){
362			if($(window).width() > 767){
363			var scrollY = $(window).scrollTop();
364				if(!$('#l_header').hasClass('l_header_simple')){
365					if(scrollY > 80){
366						$('#l_header,#l_document').not('.l_header_simple').addClass('is_fixed');
367					} else{
368						$('#l_header,#l_document').not('.l_header_simple').removeClass('is_fixed');
369					}
370				}
371			}
372		});
373		*/
374
375        if (isPC) {
376            // サイドナビゲーション追従
377            (function () {
378                // 要素の定義
379
380                var $parent = $("#section_main");
381                var $main = $("#l_main");
382                var $sub = $("#l_sub");
383                var $target = $(".lst_sub");
384
385                if (!($parent.length && $main.length && $target.length)) return;
386                if ($target.hasClass("js-no-scroll-follow")) return;
387
388                // 基準となる値(変動値)
389                var contentsLeft = $main.offset().left;
390                var contentsWidth = $main.width();
391
392                var footEnd = $("#l_footer").offset().top - 140;
393
394                // 基準となる値(固定値)
395                var fixedMarginBottom = 30; // スクロール中(下揃え固定時)のウインドウ上端からの距離
396                var fixedMarginTop = 0; // スクロール中(上揃え固定時)のウインドウ上端からの距離
397                var fixedMarginLeft =
398                    $target.offset().left - contentsLeft - contentsWidth; // #main との間隔
399                // 追従対象要素のデフォルト値を保持
400                var targetDefaultTop = $target.offset().top;
401                var targetDefaultCss = {
402                    position: $target.css("position"),
403                    left: $target.css("left"),
404                    top: $target.css("top"),
405                    bottom: $target.css("bottom"),
406                    marginBottom: $target.css("margin-bottom"),
407                };
408                $sub.height($main.height());
409                $(window).bind("load resize scroll", function () {
410                    contentsLeft = $main.offset().left;
411                    contentsTop = $main.offset().top;
412                    contentsWidth = $main.width();
413                    footEnd =
414                        $("#l_footer").offset().top -
415                        ($("#l_footer").offset().top -
416                            ($main.offset().top + $main.height()));
417
418                    var scrollTop = $(window).scrollTop();
419                    var scrollLeft = $(window).scrollLeft();
420                    var windowHeight = $(window).height();
421                    var targetHeight = $target.height();
422                    var mainHeight = $main.height();
423                    var subWidth = $sub.width();
424                    fixedMarginTop = $("#l_header").height() + 20; // スクロール中(上揃え固定時)のウインドウ上端からの距離
425
426                    // ターゲットの上下が両方見えているか判定
427                    var isInviewBothEnd =
428                        targetHeight <=
429                        windowHeight - fixedMarginTop - fixedMarginBottom;
430
431                    var cssDefault = {
432                        width: subWidth,
433                        position: targetDefaultCss.position,
434                        left: targetDefaultCss.left,
435                        top: targetDefaultCss.top,
436                        bottom: targetDefaultCss.bottom,
437                        marginBottom: targetDefaultCss.marginBottom,
438                    };
439                    var cssScrolling = {
440                        position: "fixed",
441                        width: subWidth,
442                        left:
443                            contentsLeft +
444                            contentsWidth +
445                            fixedMarginLeft -
446                            scrollLeft +
447                            "px",
448                        top: isInviewBothEnd ? fixedMarginTop + "px" : "auto",
449                        bottom: isInviewBothEnd
450                            ? "auto"
451                            : fixedMarginBottom + "px",
452                        marginBottom: "0",
453                    };
454                    var cssBottomEnd = {
455                        position: "fixed",
456                        left:
457                            contentsLeft +
458                            contentsWidth +
459                            fixedMarginLeft -
460                            scrollLeft +
461                            "px",
462                        top: "auto",
463                        bottom: scrollTop + windowHeight - footEnd + "px",
464                        marginBottom: "0",
465                    };
466                    if (mainHeight <= targetHeight) {
467                        // #sub より #main が小さい
468                        $target.css(cssDefault);
469                    } else if (isInviewBothEnd) {
470                        // ターゲットの上下が両方見えている(上揃え固定)
471                        if (
472                            targetDefaultTop <= scrollTop + fixedMarginTop &&
473                            scrollTop <
474                                targetDefaultTop + mainHeight - targetHeight
475                        ) {
476                            $target.css(cssScrolling);
477                        } else if (
478                            scrollTop >=
479                            targetDefaultTop + mainHeight - targetHeight
480                        ) {
481                            $target.css(cssBottomEnd);
482                        } else {
483                            $target.css(cssDefault);
484                        }
485                    } else {
486                        // ターゲットの上下が両方見えていない(下揃え固定)
487                        if (
488                            targetDefaultTop +
489                                targetHeight +
490                                fixedMarginBottom <
491                                scrollTop + windowHeight &&
492                            scrollTop + windowHeight <
493                                footEnd + fixedMarginBottom
494                        ) {
495                            $target.css(cssScrolling);
496                        } else if (
497                            scrollTop + windowHeight >=
498                            footEnd + fixedMarginBottom
499                        ) {
500                            $target.css(cssBottomEnd);
501                        } else {
502                            $target.css(cssDefault);
503                        }
504                    }
505                });
506            })();
507        }
508
509        // reasonnavi
510        $(".js_reasonnav").reasonNav();
511        $("#nav_local").reasonNav();
512
513        var originImage = "";
514        $(".map_image").each(function () {
515            var originImage = $(this).attr("src");
516            $(this).attr("data-origin", originImage);
517        });
518        $(".map_control area")
519            .mouseover(function () {
520                if (
521                    !$(this)
522                        .closest("li")
523                        .find(".map_image")
524                        .hasClass("isModalOpened")
525                ) {
526                    originImage = $(this)
527                        .closest("li")
528                        .find(".map_image")
529                        .attr("data-origin");
530                    $(this)
531                        .closest("li")
532                        .find(".map_image")
533                        .attr("src", $(this).attr("data-source"));
534                }
535            })
536            .mouseout(function () {
537                if (
538                    !$(this)
539                        .closest("li")
540                        .find(".map_image")
541                        .hasClass("isModalOpened")
542                ) {
543                    $(this)
544                        .closest("li")
545                        .find(".map_image")
546                        .attr("src", originImage);
547                }
548            });
549
550        if ($.fn.imageMapResize) {
551            $("map[name=map_nagoya]").imageMapResize();
552            $("map[name=map_aichi]").imageMapResize();
553        }
554
555        //intBoxSlide();
556
557        favoriteHelp();
558        cloneText();
559        cloneElement();
560
561        //acordionListSearch();
562        //customCheck();
563
564        //showLinkBottom();
565        UpdateBookmark();
566
567        if (locationSearch === "?help") {
568            $(".fav_help_head").show();
569            $(".fav_help_note").show();
570            $(".section_favorite_help").show(0);
571        } else {
572            $("#js_favorite_content").show();
573        }
574        //updateValueSelectSearch();
575        $(".js_fullbg").bgFull();
576    }); //End ->   ready method
577
578    /* ============================================================
579     * Execute JavaScript when the Window Resized.
580     * ============================================================ */
581    var resizeTimer = false;
582    $(window).resize(function () {
583        if (resizeTimer !== false) {
584            clearTimeout(resizeTimer);
585        }
586        resizeTimer = setTimeout(function () {
587            addAccordionSP();
588            $(".js_fullbg").bgFull();
589            resizeBoxSlide();
590            cloneText();
591            cloneElement();
592        }, 200);
593        //updateValueSelectSearch();
594    }); //End
595
596    $(window).load(function () {
597        $(".js_housing_equalHeight").autoColHeight({
598            equalElement: "> li",
599            equalChildEle: ".box_housing__content",
600            callback: function () {
601                $(".js_fullbg").bgFull();
602            },
603        });
604        $(".js_equalHeight").autoColHeight({
605            equalElement: "> li",
606            callback: function () {
607                $(".js_fullbg").bgFull();
608            },
609        });
610        $(".box_tab").autoColHeight({
611            equalElement: "> li",
612            equalChildEle: "a",
613        });
614
615        $(".lst_menu").autoColHeight({
616            equalElement: "> li",
617            equalChildEle: ".box_menu__title",
618        });
619
620        $(".lst_value").autoColHeight({
621            equalElement: "> li",
622            equalChildEle: ".box_value__content",
623        });
624
625        if (
626            $(window).width() > 767 &&
627            $(".section_favorite_help .js_equal_items").length
628        ) {
629            $(".section_favorite_help .js_equal_items")
630                .delay(200)
631                .autoColHeight({
632                    equalElement: "> li",
633                });
634        }
635    }); //End
636    /* ------------------------------------------------------------
637     * [ SNS 設定 ]
638     * ------------------------------------------------------------ */
639
640    //GAのクリックイベント設定
641    $(document).on("click", ".js_ga_SNSshare__facebook", function () {
642        _gaq.push([
643            "_trackEvent",
644            "SNS_shareButton",
645            "SNS_shareButton_click",
646            "SNS_shareButton_Facebook",
647        ]);
648    });
649    $(document).on("click", ".js_ga_SNSshare__twitter", function () {
650        _gaq.push([
651            "_trackEvent",
652            "SNS_shareButton",
653            "SNS_shareButton_click",
654            "SNS_shareButton_Twitter",
655        ]);
656    });
657
658    /* ------------------------------------------------------------
659     * [ js_accordion ]
660     * ------------------------------------------------------------ */
661
662    function addAccordionSP() {
663        var accordionWrap = $(".accordion_wrap");
664        accordionWrap.each(function (index, el) {
665            var accordionContent = $(this).find(".js_accordion_content");
666            var accordionTrigger = $(this).find(".js_accordion_trigger");
667            if ($(window).width() < 768) {
668                accordionContent.hide();
669                accordionTrigger.removeClass("is_disable");
670                accordionContent.removeClass("is_opened");
671            } else {
672                accordionTrigger.addClass("is_disable");
673                var activeDiv = accordionWrap
674                    .find(".js_tab_trigger.is_active")
675                    .attr("href");
676                $(activeDiv).show().addClass("is_opened");
677            }
678        });
679    }
680
681    function resizeBoxSlide() {
682        if (boxSlide) {
683            if ($(window).width() > 767) {
684                boxSlide.reloadSlider({
685                    minSlides: 5,
686                    maxSlides: 5,
687                    slideWidth: 200,
688                    pager: false,
689                    auto: false,
690                    infiniteLoop: false,
691                    hideControlOnEnd: true,
692                    controls:
693                        $(".box_slide__content > li").length > 5 ? true : false,
694                    nextText: '<i class="fa fa-angle-right"></i>',
695                    prevText: '<i class="fa fa-angle-left"></i>',
696                });
697            } else {
698                boxSlide.reloadSlider({
699                    infiniteLoop: true,
700                    minSlides: 3,
701                    slideWidth: 200,
702                    pager: false,
703                    auto: false,
704                    infiniteLoop: true,
705                    nextText: '<i class="fa fa-angle-right"></i>',
706                    prevText: '<i class="fa fa-angle-left"></i>',
707                });
708            }
709        }
710        if (boxSlideEviroment) {
711            if ($(window).width() > 767) {
712                boxSlideEviroment.reloadSlider({
713                    minSlides: 5,
714                    maxSlides: 5,
715                    slideWidth: 170,
716                    slideMargin: 30,
717                    responsive: true,
718                    pager: false,
719                    auto: false,
720                    infiniteLoop: false,
721                    hideControlOnEnd: true,
722                    controls:
723                        $(".box_slider_enviroment .bx_slider > li").length > 5
724                            ? true
725                            : false,
726                    nextText: '<i class="fa fa-angle-right"></i>',
727                    prevText: '<i class="fa fa-angle-left"></i>',
728                });
729            } else {
730                boxSlideEviroment.reloadSlider({
731                    minSlides: 3,
732                    slideWidth: 200,
733                    slideMargin: 5,
734                    moveSlides: 1,
735                    responsive: false,
736                    pager: false,
737                    auto: false,
738                    infiniteLoop: true,
739                    hideControlOnEnd: true,
740                    controls:
741                        $(".box_slider_enviroment .bx_slider > li").length > 5
742                            ? true
743                            : false,
744                    nextText: '<i class="fa fa-angle-right"></i>',
745                    prevText: '<i class="fa fa-angle-left"></i>',
746                });
747            }
748        }
749    }
750
751    $(document).scroll(function () {
752        if ($(".info_favorite").length) {
753            $(".info_favorite").handleFavorite();
754        }
755    });
756    /* ------------------------------------------------------------
757     * [ handleFavorite ]
758     * ------------------------------------------------------------ */
759    $.fn.handleFavorite = function () {
760        var bottomAnchor = $(".box_apply_project_bottom").offset();
761        if (!bottomAnchor) {
762            bottomAnchor = $(".box_slide").offset();
763        }
764
765        var boxRegFavorite = $(this).find(".info_favorite__content");
766        if (
767            boxRegFavorite.offset().top + boxRegFavorite.height() >=
768            bottomAnchor.top
769        ) {
770            boxRegFavorite.css({
771                position: "relative",
772            });
773        }
774
775        if ($(document).scrollTop() + window.innerHeight < bottomAnchor.top) {
776            // if ($(document).scrollTop() + window.innerHeight < $('.section_tabs').offset().top) {
777            // 	boxRegFavorite.fadeOut(350);
778            // } else {
779            boxRegFavorite.css({
780                position: "fixed",
781                bottom: 0,
782                width: "100%",
783                "max-width": "1600px",
784                "z-index": 50,
785            });
786            boxRegFavorite.fadeIn(350);
787            // }
788        }
789    };
790    /* ------------------------------------------------------------
791     * [ js_reasonnav ]
792     * ------------------------------------------------------------ */
793    $.fn.reasonNav = function () {
794        return this.each(function () {
795            var listWidth,
796                containerWidth,
797                $navi = $(this),
798                $container = $navi.find(".js_reasonnav_container"),
799                $prev = $navi.find(".js_reasonnav_prev"),
800                $next = $navi.find(".js_reasonnav_next"),
801                $list = $navi.find("ul"),
802                $item = $list.find("li");
803
804            function setListWidth() {
805                containerWidth = $container.outerWidth();
806                listWidth = 0;
807                $list.find("li").each(function () {
808                    listWidth += Math.floor($(this).outerWidth()) + 1;
809                });
810                $list.width(listWidth + "px");
811                listWidth = $list.outerWidth();
812                $container.trigger("scroll");
813            }
814            setListWidth();
815            $container.on("scroll", function () {
816                var scrollLeft = $container.scrollLeft();
817
818                if (scrollLeft < 10) {
819                    $prev.addClass("disabled");
820                } else {
821                    $prev.removeClass("disabled");
822                }
823                if (listWidth - containerWidth - scrollLeft < 10) {
824                    $next.addClass("disabled");
825                } else {
826                    $next.removeClass("disabled");
827                }
828            });
829            $(window).on("resize", function () {
830                setListWidth();
831            });
832
833            // init
834            if (!$item.hasClass("active")) {
835                $item.each(function () {
836                    var $target = $(this).find("a"),
837                        link = $target.attr("href");
838
839                    if ($target.length <= 0) {
840                        return;
841                    }
842                    if (link === location.pathname) {
843                        $target.addClass("active");
844                    }
845                });
846            }
847        });
848    };
849    /*-------------------------------------------
850	* function clone image on SP
851	-------------------------------------------*/
852    function cloneText() {
853        $(".js-clone__content").each(function () {
854            var elClone = $(this);
855            if ($(window).width() < 768) {
856                var cloneObject = elClone.closest(".box_media");
857                elClone.insertBefore(cloneObject);
858            }
859            if ($(window).width() >= 768) {
860                var cloneObject = elClone.closest("td").find(".box_media__txt");
861                //cloneObject.empty();
862                cloneObject.prepend(elClone);
863            }
864        });
865    }
866
867    function cloneElement() {
868        var elWrap = $(".js_clone__wrap");
869        // var elOffset = $('.js_clone__offset');
870        var elCondition = $(".condition_type");
871        $(".js_clone").each(function () {
872            var elClone = $(this).find(elWrap).clone().addClass("hasClone");
873            if ($(window).width() < 768) {
874                if (!$(this).find(".hasClone").length) {
875                    elClone.insertAfter(elCondition);
876                }
877                elWrap.not(".hasClone").hide();
878            } else if ($(window).width() >= 768) {
879                elWrap.css({
880                    display: "block",
881                    overflow: "hidden",
882                });
883                $(this).find(".hasClone").remove();
884            }
885        });
886    }
887    /* function acordionListSearch(){
888		$('.js_search_title').click(function(){
889			if (!($(this).hasClass('active'))) {
890				$(this).addClass('active');
891				$(this).text('閉じる');
892				$(this).closest('.box_search').find('.js_search_content').slideDown(300).addClass('is_opened');
893				$(this).parents().find('.box-sort').hide();
894			}
895			else{
896				$(this).removeClass('active');
897				$(this).text('条件を変更');
898				$(this).closest('.box_search').find('.js_search_content').slideUp(300).removeClass('is_opened');
899				$(this).parents().find('.box-sort').show();
900			}
901			updateValueSelectSearch();
902		});
903	} */
904    /* function updateValueSelectSearch(){
905		var triggerUpdate = $('.js_search_content');
906			showPriceSlect01 = $('.js_select_price01'),
907			showPriceSlect02 = $('.js_select_price02');
908		var valSelectAria, valSelectPrice01, valSelectPrice02;
909		triggerUpdate.each(function() {
910			valSelectPrice01 = $(this).find('.js_choose_price01').val();
911			//alert(valSelectPrice01)
912			valSelectPrice02 = $(this).find('.js_choose_price02').val();
913			showPriceSlect01.text(valSelectPrice01);
914			showPriceSlect02.text(valSelectPrice02);
915			if ($(this).hasClass('is_opened')) {
916				$(this).find('.js_choose_aria').on('click', function(){
917					updateValueSelectSearch();
918				});
919				$(this).find('.js_choose_price01').on('change', function(){
920					updateValueSelectSearch();
921				});
922				$(this).find('.js_choose_price02').on('change', function(){
923					updateValueSelectSearch();
924				});
925			}
926		});
927	} */
928
929    /* ============================================================
930     * Plugin
931     * ============================================================ */
932
933    /* ------------------------------------------------------------
934     * [ tabs ]
935     * ------------------------------------------------------------ */
936    /*
937     * jquery-menu.js
938     *
939     * Copyright (c) 2016 DINH MINH THANH - AQUARING JAPAN
940     * Licensed under MIT Lisence:
941     * http://www.opensource.org/licenses/mit-license.php
942     * http://sourceforge.jp/projects/opensource/wiki/licenses%2FMIT_license
943     *
944     * Since:   2016-08-17
945     * version: 0.01
946     * Comment:
947     *
948     * jQuery 1.2 <-> 2.x
949     *
950     */
951    $.fn.tabInit = function (opt) {
952        var opt = opt || {},
953            tabParentClass =
954                opt.tabParentClass === undefined
955                    ? ".js_tab_parent"
956                    : opt.tabParentClass, //Wrapper class
957            tabContentClass =
958                opt.tabContentClass === undefined
959                    ? ".js_tab_content"
960                    : opt.tabContentClass, //Content class of subcontent
961            triggerClass =
962                opt.triggerClass === undefined
963                    ? ".js_tab_trigger"
964                    : opt.triggerClass, //Trigger class
965            toggleIcon =
966                opt.toggleIcon === undefined
967                    ? ".js_toggle_icn"
968                    : opt.toggleIcon, //Change icon with specified class
969            openIcon = opt.openIcon === undefined ? "fa-times" : opt.openIcon, // Name of open class
970            closeIcon = opt.closeIcon === undefined ? "fa-bars" : opt.closeIcon; // Name of close class
971        function slideTab($tabElement, forceOpen) {
972            var href =
973                $tabElement.attr("href") == undefined
974                    ? $tabElement.next(tabContentClass)
975                    : $tabElement.attr("href");
976            var $href = $(href);
977            var $tabParent = $href.closest(tabParentClass);
978            var $trigger = $tabElement
979                .closest(triggerClass)
980                .siblings(triggerClass);
981            if ($trigger.length == 0) $trigger = $tabParent.find(triggerClass);
982
983            if (!$href.hasClass("is_opened") || forceOpen === true) {
984                $href.show();
985                $tabParent
986                    .find(tabContentClass)
987                    .not(href)
988                    .hide()
989                    .removeClass("is_opened");
990                $trigger.removeClass("is_active");
991                $href.addClass("is_opened");
992                $tabParent
993                    .find(toggleIcon)
994                    .addClass(closeIcon)
995                    .removeClass(openIcon);
996                $tabElement
997                    .find(toggleIcon)
998                    .addClass(openIcon)
999                    .removeClass(closeIcon);
1000                $tabElement.closest(triggerClass).addClass("is_active");
1001            }
1002        }
1003        //open the first item
1004        var $tabParent = $(tabParentClass);
1005        $tabParent.each(function () {
1006            if ($(this).find(triggerClass + ".is_active").length == 0) {
1007                slideTab($(this).find(triggerClass).first(), true);
1008            }
1009        });
1010        return this.each(function () {
1011            var $tabElement = $(this);
1012            //Open when loaded if set class .is_active to trigger
1013            if ($tabElement.hasClass("is_active")) {
1014                slideTab($tabElement, true);
1015            }
1016            //click event
1017            $tabElement.on("click", function (e) {
1018                e.preventDefault();
1019                slideTab($(this));
1020                return false;
1021            });
1022        });
1023    };
1024
1025    /* ------------------------------------------------------------
1026     * [ menu ]
1027     * ------------------------------------------------------------ */
1028    /*
1029     * jquery-menu.js
1030     *
1031     * Copyright (c) 2016 DINH MINH THANH - AQUARING JAPAN
1032     * Licensed under MIT Lisence:
1033     * http://www.opensource.org/licenses/mit-license.php
1034     * http://sourceforge.jp/projects/opensource/wiki/licenses%2FMIT_license
1035     *
1036     * Since:   2016-08-17
1037     * version: 0.01
1038     * Comment:
1039     *
1040     * jQuery 1.2 <-> 2.x
1041     *
1042     */
1043    $.fn.menuInit = function (opt) {
1044        var opt = opt || {},
1045            menuParentClass =
1046                opt.menuParentClass === undefined
1047                    ? ".js_menu_parent"
1048                    : opt.menuParentClass, //Wrapper class of each accordion
1049            menuContentClass =
1050                opt.menuContentClass === undefined
1051                    ? ".js_menu_content"
1052                    : opt.menuContentClass, //Content class of subcontent
1053            triggerClass =
1054                opt.triggerClass === undefined
1055                    ? ".js_menu_trigger"
1056                    : opt.triggerClass, //Trigger class
1057            collapse = opt.collapse === undefined ? true : opt.collapse, //Collapse or not
1058            animateSpeed =
1059                opt.animateSpeed === undefined ? 300 : opt.animateSpeed, //Animate speed,  default: 300ms
1060            sync = opt.sync === undefined ? true : opt.sync, //Toggle at same time or not
1061            toggleIcon =
1062                opt.toggleIcon === undefined
1063                    ? ".js_toggle_icn"
1064                    : opt.toggleIcon, //Change icon
1065            openIcon = opt.openIcon === undefined ? "fa-times" : opt.openIcon, //Change icon with specified class
1066            closeIcon = opt.closeIcon === undefined ? "fa-bars" : opt.closeIcon; // Name of close class
1067        openFirstMenu =
1068            opt.openFirstMenu === undefined ? false : opt.openFirstMenu; // open on first menu item
1069        function slideMenu($menuElement, forceOpen) {
1070            var href =
1071                $menuElement.attr("href") == undefined
1072                    ? $menuElement.next(menuContentClass)
1073                    : $menuElement.attr("href");
1074            var $href = $(href);
1075            var $menuParent = $href.closest(menuParentClass);
1076            var $trigger = $menuElement
1077                .closest(triggerClass)
1078                .siblings(triggerClass);
1079            if ($trigger.length == 0) $trigger = $menuParent.find(triggerClass);
1080
1081            if (!$href.hasClass("is_opened") || forceOpen === true) {
1082                if (collapse) {
1083                    if (sync == false) {
1084                        $menuParent
1085                            .find(menuContentClass)
1086                            .not(href)
1087                            .slideUp(animateSpeed, function () {
1088                                $href.slideDown(animateSpeed);
1089                            })
1090                            .removeClass("is_opened");
1091                    } else {
1092                        $menuParent
1093                            .find(menuContentClass)
1094                            .not(href)
1095                            .slideUp(animateSpeed)
1096                            .removeClass("is_opened");
1097                        $href.slideDown(animateSpeed);
1098                    }
1099                    $trigger.removeClass("is_active");
1100                    $menuParent
1101                        .find(toggleIcon)
1102                        .addClass(closeIcon)
1103                        .removeClass(openIcon);
1104                } else {
1105                    $href.slideDown(animateSpeed);
1106                }
1107                $href.addClass("is_opened");
1108                $menuElement
1109                    .find(toggleIcon)
1110                    .addClass(openIcon)
1111                    .removeClass(closeIcon);
1112                $menuElement.closest(triggerClass).addClass("is_active");
1113            } else {
1114                $href.slideUp(animateSpeed);
1115                $href.removeClass("is_opened");
1116                $menuElement.closest(triggerClass).removeClass("is_active");
1117                $menuElement
1118                    .find(toggleIcon)
1119                    .addClass(closeIcon)
1120                    .removeClass(openIcon);
1121            }
1122        }
1123        //open the first menu item
1124        var $menuParent = $(menuParentClass);
1125        var $menuContentClass = $(menuContentClass);
1126        $menuContentClass.hide();
1127        if (openFirstMenu) {
1128            $menuParent.each(function () {
1129                slideMenu($(this).find(triggerClass).first(), true);
1130            });
1131        }
1132        return this.each(function () {
1133            var $menuElement = $(this);
1134            //Open when loaded if set class .is_active to trigger button
1135            if ($menuElement.hasClass("is_active")) {
1136                slideMenu($menuElement, true);
1137            }
1138            //click event
1139            $menuElement.on("click", function (e) {
1140                e.preventDefault();
1141                if (!$(this).hasClass("is_disable")) {
1142                    slideMenu($(this));
1143                }
1144                return false;
1145            });
1146        });
1147    };
1148
1149    /*
1150     * jquery-auto-col-height.js
1151     *
1152     * Copyright (c) 2016 DINH MINH THANH - AQUARING JAPAN
1153     * Licensed under MIT Lisence:
1154     * http://www.opensource.org/licenses/mit-license.php
1155     * http://sourceforge.jp/projects/opensource/wiki/licenses%2FMIT_license
1156     *
1157     * Since:   2016-08-17
1158     * version: 0.01
1159     * Comment:
1160     *
1161     * jQuery 1.2 <-> 2.x
1162     *
1163     */
1164    $.fn.autoColHeight = function (options) {
1165        var op = $.extend(
1166            {
1167                equalCol: "> li",
1168                equalChildEle: "", // child element, bleave it blank if want to equal entire col
1169                reset: true,
1170                responsive: true,
1171                callback: function () {},
1172            },
1173            options || {}
1174        ); // optionsに値があれば上書きする
1175        var EQUAL = $(this);
1176        var init = function () {
1177            EQUAL.each(function () {
1178                var self = $(this);
1179                var colList = new Array(),
1180                    hList = new Array();
1181
1182                var colEle = self.find(op.equalCol);
1183                var wrapWidth = self.width();
1184                var reset = (function () {
1185                    var equalChildEle =
1186                        op.equalChildEle == ""
1187                            ? colEle
1188                            : self.find(op.equalChildEle);
1189                    if (op.reset == "reset" || op.reset == true) {
1190                        equalChildEle.removeAttr("style");
1191                    }
1192                })();
1193                var getColPerRow = (function (i) {
1194                    var colWidth = 0,
1195                        numRow = 0,
1196                        n = 0;
1197                    colEle.each(function (i) {
1198                        n++;
1199                        var thisColWidth =
1200                            Math.floor($(this).outerWidth()) +
1201                            Math.floor(parseFloat($(this).css("marginLeft"))) +
1202                            Math.floor(parseFloat($(this).css("marginRight")));
1203                        colWidth += thisColWidth;
1204                        if (colWidth - 2 > wrapWidth) {
1205                            colWidth = thisColWidth;
1206                            numRow++;
1207                            n = 1;
1208                            colList[numRow] = 1;
1209                        } else {
1210                            colList[numRow] = n;
1211                        }
1212                    });
1213                })();
1214                var getMaxHeight = (function () {
1215                    var m = 0,
1216                        t = 0;
1217                    $.each(colList, function (i, val) {
1218                        var mHeight = 0;
1219                        for (var y = m; y < val + m; y++) {
1220                            t++;
1221                            var equalChildEle =
1222                                op.equalChildEle == ""
1223                                    ? colEle.eq(y)
1224                                    : colEle
1225                                          .eq(y)
1226                                          .find(op.equalChildEle)
1227                                          .first();
1228                            var thisHeight = equalChildEle.height();
1229                            if (thisHeight > mHeight) {
1230                                mHeight = thisHeight;
1231                            }
1232                        }
1233                        hList[i] = mHeight;
1234                        m = t;
1235                    });
1236                })();
1237                var setMaxHeight = (function () {
1238                    var m = 0,
1239                        t = 0;
1240                    $.each(colList, function (i, val) {
1241                        for (var y = m; y < val + m; y++) {
1242                            t++;
1243                            var equalChildEle =
1244                                op.equalChildEle == ""
1245                                    ? colEle.eq(y)
1246                                    : colEle
1247                                          .eq(y)
1248                                          .find(op.equalChildEle)
1249                                          .first();
1250                            equalChildEle.height(hList[i]);
1251                        }
1252                        m = t;
1253                    });
1254                    op.callback();
1255                })();
1256            });
1257        };
1258        //Start init plugin
1259        init();
1260
1261        //Add resize event
1262        if (op.responsive) {
1263            var resizeHeightTimer = false;
1264            $(window).resize(function () {
1265                if (resizeHeightTimer !== false) {
1266                    clearTimeout(resizeHeightTimer);
1267                }
1268                resizeHeightTimer = setTimeout(function () {
1269                    init();
1270                }, 100);
1271            }); //End
1272        }
1273    };
1274
1275    $.fn.autoColHeightMemberItem = function (options) {
1276        var op = $.extend(
1277            {
1278                equalCol: "> li",
1279                equalChildEle: "", // child element, bleave it blank if want to equal entire col
1280                reset: true,
1281                responsive: true,
1282                callback: function () {},
1283            },
1284            options || {}
1285        ); // optionsに値があれば上書きする
1286        var EQUAL = $(this);
1287        var init = function () {
1288            EQUAL.each(function () {
1289                var self = $(this);
1290                var colList = new Array(),
1291                    hList = new Array();
1292
1293                var colEle = self.find(op.equalCol);
1294                var wrapWidth = self.width();
1295                var reset = (function () {
1296                    var equalChildEle =
1297                        op.equalChildEle == ""
1298                            ? colEle
1299                            : self.find(op.equalChildEle);
1300                    if (op.reset == "reset" || op.reset == true) {
1301                        equalChildEle.removeAttr("style");
1302                    }
1303                })();
1304                var getColPerRow = (function (i) {
1305                    var colWidth = 0,
1306                        numRow = 0,
1307                        n = 0;
1308                    colEle.each(function (i) {
1309                        n++;
1310                        var thisColWidth =
1311                            Math.floor($(this).outerWidth()) +
1312                            Math.floor(parseFloat($(this).css("marginLeft"))) +
1313                            Math.floor(parseFloat($(this).css("marginRight")));
1314                        colWidth += thisColWidth;
1315                        if (colWidth - 2 > wrapWidth) {
1316                            colWidth = thisColWidth;
1317                            numRow++;
1318                            n = 1;
1319                            colList[numRow] = 1;
1320                        } else {
1321                            colList[numRow] = n;
1322                        }
1323                    });
1324                })();
1325                var getMaxHeight = (function () {
1326                    var m = 0,
1327                        t = 0;
1328                    $.each(colList, function (i, val) {
1329                        var mHeight = 387;
1330                        for (var y = m; y < val + m; y++) {
1331                            t++;
1332                            var equalChildEle =
1333                                op.equalChildEle == ""
1334                                    ? colEle.eq(y)
1335                                    : colEle
1336                                          .eq(y)
1337                                          .find(op.equalChildEle)
1338                                          .first();
1339                            var thisHeight = equalChildEle.height();
1340                            if (thisHeight > mHeight) {
1341                                mHeight = thisHeight;
1342                            }
1343                        }
1344                        hList[i] = mHeight;
1345                        m = t;
1346                    });
1347                })();
1348                var setMaxHeight = (function () {
1349                    var m = 0,
1350                        t = 0;
1351                    $.each(colList, function (i, val) {
1352                        for (var y = m; y < val + m; y++) {
1353                            t++;
1354                            var equalChildEle =
1355                                op.equalChildEle == ""
1356                                    ? colEle.eq(y)
1357                                    : colEle
1358                                          .eq(y)
1359                                          .find(op.equalChildEle)
1360                                          .first();
1361                            equalChildEle.height(hList[i]);
1362                        }
1363                        m = t;
1364                    });
1365                    op.callback();
1366                })();
1367            });
1368        };
1369        //Start init plugin
1370        init();
1371
1372        //Add resize event
1373        if (op.responsive) {
1374            var resizeHeightTimer = false;
1375            $(window).resize(function () {
1376                if (resizeHeightTimer !== false) {
1377                    clearTimeout(resizeHeightTimer);
1378                }
1379                resizeHeightTimer = setTimeout(function () {
1380                    init();
1381                }, 100);
1382            }); //End
1383        }
1384    };
1385
1386    /* ------------------------------------------------------------
1387     * [ リンク範囲拡張 ]
1388     * ------------------------------------------------------------ */
1389    $.fn.anchorExpanded = function () {
1390        return this.each(function () {
1391            var $anchorExpanded = $(this);
1392            $anchorExpanded.css("cursor", "pointer");
1393            $anchorExpanded.on("click", function () {
1394                var targetAttribute = $(this).find("a").attr("target");
1395                if (targetAttribute === "_blank") {
1396                    window.open($(this).find("a").attr("href"));
1397                    return false;
1398                } else {
1399                    window.location = $(this).find("a").attr("href");
1400                    return false;
1401                }
1402            }); //end anchorExpanded
1403        });
1404    };
1405
1406    /* ------------------------------------------------------------
1407     * [ addLoadEvent ]
1408     * ------------------------------------------------------------ */
1409    function addLoadEvent(func) {
1410        var oldonload = window.onload;
1411        if (typeof window.onload != "function") {
1412            window.onload = func;
1413        } else {
1414            window.onload = function () {
1415                if (oldonload) {
1416                    oldonload();
1417                }
1418                func();
1419            };
1420        }
1421    }
1422
1423    /* ------------------------------------------------------------
1424     * [ Full BackGround Scale]
1425     * ------------------------------------------------------------ */
1426
1427    $.fn.bgFull = function () {
1428        return $(this).each(function (e) {
1429            var $this = $(this),
1430                bgImg = $(this).find(".js_fullbg__bg"),
1431                bgImgX = $(this).find(".js_fullbg__bg img"),
1432                bgWidth = bgImgX.get(0).naturalWidth,
1433                bgHeight = bgImgX.get(0).naturalHeight;
1434            $(this).find(".js_fullbg__bg img").css({
1435                visibility: "hidden",
1436            });
1437            var RATIO = {
1438                width: $this.width() / bgWidth,
1439                height: $this.height() / bgHeight,
1440            };
1441            var SCALE = Math.max(RATIO.width, RATIO.height);
1442            var scaledW = Math.ceil(bgWidth * SCALE);
1443            var scaledH = Math.ceil(bgHeight * SCALE);
1444            bgImg.css({
1445                width: scaledW,
1446                height: scaledH,
1447                left: "50%",
1448                top: "50%",
1449                "margin-top": -(scaledH / 2),
1450                "margin-left": -(scaledW / 2),
1451            });
1452            if ($this.hasClass("align_bottom")) {
1453                bgImg.css({
1454                    "margin-top": -(
1455                        scaledH / 2 +
1456                        (scaledH - $this.height()) / 2
1457                    ),
1458                });
1459            }
1460            if ($this.hasClass("align_top")) {
1461                bgImg.css({
1462                    "margin-top": -(
1463                        scaledH / 2 -
1464                        (scaledH - $this.height()) / 2
1465                    ),
1466                    "margin-bottom": "auto",
1467                });
1468            }
1469            if (bgWidth > 0) {
1470                $(this).find(".js_fullbg__bg img").css({
1471                    width: "100%",
1472                    height: "100%",
1473                    visibility: "visible",
1474                });
1475                $(".js_show").css({
1476                    visibility: "visible",
1477                });
1478            }
1479        });
1480    };
1481
1482    /* ------------------------------------------------------------
1483     * [ jQuery Easing v1.3 ] http://gsgd.co.uk/sandbox/jquery/easing/
1484     * ------------------------------------------------------------
1485     * Open source under the BSD License.
1486     *
1487     * Copyright 2008 George McGinley Smith
1488     * All rights reserved.
1489     * ------------------------------------------------------------ */
1490    jQuery.easing["jswing"] = jQuery.easing["swing"];
1491    jQuery.extend(jQuery.easing, {
1492        def: "easeOutQuad",
1493        swing: function (x, t, b, c, d) {
1494            return jQuery.easing[jQuery.easing.def](x, t, b, c, d);
1495        },
1496        easeInQuad: function (x, t, b, c, d) {
1497            return c * (t /= d) * t + b;
1498        },
1499        easeOutQuad: function (x, t, b, c, d) {
1500            return -c * (t /= d) * (t - 2) + b;
1501        },
1502        easeInOutQuad: function (x, t, b, c, d) {
1503            if ((t /= d / 2) < 1) return (c / 2) * t * t + b;
1504            return (-c / 2) * (--t * (t - 2) - 1) + b;
1505        },
1506        easeInCubic: function (x, t, b, c, d) {
1507            return c * (t /= d) * t * t + b;
1508        },
1509        easeOutCubic: function (x, t, b, c, d) {
1510            return c * ((t = t / d - 1) * t * t + 1) + b;
1511        },
1512        easeInOutCubic: function (x, t, b, c, d) {
1513            if ((t /= d / 2) < 1) return (c / 2) * t * t * t + b;
1514            return (c / 2) * ((t -= 2) * t * t + 2) + b;
1515        },
1516        easeInQuart: function (x, t, b, c, d) {
1517            return c * (t /= d) * t * t * t + b;
1518        },
1519        easeOutQuart: function (x, t, b, c, d) {
1520            return -c * ((t = t / d - 1) * t * t * t - 1) + b;
1521        },
1522        easeInOutQuart: function (x, t, b, c, d) {
1523            if ((t /= d / 2) < 1) return (c / 2) * t * t * t * t + b;
1524            return (-c / 2) * ((t -= 2) * t * t * t - 2) + b;
1525        },
1526        easeInQuint: function (x, t, b, c, d) {
1527            return c * (t /= d) * t * t * t * t + b;
1528        },
1529        easeOutQuint: function (x, t, b, c, d) {
1530            return c * ((t = t / d - 1) * t * t * t * t + 1) + b;
1531        },
1532        easeInOutQuint: function (x, t, b, c, d) {
1533            if ((t /= d / 2) < 1) return (c / 2) * t * t * t * t * t + b;
1534            return (c / 2) * ((t -= 2) * t * t * t * t + 2) + b;
1535        },
1536        easeInSine: function (x, t, b, c, d) {
1537            return -c * Math.cos((t / d) * (Math.PI / 2)) + c + b;
1538        },
1539        easeOutSine: function (x, t, b, c, d) {
1540            return c * Math.sin((t / d) * (Math.PI / 2)) + b;
1541        },
1542        easeInOutSine: function (x, t, b, c, d) {
1543            return (-c / 2) * (Math.cos((Math.PI * t) / d) - 1) + b;
1544        },
1545        easeInExpo: function (x, t, b, c, d) {
1546            return t == 0 ? b : c * Math.pow(2, 10 * (t / d - 1)) + b;
1547        },
1548        easeOutExpo: function (x, t, b, c, d) {
1549            return t == d ? b + c : c * (-Math.pow(2, (-10 * t) / d) + 1) + b;
1550        },
1551        easeInOutExpo: function (x, t, b, c, d) {
1552            if (t == 0) return b;
1553            if (t == d) return b + c;
1554            if ((t /= d / 2) < 1)
1555                return (c / 2) * Math.pow(2, 10 * (t - 1)) + b;
1556            return (c / 2) * (-Math.pow(2, -10 * --t) + 2) + b;
1557        },
1558        easeInCirc: function (x, t, b, c, d) {
1559            return -c * (Math.sqrt(1 - (t /= d) * t) - 1) + b;
1560        },
1561        easeOutCirc: function (x, t, b, c, d) {
1562            return c * Math.sqrt(1 - (t = t / d - 1) * t) + b;
1563        },
1564        easeInOutCirc: function (x, t, b, c, d) {
1565            if ((t /= d / 2) < 1)
1566                return (-c / 2) * (Math.sqrt(1 - t * t) - 1) + b;
1567            return (c / 2) * (Math.sqrt(1 - (t -= 2) * t) + 1) + b;
1568        },
1569        easeInElastic: function (x, t, b, c, d) {
1570            var s = 1.70158;
1571            var p = 0;
1572            var a = c;
1573            if (t == 0) return b;
1574            if ((t /= d) == 1) return b + c;
1575            if (!p) p = d * 0.3;
1576            if (a < Math.abs(c)) {
1577                a = c;
1578                var s = p / 4;
1579            } else var s = (p / (2 * Math.PI)) * Math.asin(c / a);
1580            return (
1581                -(
1582                    a *
1583                    Math.pow(2, 10 * (t -= 1)) *
1584                    Math.sin(((t * d - s) * (2 * Math.PI)) / p)
1585                ) + b
1586            );
1587        },
1588        easeOutElastic: function (x, t, b, c, d) {
1589            var s = 1.70158;
1590            var p = 0;
1591            var a = c;
1592            if (t == 0) return b;
1593            if ((t /= d) == 1) return b + c;
1594            if (!p) p = d * 0.3;
1595            if (a < Math.abs(c)) {
1596                a = c;
1597                var s = p / 4;
1598            } else var s = (p / (2 * Math.PI)) * Math.asin(c / a);
1599            return (
1600                a *
1601                    Math.pow(2, -10 * t) *
1602                    Math.sin(((t * d - s) * (2 * Math.PI)) / p) +
1603                c +
1604                b
1605            );
1606        },
1607        easeInOutElastic: function (x, t, b, c, d) {
1608            var s = 1.70158;
1609            var p = 0;
1610            var a = c;
1611            if (t == 0) return b;
1612            if ((t /= d / 2) == 2) return b + c;
1613            if (!p) p = d * (0.3 * 1.5);
1614            if (a < Math.abs(c)) {
1615                a = c;
1616                var s = p / 4;
1617            } else var s = (p / (2 * Math.PI)) * Math.asin(c / a);
1618            if (t < 1)
1619                return (
1620                    -0.5 *
1621                        (a *
1622                            Math.pow(2, 10 * (t -= 1)) *
1623                            Math.sin(((t * d - s) * (2 * Math.PI)) / p)) +
1624                    b
1625                );
1626            return (
1627                a *
1628                    Math.pow(2, -10 * (t -= 1)) *
1629                    Math.sin(((t * d - s) * (2 * Math.PI)) / p) *
1630                    0.5 +
1631                c +
1632                b
1633            );
1634        },
1635        easeInBack: function (x, t, b, c, d, s) {
1636            if (s == undefined) s = 1.70158;
1637            return c * (t /= d) * t * ((s + 1) * t - s) + b;
1638        },
1639        easeOutBack: function (x, t, b, c, d, s) {
1640            if (s == undefined) s = 1.70158;
1641            return c * ((t = t / d - 1) * t * ((s + 1) * t + s) + 1) + b;
1642        },
1643        easeInOutBack: function (x, t, b, c, d, s) {
1644            if (s == undefined) s = 1.70158;
1645            if ((t /= d / 2) < 1)
1646                return (c / 2) * (t * t * (((s *= 1.525) + 1) * t - s)) + b;
1647            return (
1648                (c / 2) * ((t -= 2) * t * (((s *= 1.525) + 1) * t + s) + 2) + b
1649            );
1650        },
1651        easeInBounce: function (x, t, b, c, d) {
1652            return c - jQuery.easing.easeOutBounce(x, d - t, 0, c, d) + b;
1653        },
1654        easeOutBounce: function (x, t, b, c, d) {
1655            if ((t /= d) < 1 / 2.75) {
1656                return c * (7.5625 * t * t) + b;
1657            } else if (t < 2 / 2.75) {
1658                return c * (7.5625 * (t -= 1.5 / 2.75) * t + 0.75) + b;
1659            } else if (t < 2.5 / 2.75) {
1660                return c * (7.5625 * (t -= 2.25 / 2.75) * t + 0.9375) + b;
1661            } else {
1662                return c * (7.5625 * (t -= 2.625 / 2.75) * t + 0.984375) + b;
1663            }
1664        },
1665        easeInOutBounce: function (x, t, b, c, d) {
1666            if (t < d / 2)
1667                return jQuery.easing.easeInBounce(x, t * 2, 0, c, d) * 0.5 + b;
1668            return (
1669                jQuery.easing.easeOutBounce(x, t * 2 - d, 0, c, d) * 0.5 +
1670                c * 0.5 +
1671                b
1672            );
1673        },
1674    });
1675
1676    /**
1677	 * bxSlider v4.2.5
1678	 * Copyright 2013-2015 Steven Wanderski
1679	 * Written while drinking Belgian ales and listening to jazz
1680
1681	 * Licensed under MIT (http://opensource.org/licenses/MIT)
1682	 */
1683
1684    !(function (a) {
1685        var b = {
1686            mode: "horizontal",
1687            slideSelector: "",
1688            infiniteLoop: !0,
1689            hideControlOnEnd: !1,
1690            speed: 500,
1691            easing: null,
1692            slideMargin: 0,
1693            startSlide: 0,
1694            randomStart: !1,
1695            captions: !1,
1696            ticker: !1,
1697            tickerHover: !1,
1698            adaptiveHeight: !1,
1699            adaptiveHeightSpeed: 500,
1700            video: !1,
1701            useCSS: !0,
1702            preloadImages: "visible",
1703            responsive: !0,
1704            slideZIndex: 50,
1705            wrapperClass: "bx-wrapper",
1706            touchEnabled: !0,
1707            swipeThreshold: 50,
1708            oneToOneTouch: !0,
1709            preventDefaultSwipeX: !0,
1710            preventDefaultSwipeY: !1,
1711            ariaLive: !0,
1712            ariaHidden: !0,
1713            keyboardEnabled: !1,
1714            pager: !0,
1715            pagerType: "full",
1716            pagerShortSeparator: " / ",
1717            pagerSelector: null,
1718            buildPager: null,
1719            pagerCustom: null,
1720            controls: !0,
1721            nextText: "Next",
1722            prevText: "Prev",
1723            nextSelector: null,
1724            prevSelector: null,
1725            autoControls: !1,
1726            startText: "Start",
1727            stopText: "Stop",
1728            autoControlsCombine: !1,
1729            autoControlsSelector: null,
1730            auto: !1,
1731            pause: 4e3,
1732            autoStart: !0,
1733            autoDirection: "next",
1734            stopAutoOnClick: !1,
1735            autoHover: !1,
1736            autoDelay: 0,
1737            autoSlideForOnePage: !1,
1738            minSlides: 1,
1739            maxSlides: 1,
1740            moveSlides: 0,
1741            slideWidth: 0,
1742            shrinkItems: !1,
1743            onSliderLoad: function () {
1744                return !0;
1745            },
1746            onSlideBefore: function () {
1747                return !0;
1748            },
1749            onSlideAfter: function () {
1750                return !0;
1751            },
1752            onSlideNext: function () {
1753                return !0;
1754            },
1755            onSlidePrev: function () {
1756                return !0;
1757            },
1758            onSliderResize: function () {
1759                return !0;
1760            },
1761        };
1762        a.fn.bxSlider = function (c) {
1763            if (0 === this.length) return this;
1764            if (this.length > 1)
1765                return (
1766                    this.each(function () {
1767                        a(this).bxSlider(c);
1768                    }),
1769                    this
1770                );
1771            var d = {},
1772                e = this,
1773                f = a(window).width(),
1774                g = a(window).height();
1775            if (!a(e).data("bxSlider")) {
1776                var h = function () {
1777                        a(e).data("bxSlider") ||
1778                            ((d.settings = a.extend({}, b, c)),
1779                            (d.settings.slideWidth = parseInt(
1780                                d.settings.slideWidth
1781                            )),
1782                            (d.children = e.children(d.settings.slideSelector)),
1783                            d.children.length < d.settings.minSlides &&
1784                                (d.settings.minSlides = d.children.length),
1785                            d.children.length < d.settings.maxSlides &&
1786                                (d.settings.maxSlides = d.children.length),
1787                            d.settings.randomStart &&
1788                                (d.settings.startSlide = Math.floor(
1789                                    Math.random() * d.children.length
1790                                )),
1791                            (d.active = {
1792                                index: d.settings.startSlide,
1793                            }),
1794                            (d.carousel =
1795                                d.settings.minSlides > 1 ||
1796                                d.settings.maxSlides > 1
1797                                    ? !0
1798                                    : !1),
1799                            d.carousel && (d.settings.preloadImages = "all"),
1800                            (d.minThreshold =
1801                                d.settings.minSlides * d.settings.slideWidth +
1802                                (d.settings.minSlides - 1) *
1803                                    d.settings.slideMargin),
1804                            (d.maxThreshold =
1805                                d.settings.maxSlides * d.settings.slideWidth +
1806                                (d.settings.maxSlides - 1) *
1807                                    d.settings.slideMargin),
1808                            (d.working = !1),
1809                            (d.controls = {}),
1810                            (d.interval = null),
1811                            (d.animProp =
1812                                "vertical" === d.settings.mode
1813                                    ? "top"
1814                                    : "left"),
1815                            (d.usingCSS =
1816                                d.settings.useCSS &&
1817                                "fade" !== d.settings.mode &&
1818                                (function () {
1819                                    for (
1820                                        var a = document.createElement("div"),
1821                                            b = [
1822                                                "WebkitPerspective",
1823                                                "MozPerspective",
1824                                                "OPerspective",
1825                                                "msPerspective",
1826                                            ],
1827                                            c = 0;
1828                                        c < b.length;
1829                                        c++
1830                                    )
1831                                        if (void 0 !== a.style[b[c]])
1832                                            return (
1833                                                (d.cssPrefix = b[c]
1834                                                    .replace("Perspective", "")
1835                                                    .toLowerCase()),
1836                                                (d.animProp =
1837                                                    "-" +
1838                                                    d.cssPrefix +
1839                                                    "-transform"),
1840                                                !0
1841                                            );
1842                                    return !1;
1843                                })()),
1844                            "vertical" === d.settings.mode &&
1845                                (d.settings.maxSlides = d.settings.minSlides),
1846                            e.data("origStyle", e.attr("style")),
1847                            e
1848                                .children(d.settings.slideSelector)
1849                                .each(function () {
1850                                    a(this).data(
1851                                        "origStyle",
1852                                        a(this).attr("style")
1853                                    );
1854                                }),
1855                            j());
1856                    },
1857                    j = function () {
1858                        var b = d.children.eq(d.settings.startSlide);
1859                        e.wrap(
1860                            '<div class="' +
1861                                d.settings.wrapperClass +
1862                                '"><div class="bx-viewport"></div></div>'
1863                        ),
1864                            (d.viewport = e.parent()),
1865                            d.settings.ariaLive &&
1866                                !d.settings.ticker &&
1867                                d.viewport.attr("aria-live", "polite"),
1868                            (d.loader = a('<div class="bx-loading" />')),
1869                            d.viewport.prepend(d.loader),
1870                            e.css({
1871                                width:
1872                                    "horizontal" === d.settings.mode
1873                                        ? 1e3 * d.children.length + 215 + "%"
1874                                        : "auto",
1875                                position: "relative",
1876                            }),
1877                            d.usingCSS && d.settings.easing
1878                                ? e.css(
1879                                      "-" +
1880                                          d.cssPrefix +
1881                                          "-transition-timing-function",
1882                                      d.settings.easing
1883                                  )
1884                                : d.settings.easing ||
1885                                  (d.settings.easing = "swing"),
1886                            d.viewport.css({
1887                                width: "100%",
1888                                overflow: "hidden",
1889                                position: "relative",
1890                            }),
1891                            d.viewport.parent().css({
1892                                maxWidth: n(),
1893                            }),
1894                            d.settings.pager ||
1895                                d.settings.controls ||
1896                                d.viewport.parent().css({
1897                                    margin: "0 auto 0px",
1898                                }),
1899                            d.children.css({
1900                                float:
1901                                    "horizontal" === d.settings.mode
1902                                        ? "left"
1903                                        : "none",
1904                                listStyle: "none",
1905                                position: "relative",
1906                            }),
1907                            d.children.css("width", o()),
1908                            "horizontal" === d.settings.mode &&
1909                                d.settings.slideMargin > 0 &&
1910                                d.children.css(
1911                                    "marginRight",
1912                                    d.settings.slideMargin
1913                                ),
1914                            "vertical" === d.settings.mode &&
1915                                d.settings.slideMargin > 0 &&
1916                                d.children.css(
1917                                    "marginBottom",
1918                                    d.settings.slideMargin
1919                                ),
1920                            "fade" === d.settings.mode &&
1921                                (d.children.css({
1922                                    position: "absolute",
1923                                    zIndex: 0,
1924                                    display: "none",
1925                                }),
1926                                d.children.eq(d.settings.startSlide).css({
1927                                    zIndex: d.settings.slideZIndex,
1928                                    display: "block",
1929                                })),
1930                            (d.controls.el = a('<div class="bx-controls" />')),
1931                            d.settings.captions && y(),
1932                            (d.active.last = d.settings.startSlide === q() - 1),
1933                            d.settings.video && e.fitVids(),
1934                            ("all" === d.settings.preloadImages ||
1935                                d.settings.ticker) &&
1936                                (b = d.children),
1937                            d.settings.ticker
1938                                ? (d.settings.pager = !1)
1939                                : (d.settings.controls && w(),
1940                                  d.settings.auto &&
1941                                      d.settings.autoControls &&
1942                                      x(),
1943                                  d.settings.pager && v(),
1944                                  (d.settings.controls ||
1945                                      d.settings.autoControls ||
1946                                      d.settings.pager) &&
1947                                      d.viewport.after(d.controls.el)),
1948                            k(b, l);
1949                    },
1950                    k = function (b, c) {
1951                        var d = b.find('img:not([src=""]), iframe').length,
1952                            e = 0;
1953                        return 0 === d
1954                            ? void c()
1955                            : void b
1956                                  .find('img:not([src=""]), iframe')
1957                                  .each(function () {
1958                                      a(this)
1959                                          .one("load error", function () {
1960                                              ++e === d && c();
1961                                          })
1962                                          .each(function () {
1963                                              this.complete && a(this).load();
1964                                          });
1965                                  });
1966                    },
1967                    l = function () {
1968                        if (
1969                            d.settings.infiniteLoop &&
1970                            "fade" !== d.settings.mode &&
1971                            !d.settings.ticker
1972                        ) {
1973                            var b =
1974                                    "vertical" === d.settings.mode
1975                                        ? d.settings.minSlides
1976                                        : d.settings.maxSlides,
1977                                c = d.children
1978                                    .slice(0, b)
1979                                    .clone(!0)
1980                                    .addClass("bx-clone"),
1981                                f = d.children
1982                                    .slice(-b)
1983                                    .clone(!0)
1984                                    .addClass("bx-clone");
1985                            d.settings.ariaHidden &&
1986                                (c.attr("aria-hidden", !0),
1987                                f.attr("aria-hidden", !0)),
1988                                e.append(c).prepend(f);
1989                        }
1990                        d.loader.remove(),
1991                            s(),
1992                            "vertical" === d.settings.mode &&
1993                                (d.settings.adaptiveHeight = !0),
1994                            d.viewport.height(m()),
1995                            e.redrawSlider(),
1996                            d.settings.onSliderLoad.call(e, d.active.index),
1997                            (d.initialized = !0),
1998                            d.settings.responsive &&
1999                                a(window).bind("resize", S),
2000                            d.settings.auto &&
2001                                d.settings.autoStart &&
2002                                (q() > 1 || d.settings.autoSlideForOnePage) &&
2003                                I(),
2004                            d.settings.ticker && J(),
2005                            d.settings.pager && E(d.settings.startSlide),
2006                            d.settings.controls && H(),
2007                            d.settings.touchEnabled &&
2008                                !d.settings.ticker &&
2009                                N(),
2010                            d.settings.keyboardEnabled &&
2011                                !d.settings.ticker &&
2012                                a(document).keydown(M);
2013                    },
2014                    m = function () {
2015                        var b = 0,
2016                            c = a();
2017                        if (
2018                            "vertical" === d.settings.mode ||
2019                            d.settings.adaptiveHeight
2020                        )
2021                            if (d.carousel) {
2022                                var e =
2023                                    1 === d.settings.moveSlides
2024                                        ? d.active.index
2025                                        : d.active.index * r();
2026                                for (
2027                                    c = d.children.eq(e), i = 1;
2028                                    i <= d.settings.maxSlides - 1;
2029                                    i++
2030                                )
2031                                    c =
2032                                        e + i >= d.children.length
2033                                            ? c.add(d.children.eq(i - 1))
2034                                            : c.add(d.children.eq(e + i));
2035                            } else c = d.children.eq(d.active.index);
2036                        else c = d.children;
2037                        return (
2038                            "vertical" === d.settings.mode
2039                                ? (c.each(function (c) {
2040                                      b += a(this).outerHeight();
2041                                  }),
2042                                  d.settings.slideMargin > 0 &&
2043                                      (b +=
2044                                          d.settings.slideMargin *
2045                                          (d.settings.minSlides - 1)))
2046                                : (b = Math.max.apply(
2047                                      Math,
2048                                      c
2049                                          .map(function () {
2050                                              return a(this).outerHeight(!1);
2051                                          })
2052                                          .get()
2053                                  )),
2054                            "border-box" === d.viewport.css("box-sizing")
2055                                ? (b +=
2056                                      parseFloat(
2057                                          d.viewport.css("padding-top")
2058                                      ) +
2059                                      parseFloat(
2060                                          d.viewport.css("padding-bottom")
2061                                      ) +
2062                                      parseFloat(
2063                                          d.viewport.css("border-top-width")
2064                                      ) +
2065                                      parseFloat(
2066                                          d.viewport.css("border-bottom-width")
2067                                      ))
2068                                : "padding-box" ===
2069                                      d.viewport.css("box-sizing") &&
2070                                  (b +=
2071                                      parseFloat(
2072                                          d.viewport.css("padding-top")
2073                                      ) +
2074                                      parseFloat(
2075                                          d.viewport.css("padding-bottom")
2076                                      )),
2077                            b
2078                        );
2079                    },
2080                    n = function () {
2081                        var a = "100%";
2082                        return (
2083                            d.settings.slideWidth > 0 &&
2084                                (a =
2085                                    "horizontal" === d.settings.mode
2086                                        ? d.settings.maxSlides *
2087                                              d.settings.slideWidth +
2088                                          (d.settings.maxSlides - 1) *
2089                                              d.settings.slideMargin
2090                                        : d.settings.slideWidth),
2091                            a
2092                        );
2093                    },
2094                    o = function () {
2095                        var a = d.settings.slideWidth,
2096                            b = d.viewport.width();
2097                        if (
2098                            0 === d.settings.slideWidth ||
2099                            (d.settings.slideWidth > b && !d.carousel) ||
2100                            "vertical" === d.settings.mode
2101                        )
2102                            a = b;
2103                        else if (
2104                            d.settings.maxSlides > 1 &&
2105                            "horizontal" === d.settings.mode
2106                        ) {
2107                            if (b > d.maxThreshold) return a;
2108                            b < d.minThreshold
2109                                ? (a =
2110                                      (b -
2111                                          d.settings.slideMargin *
2112                                              (d.settings.minSlides - 1)) /
2113                                      d.settings.minSlides)
2114                                : d.settings.shrinkItems &&
2115                                  (a = Math.floor(
2116                                      (b + d.settings.slideMargin) /
2117                                          Math.ceil(
2118                                              (b + d.settings.slideMargin) /
2119                                                  (a + d.settings.slideMargin)
2120                                          ) -
2121                                          d.settings.slideMargin
2122                                  ));
2123                        }
2124                        return a;
2125                    },
2126                    p = function () {
2127                        var a = 1,
2128                            b = null;
2129                        return (
2130                            "horizontal" === d.settings.mode &&
2131                            d.settings.slideWidth > 0
2132                                ? d.viewport.width() < d.minThreshold
2133                                    ? (a = d.settings.minSlides)
2134                                    : d.viewport.width() > d.maxThreshold
2135                                    ? (a = d.settings.maxSlides)
2136                                    : ((b =
2137                                          d.children.first().width() +
2138                                          d.settings.slideMargin),
2139                                      (a = Math.floor(
2140                                          (d.viewport.width() +
2141                                              d.settings.slideMargin) /
2142                                              b
2143                                      )))
2144                                : "vertical" === d.settings.mode &&
2145                                  (a = d.settings.minSlides),
2146                            a
2147                        );
2148                    },
2149                    q = function () {
2150                        var a = 0,
2151                            b = 0,
2152                            c = 0;
2153                        if (d.settings.moveSlides > 0)
2154                            if (d.settings.infiniteLoop)
2155                                a = Math.ceil(d.children.length / r());
2156                            else
2157                                for (; b < d.children.length; )
2158                                    ++a,
2159                                        (b = c + p()),
2160                                        (c +=
2161                                            d.settings.moveSlides <= p()
2162                                                ? d.settings.moveSlides
2163                                                : p());
2164                        else a = Math.ceil(d.children.length / p());
2165                        return a;
2166                    },
2167                    r = function () {
2168                        return d.settings.moveSlides > 0 &&
2169                            d.settings.moveSlides <= p()
2170                            ? d.settings.moveSlides
2171                            : p();
2172                    },
2173                    s = function () {
2174                        var a, b, c;
2175                        d.children.length > d.settings.maxSlides &&
2176                        d.active.last &&
2177                        !d.settings.infiniteLoop
2178                            ? "horizontal" === d.settings.mode
2179                                ? ((b = d.children.last()),
2180                                  (a = b.position()),
2181                                  t(
2182                                      -(
2183                                          a.left -
2184                                          (d.viewport.width() - b.outerWidth())
2185                                      ),
2186                                      "reset",
2187                                      0
2188                                  ))
2189                                : "vertical" === d.settings.mode &&
2190                                  ((c =
2191                                      d.children.length - d.settings.minSlides),
2192                                  (a = d.children.eq(c).position()),
2193                                  t(-a.top, "reset", 0))
2194                            : ((a = d.children
2195                                  .eq(d.active.index * r())
2196                                  .position()),
2197                              d.active.index === q() - 1 &&
2198                                  (d.active.last = !0),
2199                              void 0 !== a &&
2200                                  ("horizontal" === d.settings.mode
2201                                      ? t(-a.left, "reset", 0)
2202                                      : "vertical" === d.settings.mode &&
2203                                        t(-a.top, "reset", 0)));
2204                    },
2205                    t = function (b, c, f, g) {
2206                        var h, i;
2207                        d.usingCSS
2208                            ? ((i =
2209                                  "vertical" === d.settings.mode
2210                                      ? "translate3d(0, " + b + "px, 0)"
2211                                      : "translate3d(" + b + "px, 0, 0)"),
2212                              e.css(
2213                                  "-" + d.cssPrefix + "-transition-duration",
2214                                  f / 1e3 + "s"
2215                              ),
2216                              "slide" === c
2217                                  ? (e.css(d.animProp, i),
2218                                    0 !== f
2219                                        ? e.bind(
2220                                              "transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd",
2221                                              function (b) {
2222                                                  a(b.target).is(e) &&
2223                                                      (e.unbind(
2224                                                          "transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd"
2225                                                      ),
2226                                                      F());
2227                                              }
2228                                          )
2229                                        : F())
2230                                  : "reset" === c
2231                                  ? e.css(d.animProp, i)
2232                                  : "ticker" === c &&
2233                                    (e.css(
2234                                        "-" +
2235                                            d.cssPrefix +
2236                                            "-transition-timing-function",
2237                                        "linear"
2238                                    ),
2239                                    e.css(d.animProp, i),
2240                                    0 !== f
2241                                        ? e.bind(
2242                                              "transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd",
2243                                              function (b) {
2244                                                  a(b.target).is(e) &&
2245                                                      (e.unbind(
2246                                                          "transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd"
2247                                                      ),
2248                                                      t(
2249                                                          g.resetValue,
2250                                                          "reset",
2251                                                          0
2252                                                      ),
2253                                                      K());
2254                                              }
2255                                          )
2256                                        : (t(g.resetValue, "reset", 0), K())))
2257                            : ((h = {}),
2258                              (h[d.animProp] = b),
2259                              "slide" === c
2260                                  ? e.animate(
2261                                        h,
2262                                        f,
2263                                        d.settings.easing,
2264                                        function () {
2265                                            F();
2266                                        }
2267                                    )
2268                                  : "reset" === c
2269                                  ? e.css(d.animProp, b)
2270                                  : "ticker" === c &&
2271                                    e.animate(h, f, "linear", function () {
2272                                        t(g.resetValue, "reset", 0), K();
2273                                    }));
2274                    },
2275                    u = function () {
2276                        for (var b = "", c = "", e = q(), f = 0; e > f; f++)
2277                            (c = ""),
2278                                (d.settings.buildPager &&
2279                                    a.isFunction(d.settings.buildPager)) ||
2280                                d.settings.pagerCustom
2281                                    ? ((c = d.settings.buildPager(f)),
2282                                      d.pagerEl.addClass("bx-custom-pager"))
2283                                    : ((c = f + 1),
2284                                      d.pagerEl.addClass("bx-default-pager")),
2285                                (b +=
2286                                    '<div class="bx-pager-item">
2286<a href="" data-slide-index="' +
2287                                    f +
2288                                    '" class="bx-pager-link">' +
2289                                    c +
2290                                    "</a></div>");
2291                        d.pagerEl.html(b);
2292                    },
2293                    v = function () {
2294                        d.settings.pagerCustom
2295                            ? (d.pagerEl = a(d.settings.pagerCustom))
2296                            : ((d.pagerEl = a('<div class="bx-pager" />')),
2297                              d.settings.pagerSelector
2298                                  ? a(d.settings.pagerSelector).html(d.pagerEl)
2299                                  : d.controls.el
2300                                        .addClass("bx-has-pager")
2301                                        .append(d.pagerEl),
2302                              u()),
2303                            d.pagerEl.on("click touchend", "a", D);
2304                    },
2305                    w = function () {
2306                        (d.controls.next = a(
2307                            '<a class="bx-next" href="">' +
2308                                d.settings.nextText +
2309                                "</a>"
2310                        )),
2311                            (d.controls.prev = a(
2312                                '<a class="bx-prev" href="">' +
2313                                    d.settings.prevText +
2314                                    "</a>"
2315                            )),
2316                            d.controls.next.bind("click touchend", z),
2317                            d.controls.prev.bind("click touchend", A),
2318                            d.settings.nextSelector &&
2319                                a(d.settings.nextSelector).append(
2320                                    d.controls.next
2321                                ),
2322                            d.settings.prevSelector &&
2323                                a(d.settings.prevSelector).append(
2324                                    d.controls.prev
2325                                ),
2326                            d.settings.nextSelector ||
2327                                d.settings.prevSelector ||
2328                                ((d.controls.directionEl = a(
2329                                    '<div class="bx-controls-direction" />'
2330                                )),
2331                                d.controls.directionEl
2332                                    .append(d.controls.prev)
2333                                    .append(d.controls.next),
2334                                d.controls.el
2335                                    .addClass("bx-has-controls-direction")
2336                                    .append(d.controls.directionEl));
2337                    },
2338                    x = function () {
2339                        (d.controls.start = a(
2340                            '<div class="bx-controls-auto-item"><a class="bx-start" href="">' +
2341                                d.settings.startText +
2342                                "</a></div>"
2343                        )),
2344                            (d.controls.stop = a(
2345                                '<div class="bx-controls-auto-item"><a class="bx-stop" href="">' +
2346                                    d.settings.stopText +
2347                                    "</a></div>"
2348                            )),
2349                            (d.controls.autoEl = a(
2350                                '<div class="bx-controls-auto" />'
2351                            )),
2352                            d.controls.autoEl.on("click", ".bx-start", B),
2353                            d.controls.autoEl.on("click", ".bx-stop", C),
2354                            d.settings.autoControlsCombine
2355                                ? d.controls.autoEl.append(d.controls.start)
2356                                : d.controls.autoEl
2357                                      .append(d.controls.start)
2358                                      .append(d.controls.stop),
2359                            d.settings.autoControlsSelector
2360                                ? a(d.settings.autoControlsSelector).html(
2361                                      d.controls.autoEl
2362                                  )
2363                                : d.controls.el
2364                                      .addClass("bx-has-controls-auto")
2365                                      .append(d.controls.autoEl),
2366                            G(d.settings.autoStart ? "stop" : "start");
2367                    },
2368                    y = function () {
2369                        d.children.each(function (b) {
2370                            var c = a(this).find("img:first").attr("title");
2371                            void 0 !== c &&
2372                                ("" + c).length &&
2373                                a(this).append(
2374                                    '<div class="bx-caption"><span>' +
2375                                        c +
2376                                        "</span></div>"
2377                                );
2378                        });
2379                    },
2380                    z = function (a) {
2381                        a.preventDefault(),
2382                            d.controls.el.hasClass("disabled") ||
2383                                (d.settings.auto &&
2384                                    d.settings.stopAutoOnClick &&
2385                                    e.stopAuto(),
2386                                e.goToNextSlide());
2387                    },
2388                    A = function (a) {
2389                        a.preventDefault(),
2390                            d.controls.el.hasClass("disabled") ||
2391                                (d.settings.auto &&
2392                                    d.settings.stopAutoOnClick &&
2393                                    e.stopAuto(),
2394                                e.goToPrevSlide());
2395                    },
2396                    B = function (a) {
2397                        e.startAuto(), a.preventDefault();
2398                    },
2399                    C = function (a) {
2400                        e.stopAuto(), a.preventDefault();
2401                    },
2402                    D = function (b) {
2403                        var c, f;
2404                        b.preventDefault(),
2405                            d.controls.el.hasClass("disabled") ||
2406                                (d.settings.auto &&
2407                                    d.settings.stopAutoOnClick &&
2408                                    e.stopAuto(),
2409                                (c = a(b.currentTarget)),
2410                                void 0 !== c.attr("data-slide-index") &&
2411                                    ((f = parseInt(c.attr("data-slide-index"))),
2412                                    f !== d.active.index && e.goToSlide(f)));
2413                    },
2414                    E = function (b) {
2415                        var c = d.children.length;
2416                        return "short" === d.settings.pagerType
2417                            ? (d.settings.maxSlides > 1 &&
2418                                  (c = Math.ceil(
2419                                      d.children.length / d.settings.maxSlides
2420                                  )),
2421                              void d.pagerEl.html(
2422                                  b + 1 + d.settings.pagerShortSeparator + c
2423                              ))
2424                            : (d.pagerEl.find("a").removeClass("active"),
2425                              void d.pagerEl.each(function (c, d) {
2426                                  a(d).find("a").eq(b).addClass("active");
2427                              }));
2428                    },
2429                    F = function () {
2430                        if (d.settings.infiniteLoop) {
2431                            var a = "";
2432                            0 === d.active.index
2433                                ? (a = d.children.eq(0).position())
2434                                : d.active.index === q() - 1 && d.carousel
2435                                ? (a = d.children
2436                                      .eq((q() - 1) * r())
2437                                      .position())
2438                                : d.active.index === d.children.length - 1 &&
2439                                  (a = d.children
2440                                      .eq(d.children.length - 1)
2441                                      .position()),
2442                                a &&
2443                                    ("horizontal" === d.settings.mode
2444                                        ? t(-a.left, "reset", 0)
2445                                        : "vertical" === d.settings.mode &&
2446                                          t(-a.top, "reset", 0));
2447                        }
2448                        (d.working = !1),
2449                            d.settings.onSlideAfter.call(
2450                                e,
2451                                d.children.eq(d.active.index),
2452                                d.oldIndex,
2453                                d.active.index
2454                            );
2455                    },
2456                    G = function (a) {
2457                        d.settings.autoControlsCombine
2458                            ? d.controls.autoEl.html(d.controls[a])
2459                            : (d.controls.autoEl
2460                                  .find("a")
2461                                  .removeClass("active"),
2462                              d.controls.autoEl
2463                                  .find("a:not(.bx-" + a + ")")
2464                                  .addClass("active"));
2465                    },
2466                    H = function () {
2467                        1 === q()
2468                            ? (d.controls.prev.addClass("disabled"),
2469                              d.controls.next.addClass("disabled"))
2470                            : !d.settings.infiniteLoop &&
2471                              d.settings.hideControlOnEnd &&
2472                              (0 === d.active.index
2473                                  ? (d.controls.prev.addClass("disabled"),
2474                                    d.controls.next.removeClass("disabled"))
2475                                  : d.active.index === q() - 1
2476                                  ? (d.controls.next.addClass("disabled"),
2477                                    d.controls.prev.removeClass("disabled"))
2478                                  : (d.controls.prev.removeClass("disabled"),
2479                                    d.controls.next.removeClass("disabled")));
2480                    },
2481                    I = function () {
2482                        if (d.settings.autoDelay > 0) {
2483                            setTimeout(e.startAuto, d.settings.autoDelay);
2484                        } else
2485                            e.startAuto(),
2486                                a(window)
2487                                    .focus(function () {
2488                                        e.startAuto();
2489                                    })
2490                                    .blur(function () {
2491                                        e.stopAuto();
2492                                    });
2493                        d.settings.autoHover &&
2494                            e.hover(
2495                                function () {
2496                                    d.interval &&
2497                                        (e.stopAuto(!0), (d.autoPaused = !0));
2498                                },
2499                                function () {
2500                                    d.autoPaused &&
2501                                        (e.startAuto(!0),
2502                                        (d.autoPaused = null));
2503                                }
2504                            );
2505                    },
2506                    J = function () {
2507                        var b,
2508                            c,
2509                            f,
2510                            g,
2511                            h,
2512                            i,
2513                            j,
2514                            k,
2515                            l = 0;
2516                        "next" === d.settings.autoDirection
2517                            ? e.append(d.children.clone().addClass("bx-clone"))
2518                            : (e.prepend(
2519                                  d.children.clone().addClass("bx-clone")
2520                              ),
2521                              (b = d.children.first().position()),
2522                              (l =
2523                                  "horizontal" === d.settings.mode
2524                                      ? -b.left
2525                                      : -b.top)),
2526                            t(l, "reset", 0),
2527                            (d.settings.pager = !1),
2528                            (d.settings.controls = !1),
2529                            (d.settings.autoControls = !1),
2530                            d.settings.tickerHover &&
2531                                (d.usingCSS
2532                                    ? ((g =
2533                                          "horizontal" === d.settings.mode
2534                                              ? 4
2535                                              : 5),
2536                                      d.viewport.hover(
2537                                          function () {
2538                                              (c = e.css(
2539                                                  "-" +
2540                                                      d.cssPrefix +
2541                                                      "-transform"
2542                                              )),
2543                                                  (f = parseFloat(
2544                                                      c.split(",")[g]
2545                                                  )),
2546                                                  t(f, "reset", 0);
2547                                          },
2548                                          function () {
2549                                              (k = 0),
2550                                                  d.children.each(function (b) {
2551                                                      k +=
2552                                                          "horizontal" ===
2553                                                          d.settings.mode
2554                                                              ? a(
2555                                                                    this
2556                                                                ).outerWidth(!0)
2557                                                              : a(
2558                                                                    this
2559                                                                ).outerHeight(
2560                                                                    !0
2561                                                                );
2562                                                  }),
2563                                                  (h = d.settings.speed / k),
2564                                                  (i =
2565                                                      "horizontal" ===
2566                                                      d.settings.mode
2567                                                          ? "left"
2568                                                          : "top"),
2569                                                  (j =
2570                                                      h *
2571                                                      (k -
2572                                                          Math.abs(
2573                                                              parseInt(f)
2574                                                          ))),
2575                                                  K(j);
2576                                          }
2577                                      ))
2578                                    : d.viewport.hover(
2579                                          function () {
2580                                              e.stop();
2581                                          },
2582                                          function () {
2583                                              (k = 0),
2584                                                  d.children.each(function (b) {
2585                                                      k +=
2586                                                          "horizontal" ===
2587                                                          d.settings.mode
2588                                                              ? a(
2589                                                                    this
2590                                                                ).outerWidth(!0)
2591                                                              : a(
2592                                                                    this
2593                                                                ).outerHeight(
2594                                                                    !0
2595                                                                );
2596                                                  }),
2597                                                  (h = d.settings.speed / k),
2598                                                  (i =
2599                                                      "horizontal" ===
2600                                                      d.settings.mode
2601                                                          ? "left"
2602                                                          : "top"),
2603                                                  (j =
2604                                                      h *
2605                                                      (k -
2606                                                          Math.abs(
2607                                                              parseInt(e.css(i))
2608                                                          ))),
2609                                                  K(j);
2610                                          }
2611                                      )),
2612                            K();
2613                    },
2614                    K = function (a) {
2615                        var b,
2616                            c,
2617                            f,
2618                            g = a ? a : d.settings.speed,
2619                            h = {
2620                                left: 0,
2621                                top: 0,
2622                            },
2623                            i = {
2624                                left: 0,
2625                                top: 0,
2626                            };
2627                        "next" === d.settings.autoDirection
2628                            ? (h = e.find(".bx-clone").first().position())
2629                            : (i = d.children.first().position()),
2630                            (b =
2631                                "horizontal" === d.settings.mode
2632                                    ? -h.left
2633                                    : -h.top),
2634                            (c =
2635                                "horizontal" === d.settings.mode
2636                                    ? -i.left
2637                                    : -i.top),
2638                            (f = {
2639                                resetValue: c,
2640                            }),
2641                            t(b, "ticker", g, f);
2642                    },
2643                    L = function (b) {
2644                        var c = a(window),
2645                            d = {
2646                                top: c.scrollTop(),
2647                                left: c.scrollLeft(),
2648                            },
2649                            e = b.offset();
2650                        return (
2651                            (d.right = d.left + c.width()),
2652                            (d.bottom = d.top + c.height()),
2653                            (e.right = e.left + b.outerWidth()),
2654                            (e.bottom = e.top + b.outerHeight()),
2655                            !(
2656                                d.right < e.left ||
2657                                d.left > e.right ||
2658                                d.bottom < e.top ||
2659                                d.top > e.bottom
2660                            )
2661                        );
2662                    },
2663                    M = function (a) {
2664                        var b = document.activeElement.tagName.toLowerCase(),
2665                            c = "input|textarea",
2666                            d = new RegExp(b, ["i"]),
2667                            f = d.exec(c);
2668                        if (null == f && L(e)) {
2669                            if (39 === a.keyCode) return z(a), !1;
2670                            if (37 === a.keyCode) return A(a), !1;
2671                        }
2672                    },
2673                    N = function () {
2674                        (d.touch = {
2675                            start: {
2676                                x: 0,
2677                                y: 0,
2678                            },
2679                            end: {
2680                                x: 0,
2681                                y: 0,
2682                            },
2683                        }),
2684                            d.viewport.bind(
2685                                "touchstart MSPointerDown pointerdown",
2686                                O
2687                            ),
2688                            d.viewport.on("click", ".bxslider a", function (a) {
2689                                d.viewport.hasClass("click-disabled") &&
2690                                    (a.preventDefault(),
2691                                    d.viewport.removeClass("click-disabled"));
2692                            });
2693                    },
2694                    O = function (a) {
2695                        if ((d.controls.el.addClass("disabled"), d.working))
2696                            a.preventDefault(),
2697                                d.controls.el.removeClass("disabled");
2698                        else {
2699                            d.touch.originalPos = e.position();
2700                            var b = a.originalEvent,
2701                                c =
2702                                    "undefined" != typeof b.changedTouches
2703                                        ? b.changedTouches
2704                                        : [b];
2705                            (d.touch.start.x = c[0].pageX),
2706                                (d.touch.start.y = c[0].pageY),
2707                                d.viewport.get(0).setPointerCapture &&
2708                                    ((d.pointerId = b.pointerId),
2709                                    d.viewport
2710                                        .get(0)
2711                                        .setPointerCapture(d.pointerId)),
2712                                d.viewport.bind(
2713                                    "touchmove MSPointerMove pointermove",
2714                                    Q
2715                                ),
2716                                d.viewport.bind(
2717                                    "touchend MSPointerUp pointerup",
2718                                    R
2719                                ),
2720                                d.viewport.bind(
2721                                    "MSPointerCancel pointercancel",
2722                                    P
2723                                );
2724                        }
2725                    },
2726                    P = function (a) {
2727                        t(d.touch.originalPos.left, "reset", 0),
2728                            d.controls.el.removeClass("disabled"),
2729                            d.viewport.unbind(
2730                                "MSPointerCancel pointercancel",
2731                                P
2732                            ),
2733                            d.viewport.unbind(
2734                                "touchmove MSPointerMove pointermove",
2735                                Q
2736                            ),
2737                            d.viewport.unbind(
2738                                "touchend MSPointerUp pointerup",
2739                                R
2740                            ),
2741                            d.viewport.get(0).releasePointerCapture &&
2742                                d.viewport
2743                                    .get(0)
2744                                    .releasePointerCapture(d.pointerId);
2745                    },
2746                    Q = function (a) {
2747                        var b = a.originalEvent,
2748                            c =
2749                                "undefined" != typeof b.changedTouches
2750                                    ? b.changedTouches
2751                                    : [b],
2752                            e = Math.abs(c[0].pageX - d.touch.start.x),
2753                            f = Math.abs(c[0].pageY - d.touch.start.y),
2754                            g = 0,
2755                            h = 0;
2756                        3 * e > f && d.settings.preventDefaultSwipeX
2757                            ? a.preventDefault()
2758                            : 3 * f > e &&
2759                              d.settings.preventDefaultSwipeY &&
2760                              a.preventDefault(),
2761                            "fade" !== d.settings.mode &&
2762                                d.settings.oneToOneTouch &&
2763                                ("horizontal" === d.settings.mode
2764                                    ? ((h = c[0].pageX - d.touch.start.x),
2765                                      (g = d.touch.originalPos.left + h))
2766                                    : ((h = c[0].pageY - d.touch.start.y),
2767                                      (g = d.touch.originalPos.top + h)),
2768                                t(g, "reset", 0));
2769                    },
2770                    R = function (a) {
2771                        d.viewport.unbind(
2772                            "touchmove MSPointerMove pointermove",
2773                            Q
2774                        ),
2775                            d.controls.el.removeClass("disabled");
2776                        var b = a.originalEvent,
2777                            c =
2778                                "undefined" != typeof b.changedTouches
2779                                    ? b.changedTouches
2780                                    : [b],
2781                            f = 0,
2782                            g = 0;
2783                        (d.touch.end.x = c[0].pageX),
2784                            (d.touch.end.y = c[0].pageY),
2785                            "fade" === d.settings.mode
2786                                ? ((g = Math.abs(
2787                                      d.touch.start.x - d.touch.end.x
2788                                  )),
2789                                  g >= d.settings.swipeThreshold &&
2790                                      (d.touch.start.x > d.touch.end.x
2791                                          ? e.goToNextSlide()
2792                                          : e.goToPrevSlide(),
2793                                      e.stopAuto()))
2794                                : ("horizontal" === d.settings.mode
2795                                      ? ((g = d.touch.end.x - d.touch.start.x),
2796                                        (f = d.touch.originalPos.left))
2797                                      : ((g = d.touch.end.y - d.touch.start.y),
2798                                        (f = d.touch.originalPos.top)),
2799                                  !d.settings.infiniteLoop &&
2800                                  ((0 === d.active.index && g > 0) ||
2801                                      (d.active.last && 0 > g))
2802                                      ? t(f, "reset", 200)
2803                                      : Math.abs(g) >= d.settings.swipeThreshold
2804                                      ? (0 > g
2805                                            ? e.goToNextSlide()
2806                                            : e.goToPrevSlide(),
2807                                        e.stopAuto())
2808                                      : t(f, "reset", 200)),
2809                            d.viewport.unbind(
2810                                "touchend MSPointerUp pointerup",
2811                                R
2812                            ),
2813                            d.viewport.get(0).releasePointerCapture &&
2814                                d.viewport
2815                                    .get(0)
2816                                    .releasePointerCapture(d.pointerId);
2817                    },
2818                    S = function (b) {
2819                        if (d.initialized)
2820                            if (d.working) window.setTimeout(S, 10);
2821                            else {
2822                                var c = a(window).width(),
2823                                    h = a(window).height();
2824                                (f !== c || g !== h) &&
2825                                    ((f = c),
2826                                    (g = h),
2827                                    e.redrawSlider(),
2828                                    d.settings.onSliderResize.call(
2829                                        e,
2830                                        d.active.index
2831                                    ));
2832                            }
2833                    },
2834                    T = function (a) {
2835                        var b = p();
2836                        d.settings.ariaHidden &&
2837                            !d.settings.ticker &&
2838                            (d.children.attr("aria-hidden", "true"),
2839                            d.children
2840                                .slice(a, a + b)
2841                                .attr("aria-hidden", "false"));
2842                    },
2843                    U = function (a) {
2844                        return 0 > a
2845                            ? d.settings.infiniteLoop
2846                                ? q() - 1
2847                                : d.active.index
2848                            : a >= q()
2849                            ? d.settings.infiniteLoop
2850                                ? 0
2851                                : d.active.index
2852                            : a;
2853                    };
2854                return (
2855                    (e.goToSlide = function (b, c) {
2856                        var f,
2857                            g,
2858                            h,
2859                            i,
2860                            j = !0,
2861                            k = 0,
2862                            l = {
2863                                left: 0,
2864                                top: 0,
2865                            },
2866                            n = null;
2867                        if (
2868                            ((d.oldIndex = d.active.index),
2869                            (d.active.index = U(b)),
2870                            !d.working && d.active.index !== d.oldIndex)
2871                        ) {
2872                            if (
2873                                ((d.working = !0),
2874                                (j = d.settings.onSlideBefore.call(
2875                                    e,
2876                                    d.children.eq(d.active.index),
2877                                    d.oldIndex,
2878                                    d.active.index
2879                                )),
2880                                "undefined" != typeof j && !j)
2881                            )
2882                                return (
2883                                    (d.active.index = d.oldIndex),
2884                                    void (d.working = !1)
2885                                );
2886                            "next" === c
2887                                ? d.settings.onSlideNext.call(
2888                                      e,
2889                                      d.children.eq(d.active.index),
2890                                      d.oldIndex,
2891                                      d.active.index
2892                                  ) || (j = !1)
2893                                : "prev" === c &&
2894                                  (d.settings.onSlidePrev.call(
2895                                      e,
2896                                      d.children.eq(d.active.index),
2897                                      d.oldIndex,
2898                                      d.active.index
2899                                  ) ||
2900                                      (j = !1)),
2901                                (d.active.last = d.active.index >= q() - 1),
2902                                (d.settings.pager || d.settings.pagerCustom) &&
2903                                    E(d.active.index),
2904                                d.settings.controls && H(),
2905                                "fade" === d.settings.mode
2906                                    ? (d.settings.adaptiveHeight &&
2907                                          d.viewport.height() !== m() &&
2908                                          d.viewport.animate(
2909                                              {
2910                                                  height: m(),
2911                                              },
2912                                              d.settings.adaptiveHeightSpeed
2913                                          ),
2914                                      d.children
2915                                          .filter(":visible")
2916                                          .fadeOut(d.settings.speed)
2917                                          .css({
2918                                              zIndex: 0,
2919                                          }),
2920                                      d.children
2921                                          .eq(d.active.index)
2922                                          .css(
2923                                              "zIndex",
2924                                              d.settings.slideZIndex + 1
2925                                          )
2926                                          .fadeIn(
2927                                              d.settings.speed,
2928                                              function () {
2929                                                  a(this).css(
2930                                                      "zIndex",
2931                                                      d.settings.slideZIndex
2932                                                  ),
2933                                                      F();
2934                                              }
2935                                          ))
2936                                    : (d.settings.adaptiveHeight &&
2937                                          d.viewport.height() !== m() &&
2938                                          d.viewport.animate(
2939                                              {
2940                                                  height: m(),
2941                                              },
2942                                              d.settings.adaptiveHeightSpeed
2943                                          ),
2944                                      !d.settings.infiniteLoop &&
2945                                      d.carousel &&
2946                                      d.active.last
2947                                          ? "horizontal" === d.settings.mode
2948                                              ? ((n = d.children.eq(
2949                                                    d.children.length - 1
2950                                                )),
2951                                                (l = n.position()),
2952                                                (k =
2953                                                    d.viewport.width() -
2954                                                    n.outerWidth()))
2955                                              : ((f =
2956                                                    d.children.length -
2957                                                    d.settings.minSlides),
2958                                                (l = d.children
2959                                                    .eq(f)
2960                                                    .position()))
2961                                          : d.carousel &&
2962                                            d.active.last &&
2963                                            "prev" === c
2964                                          ? ((g =
2965                                                1 === d.settings.moveSlides
2966                                                    ? d.settings.maxSlides - r()
2967                                                    : (q() - 1) * r() -
2968                                                      (d.children.length -
2969                                                          d.settings
2970                                                              .maxSlides)),
2971                                            (n = e.children(".bx-clone").eq(g)),
2972                                            (l = n.position()))
2973                                          : "next" === c && 0 === d.active.index
2974                                          ? ((l = e
2975                                                .find("> .bx-clone")
2976                                                .eq(d.settings.maxSlides)
2977                                                .position()),
2978                                            (d.active.last = !1))
2979                                          : b >= 0 &&
2980                                            ((i = b * parseInt(r())),
2981                                            (l = d.children.eq(i).position())),
2982                                      "undefined" != typeof l
2983                                          ? ((h =
2984                                                "horizontal" === d.settings.mode
2985                                                    ? -(l.left - k)
2986                                                    : -l.top),
2987                                            t(h, "slide", d.settings.speed))
2988                                          : (d.working = !1)),
2989                                d.settings.ariaHidden &&
2990                                    T(d.active.index * r());
2991                        }
2992                    }),
2993                    (e.goToNextSlide = function () {
2994                        if (d.settings.infiniteLoop || !d.active.last) {
2995                            var a = parseInt(d.active.index) + 1;
2996                            e.goToSlide(a, "next");
2997                        }
2998                    }),
2999                    (e.goToPrevSlide = function () {
3000                        if (d.settings.infiniteLoop || 0 !== d.active.index) {
3001                            var a = parseInt(d.active.index) - 1;
3002                            e.goToSlide(a, "prev");
3003                        }
3004                    }),
3005                    (e.startAuto = function (a) {
3006                        d.interval ||
3007                            ((d.interval = setInterval(function () {
3008                                "next" === d.settings.autoDirection
3009                                
3009    ? e.goToNextSlide()
3010                                    : e.goToPrevSlide();
3011                            }, d.settings.pause)),
3012                            d.settings.autoControls && a !== !0 && G("stop"));
3013                    }),
3014                    (e.stopAuto = function (a) {
3015                        d.interval &&
3016                            (clearInterval(d.interval),
3017                            (d.interval = null),
3018                            d.settings.autoControls && a !== !0 && G("start"));
3019                    }),
3020                    (e.getCurrentSlide = function () {
3021                        return d.active.index;
3022                    }),
3023                    (e.getCurrentSlideElement = function () {
3024                        return d.children.eq(d.active.index);
3025                    }),
3026                    (e.getSlideElement = function (a) {
3027                        return d.children.eq(a);
3028                    }),
3029                    (e.getSlideCount = function () {
3030                        return d.children.length;
3031                    }),
3032                    (e.isWorking = function () {
3033                        return d.working;
3034                    }),
3035                    (e.redrawSlider = function () {
3036                        d.children.add(e.find(".bx-clone")).outerWidth(o()),
3037                            d.viewport.css("height", m()),
3038                            d.settings.ticker || s(),
3039                            d.active.last && (d.active.index = q() - 1),
3040                            d.active.index >= q() && (d.active.last = !0),
3041                            d.settings.pager &&
3042                                !d.settings.pagerCustom &&
3043                                (u(), E(d.active.index)),
3044                            d.settings.ariaHidden && T(d.active.index * r());
3045                    }),
3046                    (e.destroySlider = function () {
3047                        d.initialized &&
3048                            ((d.initialized = !1),
3049                            a(".bx-clone", this).remove(),
3050                            d.children.each(function () {
3051                                void 0 !== a(this).data("origStyle")
3052                                    ? a(this).attr(
3053                                          "style",
3054                                          a(this).data("origStyle")
3055                                      )
3056                                    : a(this).removeAttr("style");
3057                            }),
3058                            void 0 !== a(this).data("origStyle")
3059                                ? this.attr("style", a(this).data("origStyle"))
3060                                : a(this).removeAttr("style"),
3061                            a(this).unwrap().unwrap(),
3062                            d.controls.el && d.controls.el.remove(),
3063                            d.controls.next && d.controls.next.remove(),
3064                            d.controls.prev && d.controls.prev.remove(),
3065                            d.pagerEl &&
3066                                d.settings.controls &&
3067                                !d.settings.pagerCustom &&
3068                                d.pagerEl.remove(),
3069                            a(".bx-caption", this).remove(),
3070                            d.controls.autoEl && d.controls.autoEl.remove(),
3071                            clearInterval(d.interval),
3072                            d.settings.responsive &&
3073                                a(window).unbind("resize", S),
3074                            d.settings.keyboardEnabled &&
3075                                a(document).unbind("keydown", M),
3076                            a(this).removeData("bxSlider"));
3077                    }),
3078                    (e.reloadSlider = function (b) {
3079                        void 0 !== b && (c = b),
3080                            e.destroySlider(),
3081                            h(),
3082                            a(e).data("bxSlider", this);
3083                    }),
3084                    h(),
3085                    a(e).data("bxSlider", this),
3086                    this
3087                );
3088            }
3089        };
3090    })(jQuery);
3091
3092    /*! fancyBox v2.1.5 fancyapps.com | fancyapps.com/fancybox/#license */
3093    !(function (e, t, n, i) {
3094        var o = n("html"),
3095            a = n(e),
3096            r = n(t),
3097            l = (n.fancybox = function () {
3098                l.open.apply(this, arguments);
3099            }),
3100            s = navigator.userAgent.match(/msie/i),
3101            c = null,
3102            d = t.createTouch !== i,
3103            p = function (e) {
3104                return e && e.hasOwnProperty && e instanceof n;
3105            },
3106            h = function (e) {
3107                return e && "string" === n.type(e);
3108            },
3109            f = function (e) {
3110                return h(e) && 0 < e.indexOf("%");
3111            },
3112            u = function (e, t) {
3113                var n = parseInt(e, 10) || 0;
3114                return (
3115                    t && f(e) && (n *= l.getViewport()[t] / 100), Math.ceil(n)
3116                );
3117            },
3118            g = function (e, t) {
3119                return u(e, t) + "px";
3120            };
3121        n.extend(l, {
3122            version: "2.1.5",
3123            defaults: {
3124                padding: 15,
3125                margin: 20,
3126                width: 800,
3127                height: 600,
3128                minWidth: 100,
3129                minHeight: 100,
3130                maxWidth: 9999,
3131                maxHeight: 9999,
3132                pixelRatio: 1,
3133                autoSize: !0,
3134                autoHeight: !1,
3135                autoWidth: !1,
3136                autoResize: !0,
3137                autoCenter: !d,
3138                fitToView: !0,
3139                aspectRatio: !1,
3140                topRatio: 0.5,
3141                leftRatio: 0.5,
3142                scrolling: "auto",
3143                wrapCSS: "",
3144                arrows: !0,
3145                closeBtn: !0,
3146                closeClick: !1,
3147                nextClick: !1,
3148                mouseWheel: !0,
3149                autoPlay: !1,
3150                playSpeed: 3e3,
3151                preload: 3,
3152                modal: !1,
3153                loop: !0,
3154                ajax: {
3155                    dataType: "html",
3156                    headers: {
3157                        "X-fancyBox": !0,
3158                    },
3159                },
3160                iframe: {
3161                    scrolling: "auto",
3162                    preload: !0,
3163                },
3164                swf: {
3165                    wmode: "transparent",
3166                    allowfullscreen: "true",
3167                    allowscriptaccess: "always",
3168                },
3169                keys: {
3170                    next: {
3171                        13: "left",
3172                        34: "up",
3173                        39: "left",
3174                        40: "up",
3175                    },
3176                    prev: {
3177                        8: "right",
3178                        33: "down",
3179                        37: "right",
3180                        38: "down",
3181                    },
3182                    close: [27],
3183                    play: [32],
3184                    toggle: [70],
3185                },
3186                direction: {
3187                    next: "left",
3188                    prev: "right",
3189                },
3190                scrollOutside: !0,
3191                index: 0,
3192                type: null,
3193                href: null,
3194                content: null,
3195                title: null,
3196                tpl: {
3197                    wrap: '<div class="fancybox-wrap" tabIndex="-1"><div class="fancybox-skin"><div class="fancybox-outer"><div class="fancybox-inner"></div></div></div></div>',
3198                    image: '<img class="fancybox-image" src="{href}" alt="" />',
3199                    iframe:
3200                        '<iframe id="fancybox-frame{rnd}" name="fancybox-frame{rnd}" class="fancybox-iframe" frameborder="0" vspace="0" hspace="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen' +
3201                        (s ? ' allowtransparency="true"' : "") +
3202                        "></iframe>",
3203                    error: '<p class="fancybox-error">The requested content cannot be loaded.<br/>Please try again later.</p>',
3204                    closeBtn:
3205                        '<a title="Close" class="fancybox-item fancybox-close" href="javascript:;"></a>',
3206                    next: '<a title="Next" class="fancybox-nav fancybox-next" href="javascript:;"><span></span></a>',
3207                    prev: '<a title="Previous" class="fancybox-nav fancybox-prev" href="javascript:;"><span></span></a>',
3208                },
3209                openEffect: "fade",
3210                openSpeed: 250,
3211                openEasing: "swing",
3212                openOpacity: !0,
3213                openMethod: "zoomIn",
3214                closeEffect: "fade",
3215                closeSpeed: 250,
3216                closeEasing: "swing",
3217                closeOpacity: !0,
3218                closeMethod: "zoomOut",
3219                nextEffect: "elastic",
3220                nextSpeed: 250,
3221                nextEasing: "swing",
3222                nextMethod: "changeIn",
3223                prevEffect: "elastic",
3224                prevSpeed: 250,
3225                prevEasing: "swing",
3226                prevMethod: "changeOut",
3227                helpers: {
3228                    overlay: !0,
3229                    title: !0,
3230                },
3231                onCancel: n.noop,
3232                beforeLoad: n.noop,
3233                afterLoad: n.noop,
3234                beforeShow: n.noop,
3235                afterShow: n.noop,
3236                beforeChange: n.noop,
3237                beforeClose: n.noop,
3238                afterClose: n.noop,
3239            },
3240            group: {},
3241            opts: {},
3242            previous: null,
3243            coming: null,
3244            current: null,
3245            isActive: !1,
3246            isOpen: !1,
3247            isOpened: !1,
3248            wrap: null,
3249            skin: null,
3250            outer: null,
3251            inner: null,
3252            player: {
3253                timer: null,
3254                isActive: !1,
3255            },
3256            ajaxLoad: null,
3257            imgPreload: null,
3258            transitions: {},
3259            helpers: {},
3260            open: function (e, t) {
3261                return e && (n.isPlainObject(t) || (t = {}), !1 !== l.close(!0))
3262                    ? (n.isArray(e) || (e = p(e) ? n(e).get() : [e]),
3263                      n.each(e, function (o, a) {
3264                          var r,
3265                              s,
3266                              c,
3267                              d,
3268                              f,
3269                              u = {};
3270                          "object" === n.type(a) &&
3271                              (a.nodeType && (a = n(a)),
3272                              p(a)
3273                                  ? ((u = {
3274                                        href:
3275                                            a.data("fancybox-href") ||
3276                                            a.attr("href"),
3277                                        title: n("<div/>")
3278                                            .text(
3279                                                a.data("fancybox-title") ||
3280                                                    a.attr("title")
3281                                            )
3282                                            .html(),
3283                                        isDom: !0,
3284                                        element: a,
3285                                    }),
3286                                    n.metadata && n.extend(!0, u, a.metadata()))
3287                                  : (u = a)),
3288                              (r = t.href || u.href || (h(a) ? a : null)),
3289                              (s = t.title !== i ? t.title : u.title || ""),
3290                              (d = (c = t.content || u.content)
3291                                  ? "html"
3292                                  : t.type || u.type),
3293                              !d &&
3294                                  u.isDom &&
3295                                  ((d = a.data("fancybox-type")),
3296                                  d ||
3297                                      (d = (d = a
3298                                          .prop("class")
3299                                          .match(/fancybox\.(\w+)/))
3300                                          ? d[1]
3301                                          : null)),
3302                              h(r) &&
3303                                  (d ||
3304                                      (l.isImage(r)
3305                                          ? (d = "image")
3306                                          : l.isSWF(r)
3307                                          ? (d = "swf")
3308                                          : "#" === r.charAt(0)
3309                                          ? (d = "inline")
3310                                          : h(a) && ((d = "html"), (c = a))),
3311                                  "ajax" === d &&
3312                                      ((f = r.split(/\s+/, 2)),
3313                                      (r = f.shift()),
3314                                      (f = f.shift()))),
3315                              c ||
3316                                  ("inline" === d
3317                                      ? r
3318                                          ? (c = n(
3319                                                h(r)
3320                                                    ? r.replace(
3321                                                          /.*(?=#[^\s]+$)/,
3322                                                          ""
3323                                                      )
3324                                                    : r
3325                                            ))
3326                                          : u.isDom && (c = a)
3327                                      : "html" === d
3328                                      ? (c = r)
3329                                      : d ||
3330                                        r ||
3331                                        !u.isDom ||
3332                                        ((d = "inline"), (c = a))),
3333                              n.extend(u, {
3334                                  href: r,
3335                                  type: d,
3336                                  content: c,
3337                                  title: s,
3338                                  selector: f,
3339                              }),
3340                              (e[o] = u);
3341                      }),
3342                      (l.opts = n.extend(!0, {}, l.defaults, t)),
3343                      t.keys !== i &&
3344                          (l.opts.keys = t.keys
3345                              ? n.extend({}, l.defaults.keys, t.keys)
3346                              : !1),
3347                      (l.group = e),
3348                      l._start(l.opts.index))
3349                    : void 0;
3350            },
3351            cancel: function () {
3352                var e = l.coming;
3353                (e && !1 === l.trigger("onCancel")) ||
3354                    (l.hideLoading(),
3355                    e &&
3356                        (l.ajaxLoad && l.ajaxLoad.abort(),
3357                        (l.ajaxLoad = null),
3358                        l.imgPreload &&
3359                            (l.imgPreload.onload = l.imgPreload.onerror = null),
3360                        e.wrap &&
3361                            e.wrap.stop(!0, !0).trigger("onReset").remove(),
3362                        (l.coming = null),
3363                        l.current || l._afterZoomOut(e)));
3364            },
3365            close: function (e) {
3366                l.cancel(),
3367                    !1 !== l.trigger("beforeClose") &&
3368                        (l.unbindEvents(),
3369                        l.isActive &&
3370                            (l.isOpen && !0 !== e
3371                                ? ((l.isOpen = l.isOpened = !1),
3372                                  (l.isClosing = !0),
3373                                  n(".fancybox-item, .fancybox-nav").remove(),
3374                                  l.wrap
3375                                      .stop(!0, !0)
3376                                      .removeClass("fancybox-opened"),
3377                                  l.transitions[l.current.closeMethod]())
3378                                : (n(".fancybox-wrap")
3379                                      .stop(!0)
3380                                      .trigger("onReset")
3381                                      .remove(),
3382                                  l._afterZoomOut())));
3383            },
3384            play: function (e) {
3385                var t = function () {
3386                        clearTimeout(l.player.timer);
3387                    },
3388                    n = function () {
3389                        t(),
3390                            l.current &&
3391                                l.player.isActive &&
3392                                (l.player.timer = setTimeout(
3393                                    l.next,
3394                                    l.current.playSpeed
3395                                ));
3396                    },
3397                    i = function () {
3398                        t(),
3399                            r.unbind(".player"),
3400                            (l.player.isActive = !1),
3401                            l.trigger("onPlayEnd");
3402                    };
3403                !0 === e || (!l.player.isActive && !1 !== e)
3404                    ? l.current &&
3405                      (l.current.loop ||
3406                          l.current.index < l.group.length - 1) &&
3407                      ((l.player.isActive = !0),
3408                      r.bind({
3409                          "onCancel.player beforeClose.player": i,
3410                          "onUpdate.player": n,
3411                          "beforeLoad.player": t,
3412                      }),
3413                      n(),
3414                      l.trigger("onPlayStart"))
3415                    : i();
3416            },
3417            next: function (e) {
3418                var t = l.current;
3419                t &&
3420                    (h(e) || (e = t.direction.next),
3421                    l.jumpto(t.index + 1, e, "next"));
3422            },
3423            prev: function (e) {
3424                var t = l.current;
3425                t &&
3426                    (h(e) || (e = t.direction.prev),
3427                    l.jumpto(t.index - 1, e, "prev"));
3428            },
3429            jumpto: function (e, t, n) {
3430                var o = l.current;
3431                o &&
3432                    ((e = u(e)),
3433                    (l.direction =
3434                        t || o.direction[e >= o.index ? "next" : "prev"]),
3435                    (l.router = n || "jumpto"),
3436                    o.loop &&
3437                        (0 > e && (e = o.group.length + (e % o.group.length)),
3438                        (e %= o.group.length)),
3439                    o.group[e] !== i && (l.cancel(), l._start(e)));
3440            },
3441            reposition: function (e, t) {
3442                var i,
3443                    o = l.current,
3444                    a = o ? o.wrap : null;
3445                a &&
3446                    ((i = l._getPosition(t)),
3447                    e && "scroll" === e.type
3448                        ? (delete i.position, a.stop(!0, !0).animate(i, 200))
3449                        : (a.css(i), (o.pos = n.extend({}, o.dim, i))));
3450            },
3451            update: function (e) {
3452                var t = e && e.originalEvent && e.originalEvent.type,
3453                    n = !t || "orientationchange" === t;
3454                n && (clearTimeout(c), (c = null)),
3455                    l.isOpen &&
3456                        !c &&
3457                        (c = setTimeout(
3458                            function () {
3459                                var i = l.current;
3460                                i &&
3461                                    !l.isClosing &&
3462                                    (l.wrap.removeClass("fancybox-tmp"),
3463                                    (n ||
3464                                        "load" === t ||
3465                                        ("resize" === t && i.autoResize)) &&
3466                                        l._setDimension(),
3467                                    ("scroll" === t && i.canShrink) ||
3468                                        l.reposition(e),
3469                                    l.trigger("onUpdate"),
3470                                    (c = null));
3471                            },
3472                            n && !d ? 0 : 300
3473                        ));
3474            },
3475            toggle: function (e) {
3476                l.isOpen &&
3477                    ((l.current.fitToView =
3478                        "boolean" === n.type(e) ? e : !l.current.fitToView),
3479                    d &&
3480                        (l.wrap.removeAttr("style").addClass("fancybox-tmp"),
3481                        l.trigger("onUpdate")),
3482                    l.update());
3483            },
3484            hideLoading: function () {
3485                r.unbind(".loading"), n("#fancybox-loading").remove();
3486            },
3487            showLoading: function () {
3488                var e, t;
3489                l.hideLoading(),
3490                    (e = n('<div id="fancybox-loading"><div></div></div>')
3491                        .click(l.cancel)
3492                        .appendTo("body")),
3493                    r.bind("keydown.loading", function (e) {
3494                        27 === (e.which || e.keyCode) &&
3495                            (e.preventDefault(), l.cancel());
3496                    }),
3497                    l.defaults.fixed ||
3498                        ((t = l.getViewport()),
3499                        e.css({
3500                            position: "absolute",
3501                            top: 0.5 * t.h + t.y,
3502                            left: 0.5 * t.w + t.x,
3503                        })),
3504                    l.trigger("onLoading");
3505            },
3506            getViewport: function () {
3507                var t = (l.current && l.current.locked) || !1,
3508                    n = {
3509                        x: a.scrollLeft(),
3510                        y: a.scrollTop(),
3511                    };
3512                return (
3513                    t && t.length
3514                        ? ((n.w = t[0].clientWidth), (n.h = t[0].clientHeight))
3515                        : ((n.w = d && e.innerWidth ? e.innerWidth : a.width()),
3516                          (n.h =
3517                              d && e.innerHeight ? e.innerHeight : a.height())),
3518                    n
3519                );
3520            },
3521            unbindEvents: function () {
3522                l.wrap && p(l.wrap) && l.wrap.unbind(".fb"),
3523                    r.unbind(".fb"),
3524                    a.unbind(".fb");
3525            },
3526            bindEvents: function () {
3527                var e,
3528                    t = l.current;
3529                t &&
3530                    (a.bind(
3531                        "orientationchange.fb" +
3532                            (d ? "" : " resize.fb") +
3533                            (t.autoCenter && !t.locked ? " scroll.fb" : ""),
3534                        l.update
3535                    ),
3536                    (e = t.keys) &&
3537                        r.bind("keydown.fb", function (o) {
3538                            var a = o.which || o.keyCode,
3539                                r = o.target || o.srcElement;
3540                            return 27 === a && l.coming
3541                                ? !1
3542                                : void (
3543                                      o.ctrlKey ||
3544                                      o.altKey ||
3545                                      o.shiftKey ||
3546                                      o.metaKey ||
3547                                      (r &&
3548                                          (r.type ||
3549                                              n(r).is("[contenteditable]"))) ||
3550                                      n.each(e, function (e, r) {
3551                                          return 1 < t.group.length &&
3552                                              r[a] !== i
3553                                              ? (l[e](r[a]),
3554                                                o.preventDefault(),
3555                                                !1)
3556                                              : -1 < n.inArray(a, r)
3557                                              ? (l[e](), o.preventDefault(), !1)
3558                                              : void 0;
3559                                      })
3560                                  );
3561                        }),
3562                    n.fn.mousewheel &&
3563                        t.mouseWheel &&
3564                        l.wrap.bind("mousewheel.fb", function (e, i, o, a) {
3565                            for (
3566                                var r = n(e.target || null), s = !1;
3567                                r.length &&
3568                                !(
3569                                    s ||
3570                                    r.is(".fancybox-skin") ||
3571                                    r.is(".fancybox-wrap")
3572                                );
3573
3574                            )
3575                                (s =
3576                                    r[0] &&
3577                                    !(
3578                                        r[0].style.overflow &&
3579                                        "hidden" === r[0].style.overflow
3580                                    ) &&
3581                                    ((r[0].clientWidth &&
3582                                        r[0].scrollWidth > r[0].clientWidth) ||
3583                                        (r[0].clientHeight &&
3584                                            r[0].scrollHeight >
3585                                                r[0].clientHeight))),
3586                                    (r = n(r).parent());
3587                            0 !== i &&
3588                                !s &&
3589                                1 < l.group.length &&
3590                                !t.canShrink &&
3591                                (a > 0 || o > 0
3592                                    ? l.prev(a > 0 ? "down" : "left")
3593                                    : (0 > a || 0 > o) &&
3594                                      l.next(0 > a ? "up" : "right"),
3595                                e.preventDefault());
3596                        }));
3597            },
3598            trigger: function (e, t) {
3599                var i,
3600                    o = t || l.coming || l.current;
3601                if (o) {
3602                    if (
3603                        (n.isFunction(o[e]) &&
3604                            (i = o[e].apply(
3605                                o,
3606                                Array.prototype.slice.call(arguments, 1)
3607                            )),
3608                        !1 === i)
3609                    )
3610                        return !1;
3611                    o.helpers &&
3612                        n.each(o.helpers, function (t, i) {
3613                            i &&
3614                                l.helpers[t] &&
3615                                n.isFunction(l.helpers[t][e]) &&
3616                                l.helpers[t][e](
3617                                    n.extend(!0, {}, l.helpers[t].defaults, i),
3618                                    o
3619                                );
3620                        });
3621                }
3622                r.trigger(e);
3623            },
3624            isImage: function (e) {
3625                return (
3626                    h(e) &&
3627                    e.match(
3628                        /(^data:image\/.*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg)((\?|#).*)?$)/i
3629                    )
3630                );
3631            },
3632            isSWF: function (e) {
3633                return h(e) && e.match(/\.(swf)((\?|#).*)?$/i);
3634            },
3635            _start: function (e) {
3636                var t,
3637                    i,
3638                    o = {};
3639                if (((e = u(e)), (t = l.group[e] || null), !t)) return !1;
3640                if (
3641                    ((o = n.extend(!0, {}, l.opts, t)),
3642                    (t = o.margin),
3643                    (i = o.padding),
3644                    "number" === n.type(t) && (o.margin = [t, t, t, t]),
3645                    "number" === n.type(i) && (o.padding = [i, i, i, i]),
3646                    o.modal &&
3647                        n.extend(!0, o, {
3648                            closeBtn: !1,
3649                            closeClick: !1,
3650                            nextClick: !1,
3651                            arrows: !1,
3652                            mouseWheel: !1,
3653                            keys: null,
3654                            helpers: {
3655                                overlay: {
3656                                    closeClick: !1,
3657                                },
3658                            },
3659                        }),
3660                    o.autoSize && (o.autoWidth = o.autoHeight = !0),
3661                    "auto" === o.width && (o.autoWidth = !0),
3662                    "auto" === o.height && (o.autoHeight = !0),
3663                    (o.group = l.group),
3664                    (o.index = e),
3665                    (l.coming = o),
3666                    !1 === l.trigger("beforeLoad"))
3667                )
3668                    l.coming = null;
3669                else {
3670                    if (((i = o.type), (t = o.href), !i))
3671                        return (
3672                            (l.coming = null),
3673                            l.current && l.router && "jumpto" !== l.router
3674                                ? ((l.current.index = e),
3675                                  l[l.router](l.direction))
3676                                : !1
3677                        );
3678                    if (
3679                        ((l.isActive = !0),
3680                        ("image" === i || "swf" === i) &&
3681                            ((o.autoHeight = o.autoWidth = !1),
3682                            (o.scrolling = "visible")),
3683                        "image" === i && (o.aspectRatio = !0),
3684                        "iframe" === i && d && (o.scrolling = "scroll"),
3685                        (o.wrap = n(o.tpl.wrap)
3686                            .addClass(
3687                                "fancybox-" +
3688                                    (d ? "mobile" : "desktop") +
3689                                    " fancybox-type-" +
3690                                    i +
3691                                    " fancybox-tmp " +
3692                                    o.wrapCSS
3693                            )
3694                            .appendTo(o.parent || "body")),
3695                        n.extend(o, {
3696                            skin: n(".fancybox-skin", o.wrap),
3697                            outer: n(".fancybox-outer", o.wrap),
3698                            inner: n(".fancybox-inner", o.wrap),
3699                        }),
3700                        n.each(
3701                            ["Top", "Right", "Bottom", "Left"],
3702                            function (e, t) {
3703                                o.skin.css("padding" + t, g(o.padding[e]));
3704                            }
3705                        ),
3706                        l.trigger("onReady"),
3707                        "inline" === i || "html" === i)
3708                    ) {
3709                        if (!o.content || !o.content.length)
3710                            return l._error("content");
3711                    } else if (!t) return l._error("href");
3712                    "image" === i
3713                        ? l._loadImage()
3714                        : "ajax" === i
3715                        ? l._loadAjax()
3716                        : "iframe" === i
3717                        ? l._loadIframe()
3718                        : l._afterLoad();
3719                }
3720            },
3721            _error: function (e) {
3722                n.extend(l.coming, {
3723                    type: "html",
3724                    autoWidth: !0,
3725                    autoHeight: !0,
3726                    minWidth: 0,
3727                    minHeight: 0,
3728                    scrolling: "no",
3729                    hasError: e,
3730                    content: l.coming.tpl.error,
3731                }),
3732                    l._afterLoad();
3733            },
3734            _loadImage: function () {
3735                var e = (l.imgPreload = new Image());
3736                (e.onload = function () {
3737                    (this.onload = this.onerror = null),
3738                        (l.coming.width = this.width / l.opts.pixelRatio),
3739                        (l.coming.height = this.height / l.opts.pixelRatio),
3740                        l._afterLoad();
3741                }),
3742                    (e.onerror = function () {
3743                        (this.onload = this.onerror = null), l._error("image");
3744                    }),
3745                    (e.src = l.coming.href),
3746                    !0 !== e.complete && l.showLoading();
3747            },
3748            _loadAjax: function () {
3749                var e = l.coming;
3750                l.showLoading(),
3751                    (l.ajaxLoad = n.ajax(
3752                        n.extend({}, e.ajax, {
3753                            url: e.href,
3754                            error: function (e, t) {
3755                                l.coming && "abort" !== t
3756                                    ? l._error("ajax", e)
3757                                    : l.hideLoading();
3758                            },
3759                            success: function (t, n) {
3760                                "success" === n &&
3761                                    ((e.content = t), l._afterLoad());
3762                            },
3763                        })
3764                    ));
3765            },
3766            _loadIframe: function () {
3767                var e = l.coming,
3768                    t = n(
3769                        e.tpl.iframe.replace(/\{rnd\}/g, new Date().getTime())
3770                    )
3771                        .attr("scrolling", d ? "auto" : e.iframe.scrolling)
3772                        .attr("src", e.href);
3773                n(e.wrap).bind("onReset", function () {
3774                    try {
3775                        n(this)
3776                            .find("iframe")
3777                            .hide()
3778                            .attr("src", "//about:blank")
3779                            .end()
3780                            .empty();
3781                    } catch (e) {}
3782                }),
3783                    e.iframe.preload &&
3784                        (l.showLoading(),
3785                        t.one("load", function () {
3786                            n(this).data("ready", 1),
3787                                d || n(this).bind("load.fb", l.update),
3788                                n(this)
3789                                    .parents(".fancybox-wrap")
3790                                    .width("100%")
3791                                    .removeClass("fancybox-tmp")
3792                                    .show(),
3793                                l._afterLoad();
3794                        })),
3795                    (e.content = t.appendTo(e.inner)),
3796                    e.iframe.preload || l._afterLoad();
3797            },
3798            _preloadImages: function () {
3799                var e,
3800                    t,
3801                    n = l.group,
3802                    i = l.current,
3803                    o = n.length,
3804                    a = i.preload ? Math.min(i.preload, o - 1) : 0;
3805                for (t = 1; a >= t; t += 1)
3806                    (e = n[(i.index + t) % o]),
3807                        "image" === e.type &&
3808                            e.href &&
3809                            (new Image().src = e.href);
3810            },
3811            _afterLoad: function () {
3812                var e,
3813                    t,
3814                    i,
3815                    o,
3816                    a,
3817                    r = l.coming,
3818                    s = l.current;
3819                if ((l.hideLoading(), r && !1 !== l.isActive))
3820                    if (!1 === l.trigger("afterLoad", r, s))
3821                        r.wrap.stop(!0).trigger("onReset").remove(),
3822                            (l.coming = null);
3823                    else {
3824                        switch (
3825                            (s &&
3826                                (l.trigger("beforeChange", s),
3827                                s.wrap
3828                                    .stop(!0)
3829                                    .removeClass("fancybox-opened")
3830                                    .find(".fancybox-item, .fancybox-nav")
3831                                    .remove()),
3832                            l.unbindEvents(),
3833                            (e = r.content),
3834                            (t = r.type),
3835                            (i = r.scrolling),
3836                            n.extend(l, {
3837                                wrap: r.wrap,
3838                                skin: r.skin,
3839                                outer: r.outer,
3840                                inner: r.inner,
3841                                current: r,
3842                                previous: s,
3843                            }),
3844                            (o = r.href),
3845                            t)
3846                        ) {
3847                            case "inline":
3848                            case "ajax":
3849                            case "html":
3850                                r.selector
3851                                    ? (e = n("<div>").html(e).find(r.selector))
3852                                    : p(e) &&
3853                                      (e.data("fancybox-placeholder") ||
3854                                          e.data(
3855                                              "fancybox-placeholder",
3856                                              n(
3857                                                  '<div class="fancybox-placeholder"></div>'
3858                                              )
3859                                                  .insertAfter(e)
3860                                                  .hide()
3861                                          ),
3862                                      (e = e.show().detach()),
3863                                      r.wrap.bind("onReset", function () {
3864                                          n(this).find(e).length &&
3865                                              e
3866                                                  .hide()
3867                                                  .replaceAll(
3868                                                      e.data(
3869                                                          "fancybox-placeholder"
3870                                                      )
3871                                                  )
3872                                                  .data(
3873                                                      "fancybox-placeholder",
3874                                                      !1
3875                                                  );
3876                                      }));
3877                                break;
3878                            case "image":
3879                                e = r.tpl.image.replace(/\{href\}/g, o);
3880                                break;
3881                            case "swf":
3882                                (e =
3883                                    '<object id="fancybox-swf" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="100%"><param name="movie" value="' +
3884                                    o +
3885                                    '"></param>'),
3886                                    (a = ""),
3887                                    n.each(r.swf, function (t, n) {
3888                                        (e +=
3889                                            '<param name="' +
3890                                            t +
3891                                            '" value="' +
3892                                            n +
3893                                            '"></param>'),
3894                                            (a += " " + t + '="' + n + '"');
3895                                    }),
3896                                    (e +=
3897                                        '<embed src="' +
3898                                        o +
3899                                        '" type="application/x-shockwave-flash" width="100%" height="100%"' +
3900                                        a +
3901                                        "></embed></object>");
3902                        }
3903                        (p(e) && e.parent().is(r.inner)) || r.inner.append(e),
3904                            l.trigger("beforeShow"),
3905                            r.inner.css(
3906                                "overflow",
3907                                "yes" === i
3908                                    ? "scroll"
3909                                    : "no" === i
3910                                    ? "hidden"
3911                                    : i
3912                            ),
3913                            l._setDimension(),
3914                            l.reposition(),
3915                            (l.isOpen = !1),
3916                            (l.coming = null),
3917                            l.bindEvents(),
3918                            l.isOpened
3919                                ? s.prevMethod && l.transitions[s.prevMethod]()
3920                                : n(".fancybox-wrap")
3921                                      .not(r.wrap)
3922                                      .stop(!0)
3923                                      .trigger("onReset")
3924                                      .remove(),
3925                            l.transitions[
3926                                l.isOpened ? r.nextMethod : r.openMethod
3927                            ](),
3928                            l._preloadImages();
3929                    }
3930            },
3931            _setDimension: function () {
3932                var e,
3933                    t,
3934                    i,
3935                    o,
3936                    a,
3937                    r,
3938                    s,
3939                    c,
3940                    d,
3941                    p = l.getViewport(),
3942                    h = 0,
3943                    m = !1,
3944                    y = !1,
3945                    m = l.wrap,
3946                    x = l.skin,
3947                    v = l.inner,
3948                    w = l.current,
3949                    y = w.width,
3950                    b = w.height,
3951                    k = w.minWidth,
3952                    C = w.minHeight,
3953                    O = w.maxWidth,
3954                    W = w.maxHeight,
3955                    _ = w.scrolling,
3956                    S = w.scrollOutside ? w.scrollbarWidth : 0,
3957                    T = w.margin,
3958                    E = u(T[1] + T[3]),
3959                    L = u(T[0] + T[2]);
3960                if (
3961                    (m
3962                        .add(x)
3963                        .add(v)
3964                        .width("auto")
3965                        .height("auto")
3966                        .removeClass("fancybox-tmp"),
3967                    (T = u(x.outerWidth(!0) - x.width())),
3968                    (e = u(x.outerHeight(!0) - x.height())),
3969                    (t = E + T),
3970                    (i = L + e),
3971                    (o = f(y) ? ((p.w - t) * u(y)) / 100 : y),
3972                    (a = f(b) ? ((p.h - i) * u(b)) / 100 : b),
3973                    "iframe" === w.type)
3974                ) {
3975                    if (
3976                        ((d = w.content), w.autoHeight && 1 === d.data("ready"))
3977                    )
3978                        try {
3979                            d[0].contentWindow.document.location &&
3980                                (v.width(o).height(9999),
3981                                (r = d.contents().find("body")),
3982                                S && r.css("overflow-x", "hidden"),
3983                                (a = r.outerHeight(!0)));
3984                        } catch (H) {}
3985                } else
3986                    (w.autoWidth || w.autoHeight) &&
3987                        (v.addClass("fancybox-tmp"),
3988                        w.autoWidth || v.width(o),
3989                        w.autoHeight || v.height(a),
3990                        w.autoWidth && (o = v.width()),
3991                        w.autoHeight && (a = v.height()),
3992                        v.removeClass("fancybox-tmp"));
3993                if (
3994                    ((y = u(o)),
3995                    (b = u(a)),
3996                    (c = o / a),
3997                    (k = u(f(k) ? u(k, "w") - t : k)),
3998                    (O = u(f(O) ? u(O, "w") - t : O)),
3999                    (C = u(f(C) ? u(C, "h") - i : C)),
4000                    (W = u(f(W) ? u(W, "h") - i : W)),
4001                    (r = O),
4002                    (s = W),
4003                    w.fitToView &&
4004                        ((O = Math.min(p.w - t, O)),
4005                        (W = Math.min(p.h - i, W))),
4006                    (t = p.w - E),
4007                    (L = p.h - L),
4008                    w.aspectRatio
4009                        ? (y > O && ((y = O), (b = u(y / c))),
4010                          b > W && ((b = W), (y = u(b * c))),
4011                          k > y && ((y = k), (b = u(y / c))),
4012                          C > b && ((b = C), (y = u(b * c))))
4013                        : ((y = Math.max(k, Math.min(y, O))),
4014                          w.autoHeight &&
4015                              "iframe" !== w.type &&
4016                              (v.width(y), (b = v.height())),
4017                          (b = Math.max(C, Math.min(b, W)))),
4018                    w.fitToView)
4019                )
4020                    if (
4021                        (v.width(y).height(b),
4022                        m.width(y + T),
4023                        (p = m.width()),
4024                        (E = m.height()),
4025                        w.aspectRatio)
4026                    )
4027                        for (
4028                            ;
4029                            (p > t || E > L) && y > k && b > C && !(19 < h++);
4030
4031                        )
4032                            (b = Math.max(C, Math.min(W, b - 10))),
4033                                (y = u(b * c)),
4034                                k > y && ((y = k), (b = u(y / c))),
4035                                y > O && ((y = O), (b = u(y / c))),
4036                                v.width(y).height(b),
4037                                m.width(y + T),
4038                                (p = m.width()),
4039                                (E = m.height());
4040                    else
4041                        (y = Math.max(k, Math.min(y, y - (p - t)))),
4042                            (b = Math.max(C, Math.min(b, b - (E - L))));
4043                S && "auto" === _ && a > b && t > y + T + S && (y += S),
4044                    v.width(y).height(b),
4045                    m.width(y + T),
4046                    (p = m.width()),
4047                    (E = m.height()),
4048                    (m = (p > t || E > L) && y > k && b > C),
4049                    (y = w.aspectRatio
4050                        ? r > y && s > b && o > y && a > b
4051                        : (r > y || s > b) && (o > y || a > b)),
4052                    n.extend(w, {
4053                        dim: {
4054                            width: g(p),
4055                            height: g(E),
4056                        },
4057                        origWidth: o,
4058                        origHeight: a,
4059                        canShrink: m,
4060                        canExpand: y,
4061                        wPadding: T,
4062                        hPadding: e,
4063                        wrapSpace: E - x.outerHeight(!0),
4064                        skinSpace: x.height() - b,
4065                    }),
4066                    !d &&
4067                        w.autoHeight &&
4068                        b > C &&
4069                        W > b &&
4070                        !y &&
4071                        v.height("auto");
4072            },
4073            _getPosition: function (e) {
4074                var t = l.current,
4075                    n = l.getViewport(),
4076                    i = t.margin,
4077                    o = l.wrap.width() + i[1] + i[3],
4078                    a = l.wrap.height() + i[0] + i[2],
4079                    i = {
4080                        position: "absolute",
4081                        top: i[0],
4082                        left: i[3],
4083                    };
4084                return (
4085                    t.autoCenter && t.fixed && !e && a <= n.h && o <= n.w
4086                        ? (i.position = "fixed")
4087                        : t.locked || ((i.top += n.y), (i.left += n.x)),
4088                    (i.top = g(
4089                        Math.max(i.top, i.top + (n.h - a) * t.topRatio)
4090                    )),
4091                    (i.left = g(
4092                        Math.max(i.left, i.left + (n.w - o) * t.leftRatio)
4093                    )),
4094                    i
4095                );
4096            },
4097            _afterZoomIn: function () {
4098                var e = l.current;
4099                e &&
4100                    ((l.isOpen = l.isOpened = !0),
4101                    l.wrap
4102                        .css("overflow", "visible")
4103                        .addClass("fancybox-opened"),
4104                    l.update(),
4105                    (e.closeClick || (e.nextClick && 1 < l.group.length)) &&
4106                        l.inner
4107                            .css("cursor", "pointer")
4108                            .bind("click.fb", function (t) {
4109                                n(t.target).is("a") ||
4110                                    n(t.target).parent().is("a") ||
4111                                    (t.preventDefault(),
4112                                    l[e.closeClick ? "close" : "next"]());
4113                            }),
4114                    e.closeBtn &&
4115                        n(e.tpl.closeBtn)
4116                            .appendTo(l.skin)
4117                            .bind("click.fb", function (e) {
4118                                e.preventDefault(), l.close();
4119                            }),
4120                    e.arrows &&
4121                        1 < l.group.length &&
4122                        ((e.loop || 0 < e.index) &&
4123                            n(e.tpl.prev)
4124                                .appendTo(l.outer)
4125                                .bind("click.fb", l.prev),
4126                        (e.loop || e.index < l.group.length - 1) &&
4127                            n(e.tpl.next)
4128                                .appendTo(l.outer)
4129                                .bind("click.fb", l.next)),
4130                    l.trigger("afterShow"),
4131                    e.loop || e.index !== e.group.length - 1
4132                        ? l.opts.autoPlay &&
4133                          !l.player.isActive &&
4134                          ((l.opts.autoPlay = !1), l.play(!0))
4135                        : l.play(!1));
4136            },
4137            _afterZoomOut: function (e) {
4138                (e = e || l.current),
4139                    n(".fancybox-wrap").trigger("onReset").remove(),
4140                    n.extend(l, {
4141                        group: {},
4142                        opts: {},
4143                        router: !1,
4144                        current: null,
4145                        isActive: !1,
4146                        isOpened: !1,
4147                        isOpen: !1,
4148                        isClosing: !1,
4149                        wrap: null,
4150                        skin: null,
4151                        outer: null,
4152                        inner: null,
4153                    }),
4154                    l.trigger("afterClose", e);
4155            },
4156        }),
4157            (l.transitions = {
4158                getOrigPosition: function () {
4159                    var e = l.current,
4160                        t = e.element,
4161                        n = e.orig,
4162                        i = {},
4163                        o = 50,
4164                        a = 50,
4165                        r = e.hPadding,
4166                        s = e.wPadding,
4167                        c = l.getViewport();
4168                    return (
4169                        !n &&
4170                            e.isDom &&
4171                            t.is(":visible") &&
4172                            ((n = t.find("img:first")), n.length || (n = t)),
4173                        p(n)
4174                            ? ((i = n.offset()),
4175                              n.is("img") &&
4176                                  ((o = n.outerWidth()), (a = n.outerHeight())))
4177                            : ((i.top = c.y + (c.h - a) * e.topRatio),
4178                              (i.left = c.x + (c.w - o) * e.leftRatio)),
4179                        ("fixed" === l.wrap.css("position") || e.locked) &&
4180                            ((i.top -= c.y), (i.left -= c.x)),
4181                        (i = {
4182                            top: g(i.top - r * e.topRatio),
4183                            left: g(i.left - s * e.leftRatio),
4184                            width: g(o + s),
4185                            height: g(a + r),
4186                        })
4187                    );
4188                },
4189                step: function (e, t) {
4190                    var n,
4191                        i,
4192                        o = t.prop;
4193                    i = l.current;
4194                    var a = i.wrapSpace,
4195                        r = i.skinSpace;
4196                    ("width" === o || "height" === o) &&
4197                        ((n =
4198                            t.end === t.start
4199                                ? 1
4200                                : (e - t.start) / (t.end - t.start)),
4201                        l.isClosing && (n = 1 - n),
4202                        (i = "width" === o ? i.wPadding : i.hPadding),
4203                        (i = e - i),
4204                        l.skin[o](u("width" === o ? i : i - a * n)),
4205                        l.inner[o](u("width" === o ? i : i - a * n - r * n)));
4206                },
4207                zoomIn: function () {
4208                    var e = l.current,
4209                        t = e.pos,
4210                        i = e.openEffect,
4211                        o = "elastic" === i,
4212                        a = n.extend(
4213                            {
4214                                opacity: 1,
4215                            },
4216                            t
4217                        );
4218                    delete a.position,
4219                        o
4220                            ? ((t = this.getOrigPosition()),
4221                              e.openOpacity && (t.opacity = 0.1))
4222                            : "fade" === i && (t.opacity = 0.1),
4223                        l.wrap.css(t).animate(a, {
4224                            duration: "none" === i ? 0 : e.openSpeed,
4225                            easing: e.openEasing,
4226                            step: o ? this.step : null,
4227                            complete: l._afterZoomIn,
4228                        });
4229                },
4230                zoomOut: function () {
4231                    var e = l.current,
4232                        t = e.closeEffect,
4233                        n = "elastic" === t,
4234                        i = {
4235                            opacity: 0.1,
4236                        };
4237                    n &&
4238                        ((i = this.getOrigPosition()),
4239                        e.closeOpacity && (i.opacity = 0.1)),
4240                        l.wrap.animate(i, {
4241                            duration: "none" === t ? 0 : e.closeSpeed,
4242                            easing: e.closeEasing,
4243                            step: n ? this.step : null,
4244                            complete: l._afterZoomOut,
4245                        });
4246                },
4247                changeIn: function () {
4248                    var e,
4249                        t = l.current,
4250                        n = t.nextEffect,
4251                        i = t.pos,
4252                        o = {
4253                            opacity: 1,
4254                        },
4255                        a = l.direction;
4256                    (i.opacity = 0.1),
4257                        "elastic" === n &&
4258                            ((e = "down" === a || "up" === a ? "top" : "left"),
4259                            "down" === a || "right" === a
4260                                ? ((i[e] = g(u(i[e]) - 200)),
4261                                  (o[e] = "+=200px"))
4262                                : ((i[e] = g(u(i[e]) + 200)),
4263                                  (o[e] = "-=200px"))),
4264                        "none" === n
4265                            ? l._afterZoomIn()
4266                            : l.wrap.css(i).animate(o, {
4267                                  duration: t.nextSpeed,
4268                                  easing: t.nextEasing,
4269                                  complete: l._afterZoomIn,
4270                              });
4271                },
4272                changeOut: function () {
4273                    var e = l.previous,
4274                        t = e.prevEffect,
4275                        i = {
4276                            opacity: 0.1,
4277                        },
4278                        o = l.direction;
4279                    "elastic" === t &&
4280                        (i["down" === o || "up" === o ? "top" : "left"] =
4281                            ("up" === o || "left" === o ? "-" : "+") +
4282                            "=200px"),
4283                        e.wrap.animate(i, {
4284                            duration: "none" === t ? 0 : e.prevSpeed,
4285                            easing: e.prevEasing,
4286                            complete: function () {
4287                                n(this).trigger("onReset").remove();
4288                            },
4289                        });
4290                },
4291            }),
4292            (l.helpers.overlay = {
4293                defaults: {
4294                    closeClick: !0,
4295                    speedOut: 200,
4296                    showEarly: !0,
4297                    css: {},
4298                    locked: !d,
4299                    fixed: !0,
4300                },
4301                overlay: null,
4302                fixed: !1,
4303                el: n("html"),
4304                create: function (e) {
4305                    var t;
4306                    (e = n.extend({}, this.defaults, e)),
4307                        this.overlay && this.close(),
4308                        (t = l.coming ? l.coming.parent : e.parent),
4309                        (this.overlay = n(
4310                            '<div class="fancybox-overlay"></div>'
4311                        ).appendTo(t && t.lenth ? t : "body")),
4312                        (this.fixed = !1),
4313                        e.fixed &&
4314                            l.defaults.fixed &&
4315                            (this.overlay.addClass("fancybox-overlay-fixed"),
4316                            (this.fixed = !0));
4317                },
4318                open: function (e) {
4319                    var t = this;
4320                    (e = n.extend({}, this.defaults, e)),
4321                        this.overlay
4322                            ? this.overlay
4323                                  .unbind(".overlay")
4324                                  .width("auto")
4325                                  .height("auto")
4326                            : this.create(e),
4327                        this.fixed ||
4328                            (a.bind(
4329                                "resize.overlay",
4330                                n.proxy(this.update, this)
4331                            ),
4332                            this.update()),
4333                        e.closeClick &&
4334                            this.overlay.bind("click.overlay", function (e) {
4335                                return n(e.target).hasClass("fancybox-overlay")
4336                                    ? (l.isActive ? l.close() : t.close(), !1)
4337                                    : void 0;
4338                            }),
4339                        this.overlay.css(e.css).show();
4340                },
4341                close: function () {
4342                    a.unbind("resize.overlay"),
4343                        this.el.hasClass("fancybox-lock") &&
4344                            (n(".fancybox-margin").removeClass(
4345                                "fancybox-margin"
4346                            ),
4347                            this.el.removeClass("fancybox-lock"),
4348                            a.scrollTop(this.scrollV).scrollLeft(this.scrollH)),
4349                        n(".fancybox-overlay").remove().hide(),
4350                        n.extend(this, {
4351                            overlay: null,
4352                            fixed: !1,
4353                        });
4354                },
4355                update: function () {
4356                    var e,
4357                        n = "100%";
4358                    this.overlay.width(n).height("100%"),
4359                        s
4360                            ? ((e = Math.max(
4361                                  t.documentElement.offsetWidth,
4362                                  t.body.offsetWidth
4363                              )),
4364                              r.width() > e && (n = r.width()))
4365                            : r.width() > a.width() && (n = r.width()),
4366                        this.overlay.width(n).height(r.height());
4367                },
4368                onReady: function (e, t) {
4369                    var i = this.overlay;
4370                    n(".fancybox-overlay").stop(!0, !0),
4371                        i || this.create(e),
4372                        e.locked &&
4373                            this.fixed &&
4374                            t.fixed &&
4375                            ((t.locked = this.overlay.append(t.wrap)),
4376                            (t.fixed = !1)),
4377                        !0 === e.showEarly &&
4378                            this.beforeShow.apply(this, arguments);
4379                },
4380                beforeShow: function (e, t) {
4381                    t.locked &&
4382                        !this.el.hasClass("fancybox-lock") &&
4383                        (!1 !== this.fixPosition &&
4384                            n("*")
4385                                .filter(function () {
4386                                    return (
4387                                        "fixed" === n(this).css("position") &&
4388                                        !n(this).hasClass("fancybox-overlay") &&
4389                                        !n(this).hasClass("fancybox-wrap")
4390                                    );
4391                                })
4392                                .addClass("fancybox-margin"),
4393                        this.el.addClass("fancybox-margin"),
4394                        (this.scrollV = a.scrollTop()),
4395                        (this.scrollH = a.scrollLeft()),
4396                        this.el.addClass("fancybox-lock"),
4397                        a.scrollTop(this.scrollV).scrollLeft(this.scrollH)),
4398                        this.open(e);
4399                },
4400                onUpdate: function () {
4401                    this.fixed || this.update();
4402                },
4403                afterClose: function (e) {
4404                    this.overlay &&
4405                        !l.coming &&
4406                        this.overlay.fadeOut(
4407                            e.speedOut,
4408                            n.proxy(this.close, this)
4409                        );
4410                },
4411            }),
4412            (l.helpers.title = {
4413                defaults: {
4414                    type: "float",
4415                    position: "bottom",
4416                },
4417                beforeShow: function (e) {
4418                    var t = l.current,
4419                        i = t.title,
4420                        o = e.type;
4421                    if (
4422                        (n.isFunction(i) && (i = i.call(t.element, t)),
4423                        h(i) && "" !== n.trim(i))
4424                    ) {
4425                        switch (
4426                            ((t = n(
4427                                '<div class="fancybox-title fancybox-title-' +
4428                                    o +
4429                                    '-wrap">' +
4430                                    i +
4431                                    "</div>"
4432                            )),
4433                            o)
4434                        ) {
4435                            case "inside":
4436                                o = l.skin;
4437                                break;
4438                            case "outside":
4439                                o = l.wrap;
4440                                break;
4441                            case "over":
4442                                o = l.inner;
4443                                break;
4444                            default:
4445                                (o = l.skin),
4446                                    t.appendTo("body"),
4447                                    s && t.width(t.width()),
4448                                    t.wrapInner('<span class="child"></span>'),
4449                                    (l.current.margin[2] += Math.abs(
4450                                        u(t.css("margin-bottom"))
4451                                    ));
4452                        }
4453                        t["top" === e.position ? "prependTo" : "appendTo"](o);
4454                    }
4455                },
4456            }),
4457            (n.fn.fancybox = function (e) {
4458                var t,
4459                    i = n(this),
4460                    o = this.selector || "",
4461                    a = function (a) {
4462                        var r,
4463                            s,
4464                            c = n(this).blur(),
4465                            d = t;
4466                        a.ctrlKey ||
4467                            a.altKey ||
4468                            a.shiftKey ||
4469                            a.metaKey ||
4470                            c.is(".fancybox-wrap") ||
4471                            ((r = e.groupAttr || "data-fancybox-group"),
4472                            (s = c.attr(r)),
4473                            s || ((r = "rel"), (s = c.get(0)[r])),
4474                            s &&
4475                                "" !== s &&
4476                                "nofollow" !== s &&
4477                                ((c = o.length ? n(o) : i),
4478                                (c = c.filter("[" + r + '="' + s + '"]')),
4479                                (d = c.index(this))),
4480                            (e.index = d),
4481                            !1 !== l.open(c, e) && a.preventDefault());
4482                    };
4483                return (
4484                    (e = e || {}),
4485                    (t = e.index || 0),
4486                    o && !1 !== e.live
4487                        ? r
4488                              .undelegate(o, "click.fb-start")
4489                              .delegate(
4490                                  o + ":not('.fancybox-item, .fancybox-nav')",
4491                                  "click.fb-start",
4492                                  a
4493                              )
4494                        : i.unbind("click.fb-start").bind("click.fb-start", a),
4495                    this.filter("[data-fancybox-start=1]").trigger("click"),
4496                    this
4497                );
4498            }),
4499            r.ready(function () {
4500                var t, a;
4501                n.scrollbarWidth === i &&
4502                    (n.scrollbarWidth = function () {
4503                        var e = n(
4504                                '<div style="width:50px;height:50px;overflow:auto"><div/></div>'
4505                            ).appendTo("body"),
4506                            t = e.children(),
4507                            t = t.innerWidth() - t.height(99).innerWidth();
4508                        return e.remove(), t;
4509                    }),
4510                    n.support.fixedPosition === i &&
4511                        (n.support.fixedPosition = (function () {
4512                            var e = n(
4513                                    '<div style="position:fixed;top:20px;"></div>'
4514                                ).appendTo("body"),
4515                                t =
4516                                    20 === e[0].offsetTop ||
4517                                    15 === e[0].offsetTop;
4518                            return e.remove(), t;
4519                        })()),
4520                    n.extend(l.defaults, {
4521                        scrollbarWidth: n.scrollbarWidth(),
4522                        fixed: n.support.fixedPosition,
4523                        parent: n("body"),
4524                    }),
4525                    (t = n(e).width()),
4526                    o.addClass("fancybox-lock-test"),
4527                    (a = n(e).width()),
4528                    o.removeClass("fancybox-lock-test"),
4529                    n(
4530                        "<style type='text/css'>.fancybox-margin{margin-right:" +
4531                            (a - t) +
4532                            "px !important;}</style>"
4533                    ).appendTo("head");
4534            });
4535    })(window, document, jQuery);
4536
4537    /* ------------------------------------------------------------
4538     * [ jQuery Cookie Plugin v1.4.0 ]
4539     * ------------------------------------------------------------
4540     * https://github.com/carhartl/jquery-cookie
4541     *
4542     * Copyright 2013 Klaus Hartl
4543     * Released under the MIT license
4544     * ------------------------------------------------------------ */
4545    (function (e) {
4546        if (typeof define === "function" && define.amd) {
4547            define(["jquery"], e);
4548        } else {
4549            e(jQuery);
4550        }
4551    })(function (e) {
4552        function n(e) {
4553            return u.raw ? e : encodeURIComponent(e);
4554        }
4555
4556        function r(e) {
4557            return u.raw ? e : decodeURIComponent(e);
4558        }
4559
4560        function i(e) {
4561            return n(u.json ? JSON.stringify(e) : String(e));
4562        }
4563
4564        function s(e) {
4565            if (e.indexOf('"') === 0) {
4566                e = e.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, "\\");
4567            }
4568            try {
4569                e = decodeURIComponent(e.replace(t, " "));
4570                return u.json ? JSON.parse(e) : e;
4571            } catch (n) {}
4572        }
4573
4574        function o(t, n) {
4575            var r = u.raw ? t : s(t);
4576            return e.isFunction(n) ? n(r) : r;
4577        }
4578        var t = /\+/g;
4579        var u = (e.cookie = function (t, s, a) {
4580            if (s !== undefined && !e.isFunction(s)) {
4581                a = e.extend({}, u.defaults, a);
4582                if (typeof a.expires === "number") {
4583                    var f = a.expires,
4584                        l = (a.expires = new Date());
4585                    l.setTime(+l + f * 864e5);
4586                }
4587                return (document.cookie = [
4588                    n(t),
4589                    "=",
4590                    i(s),
4591                    a.expires ? "; expires=" + a.expires.toUTCString() : "",
4592                    a.path ? "; path=" + a.path : "",
4593                    a.domain ? "; domain=" + a.domain : "",
4594                    a.secure ? "; secure" : "",
4595                ].join(""));
4596            }
4597            var c = t ? undefined : {};
4598            var h = document.cookie ? document.cookie.split("; ") : [];
4599            for (var p = 0, d = h.length; p < d; p++) {
4600                var v = h[p].split("=");
4601                var m = r(v.shift());
4602                var g = v.join("=");
4603                if (t && t === m) {
4604                    c = o(g, s);
4605                    break;
4606                }
4607                if (!t && (g = o(g)) !== undefined) {
4608                    c[m] = g;
4609                }
4610            }
4611            return c;
4612        });
4613        u.defaults = {};
4614        e.removeCookie = function (t, n) {
4615            if (e.cookie(t) === undefined) {
4616                return false;
4617            }
4618            e.cookie(
4619                t,
4620                "",
4621                e.extend({}, n, {
4622                    expires: -1,
4623                })
4624            );
4625            return !e.cookie(t);
4626        };
4627    });
4628
4629    /* ------------------------------------------------------------
4630     * [ smoothScroll ]
4631     * ------------------------------------------------------------ */
4632    function smoothScroll(target, time, adjust) {
4633        $("a[href*=#] , area[href*=#]")
4634            .filter(":not([href=#])")
4635            .on("click", function () {
4636                if (!$(this).hasClass("noScroll"))
4637                    if (
4638                        location.pathname.replace(/^\//, "") ==
4639                            this.pathname.replace(/^\//, "") &&
4640                        location.hostname == this.hostname
4641                    ) {
4642                        var $target = $(this.hash);
4643                        $target =
4644                            ($target.length && $target) ||
4645                            $("[name=" + this.hash.slice(1) + "]");
4646                        if ($target.length) {
4647                            var targetOffset =
4648                                $target.offset().top - $("#l_header").height();
4649                            $("html,body").animate(
4650                                {
4651                                    scrollTop: targetOffset,
4652                                },
4653                                1100
4654                            );
4655                            return false;
4656                        }
4657                    }
4658            });
4659    }
4660})(jQuery);
4661
4662//
4663function getPardotVisitorInfo() {
4664    cookies = document.cookie.split(";");
4665    for (i = 0; i < cookies.length; i++) {
4666        if (cookies[i].search("visitor_id") != -1) return cookies[i];
4667    }
4668    return null;
4669}
4670//
4671function clean(arrData, deleteValue) {
4672    for (var i = 0; i < arrData.length; i++) {
4673        if (arrData[i] == deleteValue) {
4674            arrData.splice(i, 1);
4675            i--;
4676        }
4677    }
4678    return arrData;
4679}
4680
4681//render checkbox in list
4682function customCheck(radioType) {
4683    var radioButton = $(
4684        'input[type="checkbox"]:not([name="type_property"]):not([name="type_search"])'
4685    );
4686
4687    $(radioButton).each(function () {
4688        $(this).wrap("<span class='custom-check'></span>");
4689        if ($(this).is(":checked")) {
4690            $(this).parent().addClass("selected");
4691        }
4692    });
4693    $(radioButton).click(function () {
4694        if ($(this).is(":checked")) {
4695            $(this).parent().addClass("selected");
4696        } else {
4697            $(this).parent().removeClass("selected");
4698        }
4699    });
4700}
4701
4702var sel_proj_ids = JSON.parse(localStorage.getItem("sel_proj_ids")) || [];
4703//render bottom area
4704function showLinkBottom() {
4705    const requiredInfos = document.querySelectorAll(".require-info");
4706    if (sel_proj_ids.length > 0) {
4707        if ($(".custom-link_bottom a")) {
4708            $(".custom-link_bottom a").addClass("active");
4709        }
4710        if (requiredInfos.length > 0) {
4711            requiredInfos.forEach((requiredInfo) =>
4712                requiredInfo.classList.remove("disable")
4713            );
4714        }
4715        if ($(".link_bottom:not(.custom-link_bottom)")) {
4716            $(".link_bottom:not(.custom-link_bottom)").fadeIn(300);
4717        }
4718        sel_proj_ids.forEach((projectId) => {
4719            const projEl = document.querySelector(`#proj_id_${projectId}`);
4720            if (projEl) {
4721                projEl.querySelector(".custom-check").classList.add("selected");
4722                projEl.querySelector(".custom-check input").checked = true;
4723            }
4724        });
4725    }
4726    $(".custom-check").click(function () {
4727        $(".tbl_content tr").each(function () {
4728            if ($(this).find(".custom-check").hasClass("selected")) {
4729                var id_str = $(this)
4730                    .find(".tbl_content__check")
4731                    .attr("id")
4732                    .split("_");
4733                var id = id_str[2];
4734                const existIndex = sel_proj_ids.indexOf(id);
4735                if (existIndex > -1) {
4736                    sel_proj_ids.splice(existIndex, 1);
4737                } else {
4738                    sel_proj_ids.push(id);
4739                }
4740            }
4741        });
4742
4743        $(".lst_fav__inner").each(function () {
4744            if ($(this).find(".custom-check").hasClass("selected")) {
4745                var id_str = $(this)
4746                    .find(".box_media__pic a.rollover")
4747                    .attr("href")
4748                    .split("=");
4749                var id = id_str[1];
4750                const existIndex = sel_proj_ids.indexOf(id);
4751                if (existIndex > -1) {
4752                    sel_proj_ids.splice(existIndex, 1);
4753                } else {
4754                    sel_proj_ids.push(id);
4755                }
4756            }
4757        });
4758
4759        if (sel_proj_ids.length > 0) {
4760            $(".link_bottom:not(.custom-link_bottom)").fadeIn(300);
4761            $(".custom-link_bottom a").addClass("active");
4762            if (requiredInfos.length > 0) {
4763                requiredInfos.forEach((requiredInfo) => {
4764                    requiredInfo.classList.remove("disable");
4765                });
4766            }
4767        } else {
4768            $(".link_bottom:not(.custom-link_bottom)").fadeOut(300);
4769            $(".custom-link_bottom a").removeClass("active");
4770            if (requiredInfos.length > 0) {
4771                requiredInfos.forEach((requiredInfo) => {
4772                    requiredInfo.classList.add("disable");
4773                });
4774            }
4775        }
4776        localStorage.setItem("sel_proj_ids", JSON.stringify(sel_proj_ids));
4777    });
4778
4779    window.onbeforeunload = function () {
4780        if (isNeedClearChecked) {
4781            localStorage.removeItem("sel_proj_ids");
4782        }
4783    };
4784}
4785
4786//handle request multi project
4787function initRequestAllButton() {
4788    $(".js_requestAll").click(function () {
4789        if (sel_proj_ids.length > 0) {
4790            var url = "/request/";
4791            if (sel_proj_ids.length > 0)
4792                url += "?proj_ids=" + sel_proj_ids.join(",");
4793            window.open(url, Date.now());
4794        }
4795    });
4796}
4797
4798//render paginator
4799function renderPaginator(
4800    current_page,
4801    total_page,
4802    page_url,
4803    max_index_button,
4804    container
4805) {
4806    $(container).html("");
4807
4808    $(container).append(
4809        `<li class="${
4810            current_page == 1 ? "disable" : ""
4811        }"><a  href="${page_url}1" onClick="handleChangePagination(event, '${page_url}1')"><i class="fa fa-angle-double-left"></i><i class="fa fa-angle-double-left"></i></a></li>`
4812    );
4813    $(container).append(
4814        `<li  class="${
4815            current_page == 1 ? "disable" : ""
4816        }"><a  href="${page_url}${
4817            current_page - 1
4818        }" onClick="handleChangePagination(event, '${page_url}${
4819            current_page - 1
4820        }')"><i class="fa fa-angle-double-left"></i></a></li>`
4821    );
4822
4823    var start_index = 1;
4824
4825    if ($(window).width() < 768) {
4826        // just display 3 number page options
4827        max_index_button = 3;
4828    }
4829
4830    var end_index = max_index_button;
4831
4832    if (current_page < max_index_button) {
4833        start_index = 1;
4834    } else {
4835        if (current_page > total_page - Math.floor(max_index_button / 2))
4836            start_index = total_page - max_index_button + 1;
4837        else start_index = current_page - Math.floor(max_index_button / 2);
4838    }
4839    if (total_page < max_index_button) {
4840        end_index = total_page;
4841    } else {
4842        if (current_page > total_page - Math.floor(max_index_button / 2))
4843            end_index = total_page;
4844        else end_index = start_index + max_index_button - 1;
4845    }
4846    for (pi = start_index; pi <= end_index; pi++)
4847        $(container).append(
4848            `<li><a  href="${page_url}${pi}"  ${
4849                pi == current_page ? 'class="active"' : ""
4850            } onClick="handleChangePagination(event, '${page_url}${pi}')">${pi}</a></li>`
4851        );
4852
4853    $(container).append(
4854        `<li class="${
4855            current_page == total_page ? "disable" : ""
4856        }"><a onClick="handleChangePagination(event, '${page_url}${
4857            current_page + 1
4858        }')" href="${page_url}${
4859            current_page + 1
4860        }"><i class="fa fa-angle-double-right"></i></a></li>`
4861    );
4862    $(container).append(
4863        `<li class="${
4864            current_page == total_page ? "disable" : ""
4865        }"><a  href="${page_url}${total_page}" onClick="handleChangePagination(event, '${page_url}${total_page}')"><i class="fa fa-angle-double-right"></i><i class="fa fa-angle-double-right"></i></a></li>`
4866    );
4867}
4868let isNeedClearChecked = true;
4869function handleChangePagination(event, url) {
4870    if (window.location.href.includes("list.php")) {
4871        event.preventDefault();
4872
4873        event.target.href =
4874            event.target.href || `${window.location.origin}${url}`;
4875        const urlParams = new URLSearchParams(
4876            event.target.href.split("?")[1] || ""
4877        );
4878
4879        const dataJson = JSON.parse(localStorage.getItem("dataJson"));
4880        const dataKeys = Object.keys(dataJson);
4881        let paramsUrl = [];
4882        for (let i = 0; i < dataKeys.length; i++) {
4883            if (Array.isArray(dataJson[dataKeys[i]])) {
4884                if (
4885                    dataJson[dataKeys[i]].length > 0 &&
4886                    !urlParams.has(dataKeys[i])
4887                ) {
4888                    paramsUrl.push(
4889                        `${dataKeys[i]}=${dataJson[dataKeys[i]].join(",")}`
4890                    );
4891                }
4892            } else {
4893                if (dataKeys[i] === "keyword") {
4894                    urlParams.set("keyword", dataJson[dataKeys[i]]);
4895                    event.target.href =
4896                        event.target.href.split("?")[0] +
4897                        `?${urlParams.toString()}`;
4898                }
4899                if (dataKeys[i] === "page_number") {
4900                    // On URL, page_number is replaced by "p"
4901                    continue;
4902                }
4903                if (dataJson[dataKeys[i]] && !urlParams.has(dataKeys[i])) {
4904                    paramsUrl.push(`${dataKeys[i]}=${dataJson[dataKeys[i]]}`);
4905                }
4906            }
4907        }
4908        event.target.href =
4909            event.target.href +
4910            `${paramsUrl.join("&") ? `&${paramsUrl.join("&")}` : ""}`;
4911        window.location.href = event.target.href;
4912    }
4913    isNeedClearChecked = false;
4914}
4915
4916//favorite
4917function UpdateBookmark() {
4918    var helpPath = $(".js_help_path");
4919    var elSetCounts = $(".bookmark__counts");
4920
4921    count = countFav();
4922
4923    if (count == 0) {
4924        helpPath.attr("href", "/property/favorite.php?help");
4925        elSetCounts.empty().append("★");
4926        elSetCounts.parents(".l_header__items").hide();
4927    } else {
4928        helpPath.attr("href", "/property/favorite.php");
4929        elSetCounts.each(function () {
4930            $(this).parents(".l_header__items").show();
4931            $(this).empty().append(count);
4932        });
4933    }
4934}
4935
4936function favoriteHelp() {
4937    $(".js_favorite_path").click(function () {
4938        $(".fav_help_head").show();
4939        $(".fav_help_note").show();
4940        $(".section_favorite_help").show(0);
4941        $("#js_favorite_content").hide();
4942        return false;
4943    });
4944}
4945
4946function countFav() {
4947    var count = $.cookie("fav_count");
4948    return count == null ? 0 : count;
4949}
4950
4951function getFavItems(isProject) {
4952    var array = null;
4953    if (isProject) {
4954        array = $.cookie("fav_projs");
4955    } else {
4956        array = $.cookie("fav_props");
4957    }
4958    if (array == null) return [];
4959    else return clean(array.split(","), "");
4960}
4961
4962//recent
4963var MAX_RECENT = 10;
4964
4965function addRecent(id, isProject) {
4966    id = (isProject ? "proj_" : "prop_") + id.toString();
4967    var array = getRecentItems();
4968
4969    var pos = array.indexOf(id);
4970    if (pos > -1) array.splice(pos, 1);
4971
4972    array.unshift(id);
4973
4974    if (array.length > MAX_RECENT) array = array.slice(0, MAX_RECENT);
4975
4976    $.cookie("recent_items", array);
4977}
4978
4979function getRecentItems() {
4980    var array = $.cookie("recent_items");
4981
4982    if (array == null) return [];
4983    else return clean(array.split(","), "");
4984}
4985
4986// print a number with commas as thousands separators
4987function numberWithCommas(x) {
4988    if (x) return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
4989    else return null;
4990}
4991
4992// convert square(m2) to 坪
4993function m2ToTsubo(x) {
4994    fixed = Math.pow(10, 2);
4995    return Math.floor(x * 0.3025 * fixed) / fixed;
4996}
4997
4998// replace EOL by <br>
4999function replaceEOL(data) {
5000    if (data) {
5001        return data.replace(/(?:\r\n|\r|\n)/g, "<br/>");
5002    } else {
5003        return "";
5004    }
5005}
5006// cut wood friend from project name
5007function cutWoodFriendText(data) {
5008    if (data) {
5009        return data
5010            .replace(/\s*【\s*WOOD\s*FRIENDS\s*\(売主\)\s*】/g, "")
5011            .trim();
5012    } else {
5013        return "";
5014    }
5015}
5016
5017// cut -予告広告- from project name
5018function cutWoodFriendTextTwo(data) {
5019    if (data) {
5020        return data.replace(/\s*-\s*予告広告\s*-/g, "").trim();
5021    } else {
5022        return "";
5023    }
5024}
5025
5026//get URL parameter
5027function getUrlParameter(sParam) {
5028    var sPageURL = decodeURIComponent(window.location.search.substring(1)),
5029        sURLVariables = sPageURL.split("&"),
5030        sParameterName,
5031        i;
5032
5033    for (i = 0; i < sURLVariables.length; i++) {
5034        sParameterName = sURLVariables[i].split("=");
5035
5036        if (sParameterName[0] === sParam) {
5037            return sParameterName[1] === undefined ? null : sParameterName[1];
5038        }
5039    }
5040    return null;
5041}
5042
5043//replace image by thumb image
5044function replaceImageByThumb(data) {
5045    if (data) {
5046        var lastDot = data.lastIndexOf(".");
5047        return data.substring(0, lastDot) + "_thumb" + data.substring(lastDot);
5048    }
5049    return null;
5050}
5051
5052function checkFeaturesType1Off(type, id, feature_array) {
5053    /*駅徒歩5分以内: 1 30 (feature_type feature_id)
5054	駅徒歩15分以内: 1 11
5055	複数路線利用可: 1 12
5056	小学校徒歩10分以内: 1 14
5057	中学校徒歩10分以内: 1 15
5058	保育園・幼稚園徒歩10分以内: 1 16
5059	スーパー徒歩10分以内: 1 17
5060	コンビニ徒歩5分以内: 1 18
5061	病院徒歩10分以内: 1 34
5062	前面道路6.0m以上: 1 21
5063	南面道路: 1 20
5064	土地50坪以上: 1 23
5065	角地: 1 22
5066	3台駐車可: 1 24
5067	LDK16帖以上: 3 23
5068	対面キッチン: 3 36*/
5069
5070    if (feature_array == null) {
5071        return "label_off";
5072    } else {
5073        for (j = 0; j < feature_array.length; j++) {
5074            if (
5075                feature_array[j].feature_id == id &&
5076                feature_array[j].feature_type
5077            ) {
5078                return "";
5079            }
5080        }
5081    }
5082
5083    return "label_off";
5084}
5085
5086function checkFeatureOffByName(feature_name, arr1, arr2, arr3) {
5087    if (!arr1) arr1 = [];
5088    if (!arr2) arr2 = [];
5089    if (!arr3) arr3 = [];
5090
5091    for (var i = 0; i < arr1.length; i++) {
5092        if (arr1[i].feature_name === feature_name) {
5093            return ""; // found ->on
5094        }
5095    }
5096
5097    for (var i = 0; i < arr2.length; i++) {
5098        if (arr2[i].feature_name === feature_name) {
5099            return ""; // found ->on
5100        }
5101    }
5102
5103    for (var i = 0; i < arr3.length; i++) {
5104        if (arr3[i].feature_name === feature_name) {
5105            return ""; /// found ->on
5106        }
5107    }
5108
5109    return "label_off"; // not found → label_off
5110}
5111
5112
5113//map
5114function getZoomLevel(type) {
5115    type = parseInt(type);
5116    switch (type) {
5117        case 1:
5118            return 14;
5119        case 2:
5120            return 16;
5121        default:
5122            return 18;
5123    }
5124}
5125
5126//
5127function sortFacilities(facilities) {
5128    var group1 = []; //教育施設
5129    var group2 = []; //ショッピング
5130    var group3 = []; //医療機関
5131    var group4 = []; //金融機関
5132    var group5 = []; //公園
5133    var group6 = []; //郵便局
5134    var group7 = []; //その他
5135
5136    for (var i in facilities) {
5137        switch (facilities[i].facility_type) {
5138            case "教育施設":
5139                group1.push(facilities[i]);
5140                break;
5141            case "ショッピング":
5142                group2.push(facilities[i]);
5143                break;
5144            case "医療機関":
5145                group3.push(facilities[i]);
5146                break;
5147            case "金融機関":
5148                group4.push(facilities[i]);
5149                break;
5150            case "公園":
5151                group5.push(facilities[i]);
5152                break;
5153            case "郵便局":
5154                group6.push(facilities[i]);
5155                break;
5156            default:
5157                group7.push(facilities[i]);
5158        }
5159    }
5160
5161    return group1
5162        .concat(group2)
5163        .concat(group3)
5164        .concat(group4)
5165        .concat(group5)
5166        .concat(group6)
5167        .concat(group7);
5168}
5169//
5170function strToDateWithoutTime(stringDate) {
5171    var stringDate = stringDate.split(" ")[0].split("-");
5172    return new Date(
5173        stringDate[0],
5174        stringDate[1] - 1,
5175        stringDate[2],
5176        0,
5177        0,
5178        0,
5179        0
5180    );
5181}
5182
5183/* ------------------------------------------------------------
5184 * [ createMap ]
5185 * ------------------------------------------------------------ */
5186$.fn.createMap = function (init_zoom, title, lat, lng, target) {
5187    document.getElementById("property_project_map").innerHTML = "";
5188    var mapDiv = document.createElement("div");
5189    var linkDiv = document.createElement("p");
5190    mapDiv.style.width = "100%";
5191    mapDiv.style.height = "100%";
5192    if (target == "PC") {
5193        document.getElementById("property_project_map").appendChild(mapDiv);
5194        document.getElementById("property_project_map").appendChild(linkDiv);
5195    } else {
5196        document.getElementById("property_project_map_sp").innerHTML = "";
5197        document.getElementById("property_project_map_sp").appendChild(mapDiv);
5198        document.getElementById("property_project_map_sp").appendChild(linkDiv);
5199    }
5200
5201    linkDiv.className = "google_map_link";
5202    linkDiv.style.textAlign = "center";
5203    linkDiv.innerHTML =
5204        '<a target="_blank" href="https://maps.google.com/?q=' +
5205        lat +
5206        "," +
5207        lng +
5208        '"><img style="margin-right:5px;" src="/resource/img/angle-right.svg" />Googleで見る</a>';
5209    if (proj_id) {
5210        linkDiv.innerHTML +=
5211            '<a target="_blank" href="/property/project_map.php?proj_id=' +
5212            proj_id +
5213            '"><img style="margin-right:5px;" src="/resource/img/angle-right.svg" />近隣物件を見る</a>';
5214    }
5215
5216    var myOptions = {
5217        zoom: init_zoom,
5218        center: new google.maps.LatLng(lat, lng),
5219        mapTypeId: google.maps.MapTypeId.ROADMAP,
5220        mapTypeControl: false,
5221        scrollwheel: false,
5222        styles: [
5223            {
5224                featureType: "all",
5225                elementType: "labels",
5226                stylers: [
5227                    {
5228                        saturation: "-100",
5229                    },
5230                ],
5231            },
5232            {
5233                featureType: "administrative",
5234                elementType: "geometry.fill",
5235                stylers: [
5236                    {
5237                        color: "#ffffff",
5238                    },
5239                    {
5240                        lightness: 20,
5241                    },
5242                    {
5243                        visibility: "on",
5244                    },
5245                ],
5246            },
5247            {
5248                featureType: "administrative",
5249                elementType: "geometry.stroke",
5250                stylers: [
5251                    {
5252                        color: "#000000",
5253                    },
5254                    {
5255                        lightness: 17,
5256                    },
5257                    {
5258                        weight: 1.2,
5259                    },
5260                ],
5261            },
5262            {
5263                featureType: "administrative.locality",
5264                elementType: "all",
5265                stylers: [
5266                    {
5267                        visibility: "on",
5268                    },
5269                ],
5270            },
5271            {
5272                featureType: "administrative.neighborhood",
5273                elementType: "all",
5274                stylers: [
5275                    {
5276                        visibility: "on",
5277                    },
5278                ],
5279            },
5280            {
5281                featureType: "administrative.land_parcel",
5282                elementType: "all",
5283                stylers: [
5284                    {
5285                        visibility: "on",
5286                    },
5287                    {
5288                        lightness: "80",
5289                    },
5290                ],
5291            },
5292            {
5293                featureType: "landscape",
5294                elementType: "all",
5295                stylers: [
5296                    {
5297                        saturation: "-100",
5298                    },
5299                ],
5300            },
5301            {
5302                featureType: "landscape",
5303                elementType: "labels",
5304                stylers: [
5305                    {
5306                        weight: "0.5",
5307                    },
5308                ],
5309            },
5310            {
5311                featureType: "landscape",
5312                elementType: "labels.icon",
5313                stylers: [
5314                    {
5315                        weight: "1",
5316                    },
5317                    {
5318                        visibility: "on",
5319                    },
5320                ],
5321            },
5322            {
5323                featureType: "landscape.man_made",
5324                elementType: "all",
5325                stylers: [
5326                    {
5327                        visibility: "on",
5328                    },
5329                ],
5330            },
5331            {
5332                featureType: "landscape.natural.landcover",
5333                elementType: "all",
5334                stylers: [
5335                    {
5336                        visibility: "on",
5337                    },
5338                ],
5339            },
5340            {
5341                featureType: "landscape.natural.terrain",
5342                elementType: "all",
5343                stylers: [
5344                    {
5345                        visibility: "off",
5346                    },
5347                ],
5348            },
5349            {
5350                featureType: "poi",
5351                elementType: "all",
5352                stylers: [
5353                    {
5354                        saturation: "-100",
5355                    },
5356                ],
5357            },
5358            {
5359                featureType: "poi",
5360                elementType: "geometry.fill",
5361                stylers: [
5362                    {
5363                        color: "#cccccc",
5364                    },
5365                ],
5366            },
5367            {
5368                featureType: "poi",
5369                elementType: "geometry",
5370                stylers: [
5371                    {
5372                        lightness: "21",
5373                    },
5374                    {
5375                        color: "#d6eab8",
5376                    },
5377                ],
5378            },
5379            {
5380                featureType: "poi.park",
5381                elementType: "geometry",
5382                stylers: [
5383                    {
5384                        color: "#d6eab8",
5385                    },
5386                ],
5387            },
5388            {
5389                featureType: "road",
5390                elementType: "labels.icon",
5391                stylers: [
5392                    {
5393                        saturation: "-100",
5394                    },
5395                ],
5396            },
5397            {
5398                featureType: "road.highway",
5399                elementType: "geometry.fill",
5400                stylers: [
5401                    {
5402                        color: "#e6d799",
5403                    },
5404                    {
5405                        visibility: "on",
5406                    },
5407                    {
5408                        weight: "3.00",
5409                    },
5410                ],
5411            },
5412            {
5413                featureType: "road.highway",
5414                elementType: "geometry.stroke",
5415                stylers: [
5416                    {
5417                        color: "#e6d799",
5418                    },
5419                    {
5420                        gamma: "0.6",
5421                    },
5422                ],
5423            },
5424            {
5425                featureType: "road.highway.controlled_access",
5426                elementType: "geometry",
5427                stylers: [
5428                    {
5429                        visibility: "on",
5430                    },
5431                    {
5432                        color: "#DABD7B",
5433                    },
5434                    {
5435                        weight: "4.00",
5436                    },
5437                ],
5438            },
5439            {
5440                featureType: "road.highway.controlled_access",
5441                elementType: "geometry.fill",
5442                stylers: [
5443                    {
5444                        color: "#DABD7B",
5445                    },
5446                ],
5447            },
5448            {
5449                featureType: "road.highway.controlled_access",
5450                elementType: "geometry.stroke",
5451                stylers: [
5452                    {
5453                        weight: "1",
5454                    },
5455                    {
5456                        gamma: "0.6",
5457                    },
5458                    {
5459                        color: "#DABD7B",
5460                    },
5461                ],
5462            },
5463            {
5464                featureType: "road.arterial",
5465                elementType: "geometry",
5466                stylers: [
5467                    {
5468                        color: "#aeaeae",
5469                    },
5470                    {
5471                        lightness: 18,
5472                    },
5473                    {
5474                        visibility: "on",
5475                    },
5476                ],
5477            },
5478            {
5479                featureType: "road.arterial",
5480                elementType: "geometry.stroke",
5481                stylers: [
5482                    {
5483                        color: "#b6b6b6",
5484                    },
5485                ],
5486            },
5487            {
5488                featureType: "road.local",
5489                elementType: "all",
5490                stylers: [
5491                    {
5492                        visibility: "on",
5493                    },
5494                    {
5495                        color: "#656565",
5496                    },
5497                ],
5498            },
5499            {
5500                featureType: "road.local",
5501                elementType: "geometry",
5502                stylers: [
5503                    {
5504                        color: "#c6c6c6",
5505                    },
5506                    {
5507                        lightness: 16,
5508                    },
5509                ],
5510            },
5511            {
5512                featureType: "road.local",
5513                elementType: "geometry.stroke",
5514                stylers: [
5515                    {
5516                        color: "#b1b1b1",
5517                    },
5518                    {
5519                        visibility: "on",
5520                    },
5521                ],
5522            },
5523            {
5524                featureType: "road.local",
5525                elementType: "labels.text.stroke",
5526                stylers: [
5527                    {
5528                        visibility: "on",
5529                    },
5530                    {
5531                        color: "#ffffff",
5532                    },
5533                ],
5534            },
5535            {
5536                featureType: "transit",
5537                elementType: "geometry",
5538                stylers: [
5539                    {
5540                        color: "#bdbdbd",
5541                    },
5542                    {
5543                        lightness: 19,
5544                    },
5545                    {
5546                        visibility: "on",
5547                    },
5548                ],
5549            },
5550            {
5551                featureType: "water",
5552                elementType: "geometry",
5553                stylers: [
5554                    {
5555                        color: "#c0d8e3",
5556                    },
5557                    {
5558                        lightness: 17,
5559                    },
5560                    {
5561                        visibility: "on",
5562                    },
5563                ],
5564            },
5565            {
5566                featureType: "water",
5567                elementType: "labels",
5568                stylers: [
5569                    {
5570                        saturation: "-100",
5571                    },
5572                ],
5573            },
5574        ],
5575    };
5576    var map = new google.maps.Map(mapDiv, myOptions);
5577    var markers = [[title, lat, lng, "/resource/img/property_icn_marker.png"]];
5578    for (var i = 0; i < markers.length; i++) {
5579        var name = markers[i][0];
5580        var latlng = new google.maps.LatLng(markers[i][1], markers[i][2]);
5581        var icons = markers[i][3];
5582        createMarker(name, latlng, icons, map);
5583    }
5584};
5585
5586/* ------------------------------------------------------------
5587 * [ createMap by project id ]
5588 * ------------------------------------------------------------ */
5589$.fn.createMapByProjectId = function (
5590    init_zoom,
5591    title,
5592    lat,
5593    lng,
5594    proj_id,
5595    target
5596) {
5597    document.getElementById("property_project_map").innerHTML = "";
5598    var mapDiv = document.createElement("div");
5599    var linkDiv = document.createElement("p");
5600    mapDiv.style.width = "100%";
5601    mapDiv.style.height = "100%";
5602
5603    if (target == "PC") {
5604        document.getElementById("property_project_map").appendChild(mapDiv);
5605        document.getElementById("property_project_map").appendChild(linkDiv);
5606    } else {
5607        document.getElementById("property_project_map_sp").innerHTML = "";
5608        document.getElementById("property_project_map_sp").appendChild(mapDiv);
5609        document.getElementById("property_project_map_sp").appendChild(linkDiv);
5610    }
5611
5612    linkDiv.className = "google_map_link";
5613    linkDiv.style.textAlign = "center";
5614    linkDiv.innerHTML =
5615        '<a target="_blank" href="https://maps.google.com/?q=' +
5616        lat +
5617        "," +
5618        lng +
5619        '"><img style="margin-right:5px;" src="/resource/img/angle-right.svg" />Googleで見る</img></a>';
5620    if (proj_id) {
5621        linkDiv.innerHTML +=
5622            '<a target="_blank" href="/property/project_map.php?proj_id=' +
5623            proj_id +
5624            '"><img style="margin-right:5px;" src="/resource/img/angle-right.svg" />近隣物件を見る</img></a>';
5625    }
5626
5627    var myOptions = {
5628        zoom: init_zoom,
5629        center: new google.maps.LatLng(lat, lng),
5630        mapTypeId: google.maps.MapTypeId.ROADMAP,
5631        mapTypeControl: false,
5632        scrollwheel: false,
5633        styles: [
5634            {
5635                featureType: "all",
5636                elementType: "labels",
5637                stylers: [
5638                    {
5639                        saturation: "-100",
5640                    },
5641                ],
5642            },
5643            {
5644                featureType: "administrative",
5645                elementType: "geometry.fill",
5646                stylers: [
5647                    {
5648                        color: "#ffffff",
5649                    },
5650                    {
5651                        lightness: 20,
5652                    },
5653                    {
5654                        visibility: "on",
5655                    },
5656                ],
5657            },
5658            {
5659                featureType: "administrative",
5660                elementType: "geometry.stroke",
5661                stylers: [
5662                    {
5663                        color: "#000000",
5664                    },
5665                    {
5666                        lightness: 17,
5667                    },
5668                    {
5669                        weight: 1.2,
5670                    },
5671                ],
5672            },
5673            {
5674                featureType: "administrative.locality",
5675                elementType: "all",
5676                stylers: [
5677                    {
5678                        visibility: "on",
5679                    },
5680                ],
5681            },
5682            {
5683                featureType: "administrative.neighborhood",
5684                elementType: "all",
5685                stylers: [
5686                    {
5687                        visibility: "on",
5688                    },
5689                ],
5690            },
5691            {
5692                featureType: "administrative.land_parcel",
5693                elementType: "all",
5694                stylers: [
5695                    {
5696                        visibility: "on",
5697                    },
5698                    {
5699                        lightness: "80",
5700                    },
5701                ],
5702            },
5703            {
5704                featureType: "landscape",
5705                elementType: "all",
5706                stylers: [
5707                    {
5708                        saturation: "-100",
5709                    },
5710                ],
5711            },
5712            {
5713                featureType: "landscape",
5714                elementType: "labels",
5715                stylers: [
5716                    {
5717                        weight: "0.5",
5718                    },
5719                ],
5720            },
5721            {
5722                featureType: "landscape",
5723                elementType: "labels.icon",
5724                stylers: [
5725                    {
5726                        weight: "
57261",
5727                    },
5728                    {
5729                        visibility: "on",
5730                    },
5731                ],
5732            },
5733            {
5734                featureType: "landscape.man_made",
5735                elementType: "all",
5736                stylers: [
5737                    {
5738                        visibility: "on",
5739                    },
5740                ],
5741            },
5742            {
5743                featureType: "landscape.natural.landcover",
5744                elementType: "all",
5745                stylers: [
5746                    {
5747                        visibility: "on",
5748                    },
5749                ],
5750            },
5751            {
5752                featureType: "landscape.natural.terrain",
5753                elementType: "all",
5754                stylers: [
5755                    {
5756                        visibility: "off",
5757                    },
5758                ],
5759            },
5760            {
5761                featureType: "poi",
5762                elementType: "all",
5763                stylers: [
5764                    {
5765                        saturation: "-100",
5766                    },
5767                ],
5768            },
5769            {
5770                featureType: "poi",
5771                elementType: "geometry.fill",
5772                stylers: [
5773                    {
5774                        color: "#cccccc",
5775                    },
5776                ],
5777            },
5778            {
5779                featureType: "poi",
5780                elementType: "geometry",
5781                stylers: [
5782                    {
5783                        lightness: "21",
5784                    },
5785                    {
5786                        color: "#d6eab8",
5787                    },
5788                ],
5789            },
5790            {
5791                featureType: "poi.park",
5792                elementType: "geometry",
5793                stylers: [
5794                    {
5795                        color: "#d6eab8",
5796                    },
5797                ],
5798            },
5799            {
5800                featureType: "road",
5801                elementType: "labels.icon",
5802                stylers: [
5803                    {
5804                        saturation: "-100",
5805                    },
5806                ],
5807            },
5808            {
5809                featureType: "road.highway",
5810                elementType: "geometry.fill",
5811                stylers: [
5812                    {
5813                        color: "#e6d799",
5814                    },
5815                    {
5816                        visibility: "on",
5817                    },
5818                    {
5819                        weight: "3.00",
5820                    },
5821                ],
5822            },
5823            {
5824                featureType: "road.highway",
5825                elementType: "geometry.stroke",
5826                stylers: [
5827                    {
5828                        color: "#e6d799",
5829                    },
5830                    {
5831                        gamma: "0.6",
5832                    },
5833                ],
5834            },
5835            {
5836                featureType: "road.highway.controlled_access",
5837                elementType: "geometry",
5838                stylers: [
5839                    {
5840                        visibility: "on",
5841                    },
5842                    {
5843                        color: "#DABD7B",
5844                    },
5845                    {
5846                        weight: "4.00",
5847                    },
5848                ],
5849            },
5850            {
5851                featureType: "road.highway.controlled_access",
5852                elementType: "geometry.fill",
5853                stylers: [
5854                    {
5855                        color: "#DABD7B",
5856                    },
5857                ],
5858            },
5859            {
5860                featureType: "road.highway.controlled_access",
5861                elementType: "geometry.stroke",
5862                stylers: [
5863                    {
5864                        weight: "1",
5865                    },
5866                    {
5867                        gamma: "0.6",
5868                    },
5869                    {
5870                        color: "#DABD7B",
5871                    },
5872                ],
5873            },
5874            {
5875                featureType: "road.arterial",
5876                elementType: "geometry",
5877                stylers: [
5878                    {
5879                        color: "#aeaeae",
5880                    },
5881                    {
5882                        lightness: 18,
5883                    },
5884                    {
5885                        visibility: "on",
5886                    },
5887                ],
5888            },
5889            {
5890                featureType: "road.arterial",
5891                elementType: "geometry.stroke",
5892                stylers: [
5893                    {
5894                        color: "#b6b6b6",
5895                    },
5896                ],
5897            },
5898            {
5899                featureType: "road.local",
5900                elementType: "all",
5901                stylers: [
5902                    {
5903                        visibility: "on",
5904                    },
5905                    {
5906                        color: "#656565",
5907                    },
5908                ],
5909            },
5910            {
5911                featureType: "road.local",
5912                elementType: "geometry",
5913                stylers: [
5914                    {
5915                        color: "#c6c6c6",
5916                    },
5917                    {
5918                        lightness: 16,
5919                    },
5920                ],
5921            },
5922            {
5923                featureType: "road.local",
5924                elementType: "geometry.stroke",
5925                stylers: [
5926                    {
5927                        color: "#b1b1b1",
5928                    },
5929                    {
5930                        visibility: "on",
5931                    },
5932                ],
5933            },
5934            {
5935                featureType: "road.local",
5936                elementType: "labels.text.stroke",
5937                stylers: [
5938                    {
5939                        visibility: "on",
5940                    },
5941                    {
5942                        color: "#ffffff",
5943                    },
5944                ],
5945            },
5946            {
5947                featureType: "transit",
5948                elementType: "geometry",
5949                stylers: [
5950                    {
5951                        color: "#bdbdbd",
5952                    },
5953                    {
5954                        lightness: 19,
5955                    },
5956                    {
5957                        visibility: "on",
5958                    },
5959                ],
5960            },
5961            {
5962                featureType: "water",
5963                elementType: "geometry",
5964                stylers: [
5965                    {
5966                        color: "#c0d8e3",
5967                    },
5968                    {
5969                        lightness: 17,
5970                    },
5971                    {
5972                        visibility: "on",
5973                    },
5974                ],
5975            },
5976            {
5977                featureType: "water",
5978                elementType: "labels",
5979                stylers: [
5980                    {
5981                        saturation: "-100",
5982                    },
5983                ],
5984            },
5985        ],
5986    };
5987    var map = new google.maps.Map(mapDiv, myOptions);
5988    var markers = [[title, lat, lng, "/resource/img/property_icn_marker.png"]];
5989    for (var i = 0; i < markers.length; i++) {
5990        var name = markers[i][0];
5991        var latlng = new google.maps.LatLng(markers[i][1], markers[i][2]);
5992        var icons = markers[i][3];
5993        createMarker(name, latlng, icons, map);
5994    }
5995};
5996
5997$.fn.createMapNoMarker = function (init_zoom, title, lat, lng, target) {
5998    document.getElementById("property_project_map").innerHTML = "";
5999    var mapDiv = document.createElement("div");
6000    var linkDiv = document.createElement("p");
6001    mapDiv.style.width = "100%";
6002    mapDiv.style.height = "100%";
6003    if (target == "PC") {
6004        document.getElementById("property_project_map").appendChild(mapDiv);
6005        document.getElementById("property_project_map").appendChild(linkDiv);
6006    } else {
6007        document.getElementById("property_project_map_sp").innerHTML = "";
6008        document.getElementById("property_project_map_sp").appendChild(mapDiv);
6009        document.getElementById("property_project_map_sp").appendChild(linkDiv);
6010    }
6011
6012    var myOptions = {
6013        zoom: init_zoom,
6014        center: new google.maps.LatLng(lat, lng),
6015        mapTypeId: google.maps.MapTypeId.ROADMAP,
6016        mapTypeControl: false,
6017        scrollwheel: false,
6018        styles: [
6019            {
6020                featureType: "all",
6021                elementType: "labels",
6022                stylers: [
6023                    {
6024                        saturation: "-100",
6025                    },
6026                ],
6027            },
6028            {
6029                featureType: "administrative",
6030                elementType: "geometry.fill",
6031                stylers: [
6032                    {
6033                        color: "#ffffff",
6034                    },
6035                    {
6036                        lightness: 20,
6037                    },
6038                    {
6039                        visibility: "on",
6040                    },
6041                ],
6042            },
6043            {
6044                featureType: "administrative",
6045                elementType: "geometry.stroke",
6046                stylers: [
6047                    {
6048                        color: "#000000",
6049                    },
6050                    {
6051                        lightness: 17,
6052                    },
6053                    {
6054                        weight: 1.2,
6055                    },
6056                ],
6057            },
6058            {
6059                featureType: "administrative.locality",
6060                elementType: "all",
6061                stylers: [
6062                    {
6063                        visibility: "on",
6064                    },
6065                ],
6066            },
6067            {
6068                featureType: "administrative.neighborhood",
6069                elementType: "all",
6070                stylers: [
6071                    {
6072                        visibility: "on",
6073                    },
6074                ],
6075            },
6076            {
6077                featureType: "administrative.land_parcel",
6078                elementType: "all",
6079                stylers: [
6080                    {
6081                        visibility: "on",
6082                    },
6083                    {
6084                        lightness: "80",
6085                    },
6086                ],
6087            },
6088            {
6089                featureType: "landscape",
6090                elementType: "all",
6091                stylers: [
6092                    {
6093                        saturation: "-100",
6094                    },
6095                ],
6096            },
6097            {
6098                featureType: "landscape",
6099                elementType: "labels",
6100                stylers: [
6101                    {
6102                        weight: "0.5",
6103                    },
6104                ],
6105            },
6106            {
6107                featureType: "landscape",
6108                elementType: "labels.icon",
6109                stylers: [
6110                    {
6111                        weight: "1",
6112                    },
6113                    {
6114                        visibility: "on",
6115                    },
6116                ],
6117            },
6118            {
6119                featureType: "landscape.man_made",
6120                elementType: "all",
6121                stylers: [
6122                    {
6123                        visibility: "on",
6124                    },
6125                ],
6126            },
6127            {
6128                featureType: "landscape.natural.landcover",
6129                elementType: "all",
6130                stylers: [
6131                    {
6132                        visibility: "on",
6133                    },
6134                ],
6135            },
6136            {
6137                featureType: "landscape.natural.terrain",
6138                elementType: "all",
6139                stylers: [
6140                    {
6141                        visibility: "off",
6142                    },
6143                ],
6144            },
6145            {
6146                featureType: "poi",
6147                elementType: "all",
6148                stylers: [
6149                    {
6150                        saturation: "-100",
6151                    },
6152                ],
6153            },
6154            {
6155                featureType: "poi",
6156                elementType: "geometry.fill",
6157                stylers: [
6158                    {
6159                        color: "#cccccc",
6160                    },
6161                ],
6162            },
6163            {
6164                featureType: "poi",
6165                elementType: "geometry",
6166                stylers: [
6167                    {
6168                        lightness: "21",
6169                    },
6170                    {
6171                        color: "#d6eab8",
6172                    },
6173                ],
6174            },
6175            {
6176                featureType: "poi.park",
6177                elementType: "geometry",
6178                stylers: [
6179                    {
6180                        color: "#d6eab8",
6181                    },
6182                ],
6183            },
6184            {
6185                featureType: "road",
6186                elementType: "labels.icon",
6187                stylers: [
6188                    {
6189                        saturation: "-100",
6190                    },
6191                ],
6192            },
6193            {
6194                featureType: "road.highway",
6195                elementType: "geometry.fill",
6196                stylers: [
6197                    {
6198                        color: "#e6d799",
6199                    },
6200                    {
6201                        visibility: "on",
6202                    },
6203                    {
6204                        weight: "3.00",
6205                    },
6206                ],
6207            },
6208            {
6209                featureType: "road.highway",
6210                elementType: "geometry.stroke",
6211                stylers: [
6212                    {
6213                        color: "#e6d799",
6214                    },
6215                    {
6216                        gamma: "0.6",
6217                    },
6218                ],
6219            },
6220            {
6221                featureType: "road.highway.controlled_access",
6222                elementType: "geometry",
6223                stylers: [
6224                    {
6225                        visibility: "on",
6226                    },
6227                    {
6228                        color: "#DABD7B",
6229                    },
6230                    {
6231                        weight: "4.00",
6232                    },
6233                ],
6234            },
6235            {
6236                featureType: "road.highway.controlled_access",
6237                elementType: "geometry.fill",
6238                stylers: [
6239                    {
6240                        color: "#DABD7B",
6241                    },
6242                ],
6243            },
6244            {
6245                featureType: "road.highway.controlled_access",
6246                elementType: "geometry.stroke",
6247                stylers: [
6248                    {
6249                        weight: "1",
6250                    },
6251                    {
6252                        gamma: "0.6",
6253                    },
6254                    {
6255                        color: "#DABD7B",
6256                    },
6257                ],
6258            },
6259            {
6260                featureType: "road.arterial",
6261                elementType: "geometry",
6262                stylers: [
6263                    {
6264                        color: "#aeaeae",
6265                    },
6266                    {
6267                        lightness: 18,
6268                    },
6269                    {
6270                        visibility: "on",
6271                    },
6272                ],
6273            },
6274            {
6275                featureType: "road.arterial",
6276                elementType: "geometry.stroke",
6277                stylers: [
6278                    {
6279                        color: "#b6b6b6",
6280                    },
6281                ],
6282            },
6283            {
6284                featureType: "road.local",
6285                elementType: "all",
6286                stylers: [
6287                    {
6288                        visibility: "on",
6289                    },
6290                    {
6291                        color: "#656565",
6292                    },
6293                ],
6294            },
6295            {
6296                featureType: "road.local",
6297                elementType: "geome
6297try",
6298                stylers: [
6299                    {
6300                        color: "#c6c6c6",
6301                    },
6302                    {
6303                        lightness: 16,
6304                    },
6305                ],
6306            },
6307            {
6308                featureType: "road.local",
6309                elementType: "geometry.stroke",
6310                stylers: [
6311                    {
6312                        color: "#b1b1b1",
6313                    },
6314                    {
6315                        visibility: "on",
6316                    },
6317                ],
6318            },
6319            {
6320                featureType: "road.local",
6321                elementType: "labels.text.stroke",
6322                stylers: [
6323                    {
6324                        visibility: "on",
6325                    },
6326                    {
6327                        color: "#ffffff",
6328                    },
6329                ],
6330            },
6331            {
6332                featureType: "transit",
6333                elementType: "geometry",
6334                stylers: [
6335                    {
6336                        color: "#bdbdbd",
6337                    },
6338                    {
6339                        lightness: 19,
6340                    },
6341                    {
6342                        visibility: "on",
6343                    },
6344                ],
6345            },
6346            {
6347                featureType: "water",
6348                elementType: "geometry",
6349                stylers: [
6350                    {
6351                        color: "#c0d8e3",
6352                    },
6353                    {
6354                        lightness: 17,
6355                    },
6356                    {
6357                        visibility: "on",
6358                    },
6359                ],
6360            },
6361            {
6362                featureType: "water",
6363                elementType: "labels",
6364                stylers: [
6365                    {
6366                        saturation: "-100",
6367                    },
6368                ],
6369            },
6370        ],
6371    };
6372    var map = new google.maps.Map(mapDiv, myOptions);
6373};
6374
6375function createMarker(name, latlng, icons, map) {
6376    var infoWindow = new google.maps.InfoWindow();
6377    var marker = new google.maps.Marker({
6378        position: latlng,
6379        icon: icons,
6380        map: map,
6381    });
6382    google.maps.event.addListener(marker, "click", function () {
6383        var customContent =
6384            "<div>" +
6385            name +
6386            '</div><div><a style="color: #005fee;" target="_blank" href="https://maps.google.com/?q=' +
6387            latlng.lat() +
6388            "," +
6389            latlng.lng() +
6390            '">Googleマップで見る</a></div>';
6391        infoWindow.setContent(customContent);
6392        infoWindow.open(map, marker);
6393    });
6394}
6395
6396function getZipCode() {
6397    var zipcode = $("#post_code").val();
6398
6399    if (!/^\d{3}-\d{3,4}$/.test(zipcode)) {
6400        $("#post_code").focus();
6401    } else {
6402        zipcode = zipcode.replace("-", "");
6403        call_ws_sumikae(
6404            "request/address",
6405            "GET",
6406            { zipcode },
6407            function (status, data) {
6408                if (status === 200) {
6409                    $("#address").val(decodeURIComponent(data["data"]));
6410                } else alert(data["error"]);
6411            }
6412        );
6413    }
6414}
6415
6416//method for project-property and building property
6417const NEXT_EL = 1;
6418const PREV_EL = 0;
6419function slideElementAnimation(rootElementSwipe, slideWidth, mode) {
6420    //next
6421    if (mode === NEXT_EL) {
6422        rootElementSwipe.find($(".lst_slide_img")).animate(
6423            {
6424                left: -slideWidth,
6425            },
6426            350,
6427            function () {
6428                rootElementSwipe
6429                    .find($(".lst_slide_img li:first-child"))
6430                    .appendTo(rootElementSwipe.find(".lst_slide_img"));
6431                $(".lst_slide_img").css("left", "");
6432                $(".current_img").text(
6433                    parseInt(
6434                        rootElementSwipe
6435                            .find($(".lst_slide_img li:first-child"))
6436                            .attr("data-index")
6437                    ) + 1
6438                );
6439            }
6440        );
6441    } else {
6442        rootElementSwipe.find($(".lst_slide_img")).animate(
6443            {
6444                left: +slideWidth,
6445            },
6446            350,
6447            function () {
6448                rootElementSwipe
6449                    .find($(".lst_slide_img li:last-child"))
6450                    .prependTo(rootElementSwipe.find(".lst_slide_img"));
6451                $(".lst_slide_img").css("left", "");
6452                $(".current_img").text(
6453                    parseInt(
6454                        rootElementSwipe
6455                            .find($(".lst_slide_img li:first-child"))
6456                            .attr("data-index")
6457                    ) + 1
6458                );
6459            }
6460        );
6461    }
6462}
6463function adjustImgSizeInItemList() {
6464    const imgItem = document.querySelector(".fluid_image");
6465    const imgContents = document.querySelectorAll(
6466        "#property-list .box_media__pic > span"
6467    );
6468    const imgContainers = document.querySelectorAll(
6469        "#property-list .box_media__pic > span > span"
6470    );
6471    imgContents.forEach((imgContent, idx) => {
6472        imgContent.style.height = `${(imgItem.clientWidth / 16) * 9}px`;
6473        imgContainers[idx].style.height = `${(imgItem.clientWidth / 16) * 9}px`;
6474    });
6475}
6476
6477function adjustLockerHeightPropertyItem() {
6478    const lockerEls = document.querySelectorAll(".lock-wf-member-1");
6479    lockerEls.forEach((lockerEl) => {
6480        const content = lockerEl.parentElement.querySelector(".box_media");
6481        if (content) {
6482            lockerEl.style.height = content.offsetHeight + 18 + "px";
6483        }
6484    });
6485}
6486
6487function getUrlParameter2(name) {
6488    const urlParams = new URLSearchParams(window.location.search);
6489    return urlParams.get(name);
6490}

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.