<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">const commonCtl = {};

var $ = 123;

// $= jQuery;

(function($){

    window.onunload = function () {};

    // SPåˆ¤å®šã®æ¨ªå¹…
    commonCtl.breakPoint = 767;

    $(document).ready(function(){
        $("label").click(function() {});
        //    $("input:text"). disableEnter(); // enterç¦æ­¢

        commonCtl.imgTextize();
        commonCtl.imgSwitch();
        commonCtl.agentcheck();
        // commonCtl.init();
        // commonCtl.spSideNavigation();
        // commonCtl.listViewChange();
        commonCtl.pagetop();
        commonCtl.spPhoneChange();
        commonCtl.jsLink();

        $('.drawer').drawer();
        $('.drawer-menu-item').on('click', function(){
            var parentMenu = $(this).parents(".drawer-dropdown");
            if(parentMenu.hasClass("open")){
                parentMenu.removeClass("open");
            }else{
                parentMenu.addClass("open");
            }
        });

        $('.inview').on('inview', function() {
            $(this).addClass("confirmed");
        });
    });

    $(window).on('load', function(){
        // commonCtl.init();
    });

    /*--------------------------------------------------
    init
    ----------------------------------------------------*/
    commonCtl.init=function(){

        // tilejs
        // commonCtl.tile("#case1 ul.items li a" , 2 ,1);
        // commonCtl.tile("#case3 ul.items li a" , 2 ,1);

    }

    /*--------------------------------------------------
    jsLink
    ----------------------------------------------------*/
    commonCtl.jsLink=function(){

        $('.js-link').on('click', function(e){
            // ä¼æ’­ã‚’ã‚¹ãƒˆãƒƒãƒ—
            e.stopPropagation();
            e.preventDefault();

            //ãƒªãƒ³ã‚¯ã‚’å–å¾—ã—ã¦é£›ã°ã™
            location.href = $(this).attr('data-href');
        });

    }
    /*--------------------------------------------------
    ç”»åƒæ¨ªã«ãƒ†ã‚­ã‚¹ãƒˆã‚’
    ----------------------------------------------------*/
    commonCtl.imgTextize= function(){
        $("img.txtimg").each(function() {
            var alt=$(this).prop("alt");
            $(this).after('&lt;span class="textized"&gt;'+alt+'&lt;/span&gt;');
        });
    }
    /*--------------------------------------------------
     ã‚¹ãƒžãƒ›ãƒ»PCç”»åƒç½®ãæ›ãˆ
    ----------------------------------------------------*/
    commonCtl.imgSwitch= function(){
        var $setElem = $('img.switch'),
        pcName = '_pc',
        spName = '_sp',
        replaceWidth = commonCtl.breakPoint;

        $setElem.each(function(){
            var $this = $(this);
            function imgSize(){
                var windowWidth = parseInt($(window).width());
                if(windowWidth &gt;= replaceWidth) {
                    $this.attr('src',$this.attr('src').replace(spName,pcName)).css({visibility:'visible'});
                } else if(windowWidth &lt; replaceWidth) {
                    $this.attr('src',$this.attr('src').replace(pcName,spName)).css({visibility:'visible'});
                }
            }
            $(window).resize(function(){imgSize();});
            imgSize();
        });
    }

    /*--------------------------------------------------
     é›»è©±ç•ªå·ã®ã‚¢ãƒ³ã‚«ãƒ¼ç½®ãæ›ãˆ
    ----------------------------------------------------*/
    commonCtl.spPhoneChange= function(){
        var $setElem = $('a.phone'),
        noClass = 'noanchor',
        replaceWidth = commonCtl.breakPoint;
        var pcHref = "javascript:void(0);";

        $setElem.each(function(){
            var $this = $(this);
            var originalHref = $this.attr('href');
            function change(){
                var windowWidth = parseInt($(window).width());
                if(windowWidth &gt;= replaceWidth) {
                    $this.addClass(noClass);
                    $this.attr('href',pcHref);
                } else if(windowWidth &lt; replaceWidth) {
                    $this.removeClass(noClass);
                    $this.attr('href',originalHref);
                }
            }
            $(window).resize(function(){change();});
            change();
        });
    }
    /*--------------------------------------------------
     agentcheck
    ----------------------------------------------------*/
    commonCtl.agent = "";
    commonCtl.agentcheck= function(){

        if(navigator.userAgent.indexOf('iPhone') &gt; 0 || navigator.userAgent.indexOf('iPod') &gt; 0 || (navigator.userAgent.indexOf('Android') &gt; 0 &amp;&amp; navigator.userAgent.indexOf('Mobile') &gt; 0)){
            commonCtl.agent = "sp";
        } else if(navigator.userAgent.indexOf('iPad') &gt; 0 || (navigator.userAgent.indexOf('Android') &gt; 0 &amp;&amp; navigator.userAgent.indexOf('Mobile') == -1) || navigator.userAgent.indexOf('A1_07') &gt; 0 || navigator.userAgent.indexOf('SC-01C') &gt; 0){
            commonCtl.agent = "tb";
        }else{
            commonCtl.agent = "pc";
        }
    }


    /*
     è¦‹ãŸç›®åˆ‡ã‚Šæ›¿ãˆ
    ------------------------------------------------- */
    commonCtl.listViewChange= function(){
        $("ul.operation li a").click(
            function(){
                var mode = $(this).attr("data-view");
                var target = $(this).parents("ul.operation").next();
                if(mode){
                    target.removeClass(target.attr('class')).addClass("list " + mode);

                }
            }
        );
    }
    /*--------------------------------------------------
    ã‚¹ãƒžãƒ›ãƒãƒ³ãƒãƒ¼ã‚¬ãƒ¼ãƒ¡ãƒ‹ãƒ¥ãƒ¼åˆ¶å¾¡
    ----------------------------------------------------*/
    commonCtl.spSideNavigation= function(options){

        var width = $(window).width();

        var c = $.extend({
                    postfix: '-close'
                }, options);

        var navi    = $("#globalNavigation");
        var naviBtn = $("#top .menu");
        var closeBtn = $("#globalNavigation p.close");
        var originalSrc    = naviBtn.find("img").attr('src');
        var openClass = "open"; // ã‚ªãƒ¼ãƒ—ãƒ³ã—ãŸã¨ãã®classå
        if(originalSrc){
            var rolloverSrc = originalSrc.replace(new RegExp('('+c.postfix+')?(\.gif|\.jpg|\.png)$'), c.postfix+"$2");
        }

        naviBtn.click(
            function(){
                if(navi.hasClass(openClass)){
                    navi.slideUp(500 ,"easeInOutCirc", function(){ navi.removeClass(openClass) });
                    //$('#navi-overlay').remove();
                    if(originalSrc){
                        $(this).find("img").attr({'src' : originalSrc});
                    }else{
                        $(this).removeClass(openClass);
                    }
                }else{
                    navi.slideDown(500 ,"easeInOutCirc", function(){ navi.addClass(openClass) });
                    $//("#top").after("&lt;div id='navi-overlay'&gt;&lt;/div&gt;");
                    if(rolloverSrc){
                        $(this).find("img").attr({'src' : rolloverSrc});
                    }else{
                        $(this).addClass(openClass);
                    }
                }
            }
        );


        closeBtn.click(
            function(){
                navi.removeClass(openClass).slideUp(500,"easeInOutCirc");
                //$('#navi-overlay').remove();
                if(originalSrc){
                    naviBtn.find("img").attr({'src' : originalSrc});
                }else{
                    naviBtn.removeClass(openClass);
                }
            }
        );


        if(commonCtl.agent == "pc"){
            $(window).resize(function(){
                var width = $(window).width();
                if(width &lt;= commonCtl.breakPoint){
                    navi.slideUp(500 ,"easeInOutCirc", function(){ navi.removeClass(openClass) });
                    //$('#navi-overlay').remove();
                }else{
                    navi.slideDown(500 ,"easeInOutCirc", function(){ navi.addClass(openClass) });
                }
                if(originalSrc){
                    naviBtn.find("img").attr({'src' : originalSrc});
                }else{
                    naviBtn.removeClass(openClass);
                }
            });
        }



    }


    /*--------------------------------------------------
     pagetop
    ----------------------------------------------------*/
    commonCtl.pagetop= function(){
        var pageTop = $('footer .pagetop');
        pageTop.hide();
        $(window).scroll(function () {
            if ($(this).scrollTop() &gt; 400) {
                pageTop.fadeIn();
            } else {
                pageTop.fadeOut();
            }


        });
        pageTop.click(function () {
            $('body, html').animate({scrollTop:0}, 500, 'swing');
            return false;
        });
    }


    /*--------------------------------------------------
     tile
    ----------------------------------------------------*/
    commonCtl.tile=function(selecter , pc_num , sp_num){

        $(window).resize(function(){
            tile(selecter , pc_num , sp_num);
        });
        function tile(selecter , pc_num , sp_num){
            var width = $(window).width();
            var tile_num = pc_num;
            if(width &lt; commonCtl.breakPoint){
                tile_num = sp_num;
            }
            $(selecter).tile(tile_num);
        }
        tile(selecter , pc_num , sp_num);
    }


    /*--------------------------------------------------
    ãƒˆã‚°ãƒ«ã®å‹•ã
    ----------------------------------------------------*/
    commonCtl.toggle= function(selecter , clicker , mode){

        if(!mode) mode = "next";
        var selecter = $(selecter);
        selecter.on("click", function() {
            if(mode == "prev"){
                $(this).prev().slideToggle();
            }else{
                $(this).next().slideToggle();
            }
            $(this).toggleClass("open");
        });

        var get = new $.yuga.getRequest();
        if(get["id"]){
            $("#" + get["id"] + " " . clicker).trigger('click');
        }
    }


    /*--------------------------------------------------
    é¸æŠžã—ã§é–‹ã‘é–‰ã‚
    ----------------------------------------------------*/
    commonCtl.accordionBox=function(_radioName , _radioValue , _hiddenArea){
        var radioName = "input[name='" + _radioName +"']";
        var hiddenArea = (_hiddenArea) ? $(_hiddenArea) : $(".hiddenBox");
        var radioValue = (_radioValue) ? _radioValue : "1";
        hiddenArea.css("display","none");

        if($( radioName + ":checked").val()== radioValue){
            hiddenArea.slideDown("500");
        }else{
            hiddenArea.slideUp("500");
        }

        $(radioName).click(function(){
            if($(this).val()==radioValue){
                hiddenArea.slideDown("500");
            }else{
                hiddenArea.slideUp("500");
            }
        });
    }

    /*--------------------------------------------------
    å…¥åŠ›å¾Œè¤‡å†™
    ----------------------------------------------------*/
    commonCtl.copyInput=function(_from , _to){
        var fromInput = $(_from);
        var toInput = $(_to);

        fromInput.change(function () {
            let fromValue = fromInput.val();
            let toValue = toInput.val();
            if(fromValue != null &amp;&amp; fromValue != "" &amp;&amp;
                (toValue == null || toValue == "")){
                toInput.val(fromInput.val());
            }
        });
    }
    /*--------------------------------------------------
    getFormData
    ----------------------------------------------------*/
    commonCtl.getFormData = function ($target) {
        var data = {};
        var func_set_data = function (key, value, is_array) {
            if (is_array) {
                data[key].push(value);
            } else {
                data[key] = value;
            }
        };
        $target.find("input").each(function () {
            var is_array = false;
            var key = this.name;
            if (key.substr(-2) == "[]") {
                is_array = true;
                key = key.substr(0, key.length - 2);
                if (typeof data[key] == "undefined") {
                    data[key] = [];
                }
            }

            switch (this.type.toLowerCase()) {
            case "radio":
                if (this.checked) {
                  func_set_data(key, this.value, is_array);
                }
            break;
            case "checkbox":
                if (this.checked) {
                  func_set_data(key, this.value, is_array);
                }
            break;
            case "submit":
            case "button":
            case "image":
            case "file":
            break;
            default:
                func_set_data(key, this.value, is_array);
            break;
            }
        });
        $target.find("select").each(function () {
          var is_array = false;
          var key = this.name;
          if (key.substr(-2) == "[]") {
            is_array = true;
            key = key.substr(0, key.length - 2);
            if (typeof data[key] == "undefined") {
              data[key] = [];
            }
          }
          func_set_data(key, $(this).val(), is_array);
        });
        $target.find("textarea").each(function () {
          var is_array = false;
          var key = this.name;
          if (key.substr(-2) == "[]") {
            is_array = true;
            key = key.substr(0, key.length - 2);
            if (typeof data[key] == "undefined") {
              data[key] = [];
            }
          }
          func_set_data(key, $(this).val(), is_array);
        });
        return data;
    }

})(jQuery);
</pre></body></html>