PageSourceSearch

https://mypage.otsuka-shokai.co.jp/common-s/js/_pc-main.js

js otsuka-shokai.co.jp collected 2026-09-24 08:33:44 UTC 30,519 bytes, 796 lines download raw bytes

1/**
2 * _pc-main.js
3 *
4 * __ 最終更新: 2024年8月7日 __
5 *
6 * ## このファイルの適用範囲:
7 *
8 * - このJavaScriptファイルは「PCサイト」から読み込みます。
9 *  - スマホサイトからは読み込みません。
10 *
11 * - このJavaScriptファイルは、コーポレートサイトの「すべてのページ」から共通して読み込みます。
12 *
13 *
14 * ## このファイルの用途:
15 *
16 * - このファイルは「PCサイト」でのみ利用されるオブジェクトや、タブレットメニューのような機能、ライブラリを含めることを想定しています。
17 *
18 */
19
20/**
21 * ヘッダーにあるナビゲーションとドロップダウンメニューの処理
22 */
23(function($, document) {
24
25    var mainDomain = "/" + "/ww" + "w.ots" + "uka-shok" + "ai.co.jp";
26    var mainMyPageDomain = "/" + "/mypag" + "e.otsuk" + "a-shok" + "ai.co.jp";
27    var headerGlobalDropdownMenuPath = "/common-s/parts/global-megamenu.js";
28    var headerLocalDropdownMenuPath = "/common-s/parts/global-navi.js";
29    var $keyIcon  = $('<img src="/common-cs-mypage/img/sp-cs-mypage-bg-login-before-rock-icon.png" alt="アクセス制限" class="icon-keymark">');
30    var linkExternal = false;
31    var dropdownOpenDelay = 150; // グローバルナビのドロップダウンメニューを開くまでの時間(遅延)
32
33    var utility = document.OBSJL.utility;
34    var device  = utility.getDevice;
35
36    if (document.OTS.ENV.englishFlg) return;
37
38    /**
39     * パスからサイト環境を取得
40     * @param {string} [domain] 検証するドメイン(指定しない場合は現在開いているページのドメイン)
41     * @returns {{isPublic:boolean,site:string,devType:string}}
42     *          isPublic ... 公開かどうか
43     *
44     *          site ... なんのサイトか
45     *                   corp ... コーポレート
46     *                   mypage ... マイページ
47     *                   mypage-faq ... マイページFAQ
48     *                   search ... サイト内検索
49     *                   unknown ... 不明
50     *
51     *          devType ... 検証の種類
52     *                   noren ... NORENから配信された通常の環境
53     *                   circumscription ... 外接環境
54     *                   preview ... 公開と同等の環境
55     *                   obs ... OBSテスト環境
56     */
57    var getSiteEnv = function(domain) {
58        if (typeof domain !== "string") domain = utility.server.domain();
59
60        var corpMatch      = domain.match(/^(www|(pre2-s1|devn1-www2)\.web|dev-www|otsk(-new)?)\./);
61        var mypageMatch    = domain.match(/^(dev-mypage3?|mypage|cmp-(web|extweb)-tv|otsk-mypage)\./);
62        var mypageFaqMatch = domain.match(/^(faq\.mypage|otsuka-faq-cmp--tst1?\.custhelp|otsk-faq-mypage)\./);
63        var searchMatch    = domain.match(/^((otsk-)?search)\./);
64
65        // 公開かどうか
66        var isPublic = corpMatch && corpMatch[1] === "www" ||
67            mypageMatch && mypageMatch[1] === "mypage" ||
68            mypageFaqMatch && mypageFaqMatch[1] === "faq.mypage" ||
69            searchMatch && searchMatch[1] === "search" ? true : false;
70
71        // なんのサイトか
72        var site = corpMatch ? "corp" :
73            mypageMatch ? "mypage" :
74            mypageFaqMatch ? "mypage-faq" :
75            searchMatch ? "search" : "unknown";
76
77        // 検証の種類
78        var devType  = "unknown";
79        if (corpMatch) {
80            if (corpMatch[1].match(/^pre2-s1/)) {
81                devType = "noren";
82            } else if (corpMatch[1].match(/^devn1-(www|sp)2/)) {
83                devType = "circumscription";
84            } else if (corpMatch[1].match(/^dev-(www|sp)/)) {
85                devType = "preview";
86            } else if (corpMatch[1].match(/^otsk/)) {
87                devType = "obs";
88            }
89        } else if (mypageMatch) {
90            if (mypageMatch[1] === "dev-mypage3" || mypageMatch[1] === "cmp-extweb-tv" ||
91            mypageMatch[1].match(/^otsuka-faq-cmp--tst\./)) {
92                devType = "circumscription";
93            } else if (mypageMatch[1] === "dev-mypage" || mypageMatch[1].match(/^otsuka-faq-cmp--tst1\./)) {
94                devType = "preview";
95            } else if (mypageMatch[1].match(/^otsk/)) {
96                devType = "obs";
97            }
98        } else if (searchMatch && searchMatch[1].match(/^otsk/)) {
99            devType = "obs";
100        }
101
102        return {
103            isPublic : isPublic,
104            site     : site,
105            devType  : devType
106        };
107    };
108
109    /**
110     * 公開環境ドメインを検証環境に置換
111     * @param {string}
111 domain 置換する対象の文字列
112     * @param {"corp"|"mypage"} site なんのサイトか
113     * @param {boolean} isCircumscription 外接かどうか
114     * @returns
115     */
116    var toDevDomain = function(domain, site, isCircumscription) {
117        if (site === "corp") {
118            return domain.replace("www.", isCircumscription ? "devn1-www2.web." : "dev-www.");
119        } else if (site === "mypage") {
120            domain = domain.replace("mypage.", isCircumscription ? "dev-mypage3." : "dev-mypage.");
121            return isCircumscription ? domain + ":8002" : domain;
122        }
123        return domain;
124    };
125
126    var locEnv = getSiteEnv();
127
128    // ドロップダウンメニューの読み込む環境の設定
129    if (locEnv.site !== "corp" && locEnv.devType !== "obs") {
130        linkExternal = true;
131
132        if (locEnv.isPublic) {
133            headerGlobalDropdownMenuPath = mainDomain + headerGlobalDropdownMenuPath;
134            headerLocalDropdownMenuPath = mainDomain + headerLocalDropdownMenuPath;
135        } else {
136            headerGlobalDropdownMenuPath = toDevDomain(mainDomain, "corp", locEnv.devType === "circumscription") + headerGlobalDropdownMenuPath;
137            headerLocalDropdownMenuPath = toDevDomain(mainDomain, "corp", locEnv.devType === "circumscription") + headerLocalDropdownMenuPath;
138        }
139    }
140
141    // キーアイコンの画像パス変更
142    if (!locEnv.site.match("mypage")) {
143        $keyIcon.attr("src", mainMyPageDomain + $keyIcon.attr("src"));
144    }
145
146    // スタイルのオリジナルの値を取得
147    var getStyleValue = function(element, styleName) {
148        var style;
149
150        if (!element) return "";
151
152        if (document.defaultView) {
153            style = document.defaultView.getComputedStyle(element, "");
154        } else {
155            style = element.currentStyle;
156        }
157
158        return style[styleName];
159    };
160
161    /**
162     * グローバルナビゲーション
163     * ドロップダウンメニュー
164     */
165    (function() {
166        if (device === "sp" || device === "tab") return;
167
168        var isLoggedJudged = false;
169        var isDropdownMenuLoaded = false;
170
171        // 第二階層ドロップメニューを開く
172        var showSecDropMenu = function($ctrl, $panel) {
173            $panel.attr("aria-expanded", "true");
174            $panel.parent().attr("aria-hidden", "false");
175            $ctrl.parent().addClass("active");
176        };
177
178        // 第二階層ドロップメニューを閉じる
179        var hideSecDropMenu = function() {
180            var $globalNavis = $("#header-navi-global > ul > li.active");
181
182            $globalNavis.removeClass("active");
183            $.each($globalNavis.find("> a"), function() {
184                var $panel = $("#" + $(this).attr("aria-controls"));
185
186                $panel.attr("aria-expanded", "false");
187                $panel.css("height", "");
188                $panel.parent().css("height", "");
189                $panel.parent().attr("aria-hidden", "true");
190            });
191        };
192
193        // ドロップダウンメニューの展開クラス名切り替え
194        var changeOpenedClass = function() {
195            setTimeout(function() {
196                var $headerNavGlobal = $("#header-navi-global");
197                if ($headerNavGlobal.find("li").hasClass("active")) {
198                    $headerNavGlobal.addClass("dropdown-open");
199                    $("body").addClass("global-navi-dropdown-opened");
200                } else {
201                    $headerNavGlobal.removeClass("dropdown-open");
202                    $("body").removeClass("global-navi-dropdown-opened");
203                }
204            }, 0);
205        };
206
207        // 全パネルを閉じる
208        var allClose = function() {
209            hideSecDropMenu();
210
211            var $globalNavis = $("#header-navi-global > ul > li.active");
212
213            $globalNavis.removeClass("active");
214            $.each($globalNavis.find("> a"), function() {
215                var $panel = $("#" + $(this).attr("aria-controls"));
216
217                $panel.css("height", "");
218                $panel.parent().css("height", "");
219            });
220
221            changeOverlayView(true);
222            changeOpenedClass();
223            $("body").css("height", "");
224        };
225
226        // オーバーレイの表示切り替え
227        var changeOverlayView = function(closeMode) {
228            var $overlay = $("#header-navi-menu-overlay");
229
230            if (closeMode) {
231                $overlay.attr("aria-hidden", "true");
232            } else {
233                $overlay.attr("aria-hidden", "false");
234            }
235        };
236
237        // パネルの高さの取得と設定
238        var setHeaderNaviMenuHeight = function($panel) {
239            if ($panel) {
240                $panel.css("height", "auto");
241                $panel.css("height", "");
242
243                setTimeout(function() {
244                    $panel.siblings("div").css("height", "");
245                }, 10);
246            } else {
247                $.each($("#header-navi-global li").find("a[aria-controls]"), function() {
248                    var $panel = $("#" + $(this).attr("aria-controls"));
249
250                    if ($panel.length === 0) return true;
251                    if ($panel.is("[aria-expanded=false]")) return true;
252
253                    setHeaderNaviMenuHeight($panel);
254                });
255            }
256        };
257
258        /**
259         * ドロップダウンメニュー設置
260         */
261        var setDropDownMenu = function() {
262            var megaMenuTmpl = document.otsHeaderGlobalNaviDropDown2ndHtml;
263            var megaMenuCSS  = document.otsHeaderGlobalNaviDropDownCss;
264
265            if (linkExternal) {
266                if (locEnv.isPublic) {
267                    megaMenuTmpl = megaMenuTmpl.replace(/(src)=\"(\/[a-zA-Z])/g, "$1=\"" + mainDomain + "$2");
268                    megaMenuCSS = megaMenuCSS.replace(/(url\()(\/[a-zA-Z])/g, "$1" + mainDomain + "$2");
269                } else {
270                    megaMenuTmpl = megaMenuTmpl.replace(/(src)=\"(\/[a-zA-Z])/g, "$1=\"" + toDevDomain(mainDomain, "corp", locEnv.devType === "circumscription" || locEnv.devType === "noren") + "$2");
271                    megaMenuCSS = megaMenuCSS.replace(/(url\()(\/[a-zA-Z])/g, "$1" + toDevDomain(mainDomain, "corp", locEnv.devType === "circumscription" || locEnv.devType === "noren") + "$2");
272                }
273            }
274
275            $("head").append(megaMenuCSS);
276            $("#header-navi-global").after(megaMenuTmpl);
277
278            $("#header-navi .header-navi-inner").append($('<div id="header-navi-menu-overlay" aria-hidden="true"></div>'));
279
280            // リンクを絶対パスに置換
281            $.each($("#header-navi-menu a"), function() {
282                if ($(this).attr("href").match(/^(https?:)?\/\//)) return true;
283
284                var href = $(this).attr("href");
285
286                if ($(this).parents("#header-navi-menu-mypage").length === 0) {
287                    if (linkExternal) {
288                        if (locEnv.isPublic) {
289                            $(this).attr("href", mainDomain + href);
290                        } else {
291                            $(this).attr("href", toDevDomain(mainDomain, "corp", locEnv.devType === "circumscription") + href);
292                        }
293                    }
294                } else if (!locEnv.site.match("mypage")) {
295                    if (locEnv.isPublic) {
296                        href = mainMyPageDomain + href;
297                    } else {
298                        href = "https:" + toDevDomain(mainMyPageDomain, "mypage", locEnv.devType === "circumscription" || locEnv.devType === "noren") + href;
299                    }
300
301                    $(this).attr("href", href);
302                }
303            });
304
305            if (isLoggedJudged || $("body").hasClass("otsukaid-view-show")) {
306                mypageElemHide();
307            }
308        };
309
310        /**
311         * 大塚IDログイン時は一部の領域を非表示
312         * @param {*} [data] ログイン情報
313         */
314        var mypageElemHide = function(data) {
315            if (!data || data.result === "0") {
316                isLoggedJudged = true;
317                $("#header-navi-menu .not-logged-in-ots").hide();
318            }
319        };
320
321        /**
322         * セットアップ
323         */
324        var setup = function() {
325            var $globalNavis  = $("#header-navi-global li");
326            var isClickOpened = false;
327
328            // グローバルナビゲーションから第二階層メニューを開く
329            $globalNavis.on({
330                "click" : function() {
331                    if ($("#" + $(this).find("a").attr("aria-controls")).length === 0) return true;
332                    if ($(this).hasClass("current")) return true;
333
334                    if (!isClickOpened) {
335                        isClickOpened = true;
336                        $(this).trigger("mouseenter");
337                        return false;
338                    }
339                },
340
341                "mouseenter" : function() {
342                    if (!isClickOpened) return false;
343                    if ($(this).hasClass("current")) return false;
344
345                    var $anchor = $(this).find("a");
346                    var $panel = $("#" + $anchor.attr("aria-controls"));
347
348                    if ($(this).hasClass("active")) return false;
349
350                    if ($panel.length === 0) {
351                        return false;
352                    } else {
353                        hideSecDropMenu();
354                    }
355
356                    showSecDropMenu($anchor, $panel);
357                    setHeaderNaviMenuHeight($panel);
358                    changeOverlayView(false);
359                    changeOpenedClass();
360
361                    return false;
362                }
363            });
364
365            // 閉じるボタンクリック時
366            $("#header-navi-menu .close-dropdown-button").on("click", function() {
367                isClickOpened = false;
368                allClose();
369            });
370
371            // ドロップダウンメニュー以外クリック時
372            $(document).on("click", function(event) {
373                if ($(event.target).parents("#header-navi-menu").length === 0) {
374                    isClickOpened = false;
375                    allClose();
376                }
377            });
378
379            $(window).on("scroll", function() {
380                if (isClickOpened) {
381                    var $overlay  = $("#header-navi-menu-overlay");
382                    var scrollTop = $(window).scrollTop();
383
384                    if (scrollTop < 42) {
385                        $overlay.css("top", 42 - scrollTop);
386                    } else {
387                        $overlay.css("top", 0);
388                    }
389                }
390            });
391
392            // 第二階層ドロップダウンメニューのアニメーション終了時
393            $.each($globalNavis, function() {
394                var $panel = $("#" + $(this).find("a").attr("aria-controls"));
395
396                if ($panel.length === 0) return true;
397            });
398
399            $(document).on("changeFontSize", function() {
400                setHeaderNaviMenuHeight();
401            });
402        };
403
404        $(document).on("completedOtsukaId", function(event, data) {
405            mypageElemHide(data);
406        });
407
408        $.getScript(headerGlobalDropdownMenuPath).done(function() {
409            isDropdownMenuLoaded = true;
410
411            if ($("#wrap").length > 0) {
412                setDropDownMenu();
413                setup();
414            }
415        });
416
417        $(function() {
418            if (isDropdownMenuLoaded) {
419                setDropDownMenu();
420                setup();
421            }
422        });
423    })();
424
425    /**
426     * ヘッダーローカルナビ
427     * リンク領域の拡大
428     */
429    $(function() {
430        var $headerLocalNavis = $("#header-navi-local .header-navi-local-inner > ul > li");
431
432        $headerLocalNavis.on("click", function(e) {
433            if ($(e.target).hasClass("global-dropdown") ||
434                $(e.target).parents().hasClass("global-dropdown") ||
435                $(e.target).hasClass("local-dropdown") ||
436                $(e.target).parents().hasClass("local-dropdown") ||
437                $(e.target).hasClass("mega-dropdown-menu") ||
438                $(e.target).parents().hasClass("mega-dropdown-menu")) return true;
439
440            var $anchorObj = $(this).find("> a").eq(0);
441            var hrefVal    = $anchorObj.attr("href");
442            var targetVal  = ($anchorObj.attr("target") === "_blank") ? true : false;
443
444            if (targetVal) {
445                window.open(hrefVal, "_blank");
446            } else {
447                window.location = hrefVal;
448            }
449
450            return false;
451        });
452    });
453
454    /**
455     * ヘッダーローカルナビ
456     * ドロップダウンメニュー
457     */
458    (function() {
459        var isDropdownMenuLoaded        = false;
460        var isProcessAfterLoadedProcess = false;
461        var isDomLoaded                 = false;
462        var $localNaviBox               = null;
463        var $localNavis                 = null;
464        var sid                         = null;
465
466        /* ドロップダウンメニュー設置 */
467        var setDropDownMenu = function() {
468            var dropDownMenuTmpl  = document.otsHeaderGlobalNaviHtml;
469            var $dropDownMenuTmpl = null;
470
471            if (linkExternal) {
472                dropDownMenuTmpl = dropDownMenuTmpl.replace(/(href|src)=\"(\/[a-zA-Z])/g, "$1=\"" + mainDomain + "$2");
473            }
474
475            $dropDownMenuTmpl = $(dropDownMenuTmpl);
476
477            $.each($localNavis, function() {
478                var classVal  = $(this).attr("class") || "";
479                var classVals = classVal.split(" ");
480
481                var hasClassVal = $.grep(classVals, function(classVal) {
482                    return (classVal.match(/(products|cs|corp)-/));
483                });
484
485                if (hasClassVal.length === 0) return true;
486
487                $(this).append($dropDownMenuTmpl.find("." + hasClassVal[0]));
488            });
489
490            if ($localNavis.find(".local-dropdown").length > 0) {
491                $(document).trigger("completeLocalDropdown");
492            }
493        };
494
495        /*
496         * ローカルドロップダウンメニューの最大幅(960px)の折り返し対応
497         */
498        var setDropDownOuter = function() {
499            var $localDropDown     = $("#header-navi .header-navi-local-inner .local-dropdown");
500            var $localDropDownWrap = $("<div>").addClass("local-dropdown-outer");
501
502            $localDropDown.wrap($localDropDownWrap);
503
504            $.each($localDropDown, function() {
505                if ($(this).find(".dropdown-column").length > 1) {
506                    $(this).find(".local-dropdown-inner").addClass("dropdown-columns");
507                }
508            });
509        };
510
511        /* ドロップダウンの位置を揃える
512            ※ IEではpositionの100%とする領域が異なること、
513               ブラウザ全体でカレント時のborderが100%に含まれなくズレが発生する為の処理 */
514        var dropDownMenuSetPosition = function() {
515            var localDropdownSetTop = function() {
516                var headerLocalNaviHeight = getStyleValue($localNaviBox.get(0), "height");
517
518                if (!headerLocalNaviHeight || headerLocalNaviHeight === "auto") {
519                    headerLocalNaviHeight = $localNaviBox.height() - 1;
520                } else {
521                    headerLocalNaviHeight = parseInt(headerLocalNaviHeight) - 1;
522                }
523
524                $localNavis.find(".local-dropdown-outer").css("top", headerLocalNaviHeight + "px");
525            };
526
527            localDropdownSetTop();
528
529            $(document).on("changeFontSize", function() {
530                localDropdownSetTop();
531            });
532        };
533
534        /* マウスカーソルの斜め移動対応 */
535        var headerLocalNaviAIM = function() {
536            $localNaviBox.on({
537                "mouseenter" : function() {
538                    $localNaviBox.addClass("over");
539                },
540                "mouseleave" : function() {
541                    $localNaviBox.removeClass("over");
542                }
543            });
544
545            $localNaviBox.menuAim({
546                rowSelector      : "> li",
547                submenuDirection : "below",
548                activate         : function(row) {
549                    if ($localNaviBox.hasClass("over")) {
550                        if ($(row).find(".local-dropdown").length > 0) {
551                            $(row).find(".local-dropdown").show();
552                            $(row).addClass("show");
553                        }
554                        $(row).addClass("hover");
555                    } else {
556                        sid = setTimeout(function() {
557                            if ($(row).find(".local-dropdown").length > 0) {
558                                $(row).find(".local-dropdown").show();
559                                $(row).addClass("show");
560                            }
561                            $(row).addClass("hover");
562                        }, dropdownOpenDelay);
563                    }
564                },
565                deactivate       : function(row) {
566                    clearTimeout(sid);
567                    $(row).find(".local-dropdown").hide();
568                    $(row).removeClass("show").removeClass("hover");
569                },
570                exitMenu         : function() { return true; }
571            });
572        };
573
574        /**
575         * ドロップダウンメニュー読み込み後の処理
576         */
577        var processAfterLoaded = function() {
578            $localNaviBox = $("#header-navi-local .header-navi-local-inner > ul");
579            $localNavis   = $localNaviBox.find("> li");
580
581            if ($localNaviBox.length === 0) return;
582
583            if (locEnv.site.match("mypage") && $("#wrap").hasClass("promo")) {
584                setDropDownMenu();
585                setDropDownOuter();
586                dropDownMenuSetPosition();
587                headerLocalNaviAIM();
588            }
589
590            isProcessAfterLoadedProcess = true;
591        };
592
593        if (device === "other") {
594            $.getScript(headerLocalDropdownMenuPath).done(function() {
595                isDropdownMenuLoaded = true;
596                if (isDomLoaded && !isProcessAfterLoadedProcess) processAfterLoaded();
597            });
598
599            $(function() {
600                isDomLoaded = true;
601                if (isDropdownMenuLoaded && !isProcessAfterLoadedProcess) processAfterLoaded();
602            });
603        }
604    })();
605})(jQuery, document);
606
607/**
608 * ヘッダーローカルナビ
609 * カレント処理
610 */
611(function($) {
612    $(function() {
613        var id = $("input[name=global-navi-current-item-id]").val();
614
615        if (id) {
616            id = id.replace(/0$/, "1").replace(/-([0-9]{1})$/, "-0$1");
617
618            var $targetNavItem = $("#header-navi-local .header-navi-local-inner > ul > li").filter("." + id);
619
620            $targetNavItem.addClass("current");
621
622        } else if (!location.href.replace(/(index\.html)?[#\?].*?$/, "").replace("index.html").split("/")[3]) {
623            $("#header-navi-local .header-navi-local-inner > .cs-mypage-home").addClass("current");
624        }
625    });
626})(jQuery);
627
628/**
629 * 共通ヘッダーの表示切り替え
630 */
631(function($) {
632    if (typeof getHojinName === "undefined") return;
633    if (typeof getSimeiSei === "undefined") return;
634    if (typeof getSimeiMei === "undefined") return;
635
636    $(function() {
637
638        var companyName = getHojinName();
639        var firstName   = getSimeiMei();
640        var lastName    = getSimeiSei();
641
642        var $otsIdHeader = $(".otsukaid-header");
643        var $companyName = $("#hojinMei");
644        var $name        = $("#simei");
645        var $firstName   = $("#hSimeiMei");
646        var $lastName    = $("#hSimeiSei");
647
648        var loginType = $("#loginUserShubetsu").val();
649
650        if (loginType) {
651            switch (loginType) {
652                case "01" :
653                    $companyName.text(companyName + " ");
654                    $firstName.text(firstName);
655                    $lastName.text(lastName);
656                    break;
657                case "03" :
658                case "05" :
659                    companyName = "";
660                    break;
661                default :
662                    $companyName.text(companyName + " ");
663                    break;
664            }
665
666            if (loginType !== "01") {
667                $otsIdHeader.find("li").eq(0).text("大塚ID以外 でログイン中");
668                $name.unwrap();
669                firstName = "";
670                lastName  = "";
671            }
672        }
673
674        $otsIdHeader.attr({
675            userShubetsu : loginType,
676            kigyoCdFlg : $("#kigyoCdFlg").val()
677        }).css("opacity", 1);
678
679        if (!companyName && !firstName && !lastName) $companyName.parents("li").remove();
680        if (!companyName) $companyName.remove();
681        if (!firstName && !lastName) $name.remove();
682    });
683})(jQuery);
684
685/**
686 * フローティングバナー
687 */
688(function($) {
689    var $partsFloating = $(".parts-floating");
690    var $loginUserStatus = $("#loginUserShubetsu");
691
692    // 完了画面以外、またはログインユーザーが大塚ID以外には出力しない
693    if($partsFloating.length === 0 || $loginUserStatus.val() !== "01") return;
694
695    var $wd = $(window);
696    var $pageTop = $("#pagetop");
697    var floatingMarginLeft = parseInt($partsFloating.css("margin-left"));
698    var partsFloatingHeight = $partsFloating.outerHeight();
699
700    // 閉じるボタン
701    var $closeButtonBox = $("<button>");
702    $closeButtonBox.addClass("button-close").attr("type", "button").text("閉じる");
703    $partsFloating.find(".parts-floating-content").prepend($closeButtonBox);
704
705    // 閉じるボタンクリック
706    $closeButtonBox.on("click", function(){
707        $partsFloating.fadeOut("", function(){
708            $pageTop.removeClass("position-up");
709        });
710    });
711
712    // フローティング表示(画像の読み込み遅延対策のため、load)
713    $wd.on("load", function(){
714        setTimeout(function(){
715            $pageTop.addClass("position-up");
716            $partsFloating.animate({
717               "top": window.innerHeight - partsFloatingHeight
718            }, 200);
719        }, 2000);
720    });
721
722    // ウインドウサイズ縦変更時、位置調整(常にウインドウの一番下に付くようにする)
723    $wd.resize(function() {
724        $partsFloating.css({"top": window.innerHeight - partsFloatingHeight + "px"});
725    });
726
727    // PCのみでウインドウリサイズ時の位置調整
728    if(document.OBSJL.utility.getDevice === "other"){
729        // 横スクロール発生時、位置調整
730        $wd.scroll(function() {
731            var mainW = $("#wrap").width();
732
733            $partsFloating.css({"margin-left": floatingMarginLeft + "px"});
734            if($wd.width() < mainW){ //ウインドウサイズがメイン部より狭い時、右メニューマージンを計算
735                $partsFloating.css({"margin-left": floatingMarginLeft - $wd.scrollLeft() + "px"});
736            }
737        });
738    }
739})(jQuery);
740
741/**
742 * フローティングバナー(AT連携)
743 */
744(function($) {
745    /**
746     * Cookieの基本設定
747     */
748    var baseCookieSettings = {
749        name   : "otsFloatingBannerAT",
750        domain : ".otsuka-shokai.co.jp",
751        path   : "/"
752    };
753
754    // タイムアウト
755    var timeout = 10000;
756
757    if ($.cookie(baseCookieSettings.name)) return;
758
759    $(function() {
760        if ($(".mboxDefault, [data-at-mbox-name]").length === 0) return;
761
762        var sid = setInterval(function() {
763            var startTime  = new Date().getTime();
764
765            if (new Date().getTime() - startTime >= timeout) clearInterval(sid);
766
767            var $floating = $("[data-at-mbox-name] .boxes-floating-banner");
768
769            if ($floating.length === 0) return;
770
771            clearInterval(sid);
772
773            var cookieSettings = {};
774
775            var closeLimit = $floating.attr("data-close-limit");
776            if (closeLimit === "session") cookieSettings.expires = "";
777            if (closeLimit.match(/^[0-9]+$/)) cookieSettings.expires = Number(closeLimit);
778
779            $(window).on("scroll.contactFloating resize.contactFloating orientationchange.contactFloating", function() {
780                $floating.attr("aria-hidden", $(window).scrollTop() > 0 ? "false" : "true");
781            }).trigger("scroll.contactFloating");
782
783            $floating.find(".button-close").on("click", function() {
784                $floating.fadeOut(400);
785
786                if (typeof cookieSettings.expires === "undefined") return true;
787
788                $.cookie(baseCookieSettings.name, "closed", {
789                    domain  : baseCookieSettings.domain,
790                    path    : baseCookieSettings.path,
791                    expires : cookieSettings.expires
792                });
793            });
794        });
795    });
796})(jQuery);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.