PageSourceSearch

https://www.city.fukushima.fukushima.jp/theme/base/js/common.js

js city.fukushima.fukushima.jp collected 2026-10-02 05:30:29 UTC 26,854 bytes, 753 lines download raw bytes

1/**
2 * 全デザインサイト共通JS
3 * @author nagai
4 * @version 1.0
5 */
6$(function(){
7
8      // 伝えるウェブ:読み上げ
9      $('.js-speach-toggle,.speach-area-close').on('click', function(e){
10        $('#speach-area').toggleClass('is-active');
11      });
12      $('.js-speach-toggle').on('click', function() {
13        if($('#speach-area').hasClass('is-active')) {
14          $('.speach-area-close').trigger('focus');
15        }
16        $('.btn-support-close').trigger('click');
17        $('.btn-support-sp-close').trigger('click');
18      });
19      // 伝えるウェブ(ページ内埋め込み版):ルビふり
20      $('.js-ruby-add').on('click', function() {
21        if(__tsutaeruMO.active){ __tsutaeruMO.reset() }
22        __tsutaeruMO.start({mode:'ruby'});
23        $('.js-ruby-add').addClass('is-hide');
24        $('.js-ruby-remove').removeClass('is-hide');
25        waitForExternalChanges(function(){_eqGroupHeight()});
26      });
27      $('.js-ruby-remove').on('click', function() {
28        __tsutaeruMO.reset();
29        waitForExternalChanges(function(){_eqGroupHeight()});
30      });
31      // 伝えるウェブ(ページ内埋め込み版):やさしい日本語
32      $('.js-easy-add').on('click', function() {
33        if(__tsutaeruMO.active){ __tsutaeruMO.reset() }
34        __tsutaeruMO.start();
35        $('.js-easy-add').addClass('is-hide');
36        $('.js-easy-remove').removeClass('is-hide');
37        waitForExternalChanges(function(){_eqGroupHeight()});
38      });
39      $('.js-easy-remove').on('click', function() {
40        __tsutaeruMO.reset();
41        waitForExternalChanges(function(){_eqGroupHeight()});
42      });
43    
44      //modeで判断して、ボタンの表示を切り替える
45      window.addEventListener('load', function(){
46        if(__tsutaeruMO.config.mode == 'ruby'){
47          $('.js-ruby-add').addClass('is-hide');
48          $('.js-ruby-remove').removeClass('is-hide');
49          $('.js-easy-add').removeClass('is-hide');
50          $('.js-easy-remove').addClass('is-hide');
51          waitForExternalChanges(function(){_eqGroupHeight()});
52        } else if (__tsutaeruMO.config.mode == 'easy') {
53          $('.js-easy-add').addClass('is-hide');
54          $('.js-easy-remove').removeClass('is-hide');
55          $('.js-ruby-add').removeClass('is-hide');
56          $('.js-ruby-remove').addClass('is-hide');
57          waitForExternalChanges(function(){_eqGroupHeight()});
58        } else {
59          $('.js-ruby-add').removeClass('is-hide');
60          $('.js-ruby-remove').addClass('is-hide');
61          $('.js-easy-add').removeClass('is-hide');
62          $('.js-easy-remove').addClass('is-hide');
63          waitForExternalChanges(function(){_eqGroupHeight()});
64        }
65      });
66
67  // 翻訳プルダウン
68  $('.js-btn-lang-select').on('click', function() {
69    var lang = $(this).parent().find('select[name=translate]').val();
70    if (lang === "#") {
71      $(this).closest('.header-lang-wrapper').find('.lang-error').show();
72    } else {
73      window.location.href = lang;
74    }
75  });
76  
77  //スムーズスクロール
78  $("a[href*='#'].scroll").smoothScroll();
79
80  //ファイルリンクは別窓表示
81  //$("a[href*='.*']").fileBlank('*') セレクタで拡張子指定 fileBlankの引数にクラス指定;
82  $("a[href*='.pdf']").fileBlank('pdf');
83  $("a[href*='.doc']").fileBlank('word');
84  $("a[href*='.xls']").fileBlank('excel');
85
86  // ファイルリンクのクリックイベント計測
87  $('.file-link-item a').on('click',function(){
88    var targetUrl = $(this).attr('href');
89    var targetLabel = $(this).text();
90    // gtag未定義の場合は実行しない(GA4)
91    if(typeof gtag == 'function'){
92      gtag('event', 'sv_file_link_click', {
93        'event_category': 'file_download_category',
94        'event_label': targetLabel + ':' + targetUrl,
95        'value': 1
96      });
97    }
98  });
99
100  //ロールオーバー画像
101  $("img[src*='_off.']").rollOver({off:'_off.',on:'_on.'});
102
103
104  //tableのalign属性削除
105  $.fn.tableDeleteAlign();
106
107
108  // 元のページに戻るリファラーを自動でつける
109  $("a[href*=inquiryId]").each(function() {
110    var a = $(this);
111    var url = a.attr("href");
112    var locaUrl = location.pathname;
113    a.attr("href", url.replace(/(Init\.do\?inquiryId=[0-9]+)/, '$1&ref=www.xxxx.xxxx.xxxx.jp' + locaUrl) );
114  });
115
116
117  var location_href = location.href;
118  var now_site_domain;
119
120  if(location_href.indexOf('http://') != -1 || location_href.indexOf('https://') != -1){
121    var replace_site_domain = site_domain + '/';
122    var now_site_domain = replace_site_domain.replace( /http:/g , "" ).replace( /https:/g , "" );
123  }else{
124    now_site_domain = '';
125  }
126
127  //文字サイズ変更
128  if ($('.scsize').length) {
129    $.fn.fontSizeSwitch();
130  }
131
132  //背景色変更
133  if ($('.sccolor').length) {
134    $.fn.bgColorSwitch();
135  }
136
137  // ヘッダーナビのドロップメニュ
138  if (typeof $.fn.dropMenu != 'undefined') {
139    $("#header-nav").dropMenu();
140  }
141
142  // 文字サイズ変更監視
143  $.fn.fontSizeChange({func:function(){
144    //$("#header-nav .list2").eqGroupHeight(3);
145    $("#wrapper").show();
146  }});
147
148  // スマホメニュー内のアコーディオン
149  $('.sp-nav .box button').on('click', function() {
150    $(this).parent('.title').parent('li').find('.bloc').slideToggle();
151    var btn_name = $(this).find('span').text();
152    if($(this).attr('class') === 'mynus') {
153      $(this).attr('class', 'plus');
154      $(this).find('span').text(btn_name.replace('閉じる', '開く'));
155      $(this).attr('aria-selected', false);
156      $(this).attr('aria-expanded', false);
157      $(this).parent('.title').parent('li').find('.bloc').attr('aria-hidden', true);
158    } else {
159      $(this).attr('class', 'mynus');
160      $(this).find('span').text(btn_name.replace('開く', '閉じる'));
161      $(this).attr('aria-selected', true);
162      $(this).attr('aria-expanded', true);
163      $(this).parent('.title').parent('li').find('.bloc').attr('aria-hidden', false);
164    }
165  });
166
167    // スマホ版「お探しの情報を選択ください」のアコーディオン
168    $('.service-tab-list .box button').on('click', function() {
169      $(this).parent('.title').parent('li').find('.bloc').slideToggle();
170      var btn_name = $(this).find('span').text();
171      if($(this).attr('class') === 'mynus') {
172        $(this).attr('class', 'plus');
173        $(this).find('span').text(btn_name.replace('閉じる', '開く'));
174        $(this).attr('aria-selected', false);
175        $(this).attr('aria-expanded', false);
176        $(this).parent('.title').parent('li').find('.bloc').attr('aria-hidden', true);
177      } else {
178        $(this).attr('class', 'mynus');
179        $(this).find('span').text(btn_name.replace('開く', '閉じる'));
180        $(this).attr('aria-selected', true);
181        $(this).attr('aria-expanded', true);
182        $(this).parent('.title').parent('li').find('.bloc').attr('aria-hidden', false);
183      }
184    });
185
186  // アコーディオン(よくある質問用)
187  $('.faq-block').svAccordion({
188    classHead:'.title',
189    classBody:'.childs',
190    classToggle:'on'
191  });
192
193  //アコーディオン(分野別で探す)
194  $('.joho-tab #tab-6 .in2').svAccordion({
195    classHead:'.title',
196    classBody:'.links',
197    classToggle:'on'
198  });
199
200  //スマホプレビューに対応
201  $('.no-escape').each(function(){
202    $(this).html($(this).text());
203  });
204
205  
206  // -----------------------------------------------------
207  // wysiwygの中にtableがあれば、wrapperクラスを付与する
208  // (100%を超えたときにwrapper内でスクロールさせるため)
209  // -----------------------------------------------------
210  function tableScrollHint() {
211    new ScrollHint('.js-scrollable', {
212      scrollHintIconAppendClass: 'scroll-hint-icon-white', 
213      i18n: {
214        scrollable: "スクロールできます"
215      }
216    });
217  }
218  if ($('.wysiwyg table,.table').length){
219    $('.wysiwyg table,.table').not('.wysiwyg table table,.table table').wrap('<div class="table-wrapper js-scrollable scroll-table"></div>');
220    $('.wysiwyg .table-wrapper,.table-wrapper').wrap('<div class="table-wrap"></div>');
221    $('.table-wrap').prepend('<div class="scroll-table-switch view-sp"><span class="title"><span class="visually-hidden">表組みの</span>表示切替</span><a href="javascript:void(0);"><span class="scroll"></span><span class="in-display"></span></a></div>');
222    tableScrollHint();
223  }
224  $('.scroll-table-switch a').click(function() {
225    $('.table-wrap').toggleClass('scroll-view');
226    $('.table-wrapper').toggleClass('scroll-table');
227    tableScrollHint();
228  });
229
230  /**
231   IE8,9でXMLHttpRequestの代わりにXDomainRequestを使う
232   このセクションは消さないでください。
233   */
234  if ( window.XDomainRequest ) {
235      jQuery.ajaxTransport(function( s ) {
236          if ( s.crossDomain && s.async ) {
237              if ( s.timeout ) {
238                  s.xdrTimeout = s.timeout;
239                  delete s.timeout;
240              }
241              var xdr;
242              return {
243                  send: function( _, complete ) {
244                      function callback( status, statusText, responses, responseHeaders ) {
245                          xdr.onload = xdr.onerror = xdr.ontimeout = xdr.onprogress = jQuery.noop;
246                          xdr = undefined;
247                          complete( status, statusText, responses, responseHeaders );
248                      }
249                      xdr = new XDomainRequest();
250                      xdr.open( s.type, s.url );
251                      xdr.onload = function() {
252                          callback( 200, "OK", { text: xdr.responseText }, "Content-Type: " + xdr.contentType );
253                      };
254                      xdr.onerror = function() {
255                          callback( 404, "Not Found" );
256                      };
257                      xdr.onprogress = function() {};
258                      if ( s.xdrTimeout ) {
259                          xdr.ontimeout = function() {
260                              callback( 0, "timeout" );
261                          };
262                          xdr.timeout = s.xdrTimeout;
263                      }
264                      xdr.send( ( s.hasContent && s.data ) || null );
265                  },
266                  abort: function() {
267                      if ( xdr ) {
268                          xdr.onerror = jQuery.noop();
269                          xdr.abort();
270                      }
271                  }
272              };
273          }
274      });
275  }
276
277  //PC・スマホ切り替え(レスポンシブ)
278  if( typeof MutualSwitching !== 'undefined') {
279    MutualSwitching.config.setPathSettings({
280      "/": {
281      "pc_width": 1024,
282      "sp_width": 'device-width, initial-scale=1.0',
283      "layout_type": 0
284      }
285    });
286    MutualSwitching.run.ready();
287  }
288
289    /**
290 * PC向けライトボックス
291 * メニューボタン↔閉じるボタントグル式
292 *
293 * @param object 設定
294 */
295  $.fn.customLightbox1 = function(config) {
296    var targetJ = this;
297  
298    config = $.extend({
299      modalBg:null,
300      modal:null,
301      close:null,
302      scrollID:'sWrapper',
303      lightSpot:null,
304      menuBtn: 'menu_btn_menu.png',
305      closeBtn: 'menu_btn_close.png',
306      menuBtnAlt: 'メニュー',
307      closeBtnAlt: '閉じる',
308      closeBtnText: null,
309      menuBtnA: null,
310    },config);
311  
312    if(config.modalBg == null || config.modal == null) {
313      return;
314    }
315  
316    // 簡易スクロール
317    var anchorScroll = function(id){
318      var j = $( "#" + id);
319      if(j.size() == 0) {
320        return;
321      }
322      $('html,body').animate({scrollTop: j.offset().top}, 200, "linear");
323    }
324  
325    var focusableElements = [
326      "a[href]",
327      "area[href]",
328      'input:not([disabled]):not([type="hidden"]):not([aria-hidden])',
329      "select:not([disabled]):not([aria-hidden])",
330      "textarea:not([disabled]):not([aria-hidden])",
331      "button:not([disabled]):not([aria-hidden])",
332      "iframe",
333      "object",
334      "embed",
335      "[contenteditable]",
336      '[tabindex]:not([tabindex^="-"])'
337    ];
338  
339    var applyModal = function(targetJ) {
340  
341      var is_active = false;
342      var beforeFocusedElement = null;
343      var beforeText = null;
344      var showModal = function() {
345        var docH = $(document).height();
346        config.modalBg.height(docH);
347        config.modalBg.fadeIn(200);
348        config.modal.fadeIn(200);
349        config.lightSpot.addClass('is-open');
350        config.menuBtnA.addClass('is-open');
351        if($('#sp-header').hasClass('top')) {
352          $('#sp-header').removeClass('top');
353          $('#sp-header').addClass('top-open'); 
354        }
355        is_active = true;
356        var btnImg = config.lightSpot.find('img');
357        var btnText = config.lightSpot.find('button, a .change'); // .change セレクタを追加
358          // 画像の処理 (存在する場合)
359          if (btnImg.length) {
360            beforeImgSrc = btnImg.attr('src');
361            beforeImgAlt = btnImg.attr('alt');
362            btnImg.attr('src', beforeImgSrc.replace(config.menuBtn, config.closeBtn));
363            btnImg.attr('alt', beforeImgAlt.replace(config.menuBtnAlt, config.closeBtnAlt));
364          }
365  
366          // テキストの処理 (closeBtnText が設定されている場合)
367          if (config.closeBtnText) {
368            if (beforeText === null) {
369              beforeText = btnText.html();
370            }
371            btnText.html(config.closeBtnText);
372          }
373  
374        targetJ.css({'z-index': '100'});
375  
376        // モーダルを開いた時、モーダル内の最初のフォーカス可能要素にフォーカスさせる処理
377        // beforeFocusedElement = document.activeElement;
378        // modalFocusableElements[0].focus();
379  
380        // モーダルを開いた時、メニューボタンにフォーカスさせる処理.
381        // 最初の要素がinputの場合、キーボードが表示されるため意図しない動きに見える
382        config.menuBtnA.focus();
383      };
384  
385      var hideModal = function(modeless = false) {
386        config.modalBg.hide();
387        config.modal.hide();
388        anchorScroll(config.scrollID);
389        config.lightSpot.css({'z-index': 'auto'});
390        config.lightSpot.removeClass('is-open');
391        config.menuBtnA.removeClass('is-open');
392        if($('#sp-header').hasClass('top-open') && !modeless) {
393          $('#sp-header').removeClass('top-open');
394          $('#sp-header').addClass('top');
395        }
396        is_active = false;
397        var btnImg = config.lightSpot.find('img');
398        var btnText = config.lightSpot.find('button, a .change'); // .change セレクタを追加
399          // 画像を元に戻す (存在する場合)
400          if (btnImg.length) {
401          btnImg.attr('src', beforeImgSrc);
402          btnImg.attr('alt', beforeImgAlt);
403        }
404        // テキストを元に戻す (closeBtnText が設定されている場合)
405        if (config.closeBtnText) {
406          btnText.html(beforeText);
407        }
408        targetJ.css({'z-index': '9'});
409  
410        // モーダルを開く直前にフォーカスしていた要素へフォーカスを戻す処理
411        if(beforeFocusedElement) {
412          if(!modeless) {
413            beforeFocusedElement.focus();
414          }
415          beforeFocusedElement = null;
416        }
417      };
418  
419      targetJ.click(function(e) {
420        e.preventDefault();
421        if(is_active){
422          hideModal()
423        } else {
424          showModal();
425        }
426      });
427  
428      // フォーカストラップの処理
429      var modalFocusableElements = config.modal.find(focusableElements.join(","));
430      var focustrapElements = config.menuBtnA.add(modalFocusableElements);
431      focustrapElements.keydown(function(e) {
432        var isOpenedMenuBtnA = config.menuBtnA.hasClass('is-open');
433        var firstFocusableElement = modalFocusableElements.first();
434        var lastFocusableElement = modalFocusableElements.last();
435        if (e.key === "Tab") {
436          if (e.shiftKey) {
437            if ($(document.activeElement).is(firstFocusableElement)) {
438              e.preventDefault();
439              config.menuBtnA.focus();
440            } else if ($(document.activeElement).is(config.menuBtnA) && isOpenedMenuBtnA) {
441              e.preventDefault();
442              lastFocusableElement.focus();
443            }
444          } else {
445            if ($(document.activeElement).is(lastFocusableElement)) {
446              e.preventDefault();
447              config.menuBtnA.focus();
448            } else if ($(document.activeElement).is(config.menuBtnA) && isOpenedMenuBtnA) {
449              e.preventDefault();
450              firstFocusableElement.focus();
451            }
452          }
453        }
454      });
455  
456      config.close.click(function() {
457        hideModal();
458        return false;
459      });
460      config.modalBg.click(function() {
461        hideModal();
462        return false;
463      });
464      config.modal.keydown(function(e) {
465        if (e.key === 'Escape') {
466          hideModal();
467          return false;
468        }
469      });
470  
471      // モードレス対応
472      $(document).click(function(e) {
473        const isModalClose = config.modal.is(':hidden');
474        const isModalToggleButton = $(e.target).closest(targetJ).length;
475        const isModalArea = $(e.target).closest(config.modal).length;
476  
477        if (isModalClose || isModalToggleButton || isModalArea) return;
478        hideModal(modeless = true);
479      });
480    }
481  
482    applyModal(targetJ);
483  };
484
485  $.fn.customLightbox2 = function(config) {
486  var targetJ = this;
487
488  config = $.extend({
489    modalBg:null,
490    modal:null,
491    close:null,
492    scrollID:'sWrapper',
493    lightSpot:null,
494    menuBtn: 'menu_btn_menu.png',
495    closeBtn: 'menu_btn_close.png',
496    menuBtnAlt: 'メニュー',
497    closeBtnAlt: '閉じる',
498    closeBtnText: null,
499    menuBtnA: null,
500  },config);
501
502  if(config.modalBg == null || config.modal == null) {
503    return;
504  }
505
506  // 簡易スクロール
507  var anchorScroll = function(id){
508    var j = $( "#" + id);
509    if(j.size() == 0) {
510      return;
511    }
512    $('html,body').animate({scrollTop: j.offset().top}, 200, "linear");
513  }
514
515  var focusableElements = [
516    "a[href]",
517    "area[href]",
518    'input:not([disabled]):not([type="hidden"]):not([aria-hidden])',
519    "select:not([disabled]):not([aria-hidden])",
520    "textarea:not([disabled]):not([aria-hidden])",
521    "button:not([disabled]):not([aria-hidden])",
522    "iframe",
523    "object",
524    "embed",
525    "[contenteditable]",
526    '[tabindex]:not([tabindex^="-"])'
527  ];
528
529  var applyModal = function(targetJ) {
530
531    var is_active = false;
532    var beforeFocusedElement = null;
533    var beforeText = null;
534    var showModal = function() {
535      var docH = $(document).height();
536      config.modalBg.height(docH);
537      config.modalBg.fadeIn(200);
538      config.modal.fadeIn(200);
539      config.lightSpot.addClass('is-open');
540      config.menuBtnA.addClass('is-open');
541      if($('#sp-header').hasClass('top')) {
542        $('#sp-header').removeClass('top');
543        $('#sp-header').addClass('top-open'); 
544      }
545      is_active = true;
546      var btnImg = config.lightSpot.find('img');
547      if(btnImg.length) {
548        btnImg.attr('src', btnImg.attr('src').replace(config.menuBtn,config.closeBtn));
549        btnImg.attr('alt', btnImg.attr('alt').replace(config.menuBtnAlt,config.closeBtnAlt));
550      } else if(config.closeBtnText) {
551        var btnText = config.lightSpot.find('button, a');
552        if(beforeText === null) {
553          beforeText = btnText.html();
554        }
555        btnText.text(config.closeBtnText);
556      }
557      targetJ.css({'z-index': '100'});
558
559      // モーダルを開いた時、モーダル内の最初のフォーカス可能要素にフォーカスさせる処理
560      // beforeFocusedElement = document.activeElement;
561      // modalFocusableElements[0].focus();
562
563      // モーダルを開いた時、メニューボタンにフォーカスさせる処理.
564      // 最初の要素がinputの場合、キーボードが表示されるため意図しない動きに見える
565      config.menuBtnA.focus();
566    };
567
568    var hideModal = function(modeless = false) {
569      config.modalBg.hide();
570      config.modal.hide();
571      anchorScroll(config.scrollID);
572      config.lightSpot.css({'z-index': 'auto'});
573      config.lightSpot.removeClass('is-open');
574      config.menuBtnA.removeClass('is-open');
575      if($('#sp-header').hasClass('top-open') && !modeless) {
576        $('#sp-header').removeClass('top-open');
577        $('#sp-header').addClass('top');
578      }
579      is_active = false;
580      var btnImg = config.lightSpot.find('img');
581      if(btnImg.length) {
582        btnImg.attr('src', btnImg.attr('src').replace(config.closeBtn,config.menuBtn));
583        btnImg.attr('alt', btnImg.attr('alt').replace(config.closeBtnAlt,config.menuBtnAlt));
584      } else if(config.closeBtnText) {
585        var btnText = config.lightSpot.find('button, a');
586        btnText.html(beforeText);
587      }
588      targetJ.css({'z-index': '9'});
589
590      // モーダルを開く直前にフォーカスしていた要素へフォーカスを戻す処理
591      if(beforeFocusedElement) {
592        if(!modeless) {
593          beforeFocusedElement.focus();
594        }
595        beforeFocusedElement = null;
596      }
597    };
598
599    targetJ.click(function(e) {
600      e.preventDefault();
601      if(is_active){
602        hideModal()
603      } else {
604        showModal();
605      }
606    });
607
608    // フォーカストラップの処理
609    var modalFocusableElements = config.modal.find(focusableElements.join(","));
610    var focustrapElements = config.menuBtnA.add(modalFocusableElements);
611    focustrapElements.keydown(function(e) {
612      var isOpenedMenuBtnA = config.menuBtnA.hasClass('is-open');
613      var firstFocusableElement = modalFocusableElements.first();
614      var lastFocusableElement = modalFocusableElements.last();
615      if (e.key === "Tab") {
616        if (e.shiftKey) {
617          if ($(document.activeElement).is(firstFocusableElement)) {
618            e.preventDefault();
619            config.menuBtnA.focus();
620          } else if ($(document.activeElement).is(config.menuBtnA) && isOpenedMenuBtnA) {
621            e.preventDefault();
622            lastFocusableElement.focus();
623          }
624        } else {
625          if ($(document.activeElement).is(lastFocusableElement)) {
626            e.preventDefault();
627            config.menuBtnA.focus();
628          } else if ($(document.activeElement).is(config.menuBtnA) && isOpenedMenuBtnA) {
629            e.preventDefault();
630            firstFocusableElement.focus();
631          }
632        }
633      }
634    });
635
636    config.close.click(function() {
637      hideModal();
638      return false;
639    });
640    config.modalBg.click(function() {
641      hideModal();
642      return false;
643    });
644    config.modal.keydown(function(e) {
645      if (e.key === 'Escape') {
646        hideModal();
647        return false;
648      }
649    });
650
651    // モードレス対応
652    $(document).click(function(e) {
653      const isModalClose = config.modal.is(':hidden');
654      const isModalToggleButton = $(e.target).closest(targetJ).length;
655      const isModalArea = $(e.target).closest(config.modal).length;
656
657      if (isModalClose || isModalToggleButton || isModalArea) return;
658      hideModal(modeless = true);
659    });
660  }
661
662  applyModal(targetJ);
663  };
664
665
666});
667
668$(function() {
669  var $pagetop = $('#pagetop');
670
671  $(window).on('scroll', function() {
672    var scrollTop = $(this).scrollTop();
673
674    if (scrollTop >= 150) {
675      // スクロール位置が 150px 以下の場合、スライドイン
676      $pagetop.addClass('slide-in').removeClass('slide-out');
677    } else {
678      // スクロール位置が 150px より大きい場合、スライドアウト
679      $pagetop.addClass('slide-out').removeClass('slide-in');
680    }
681  });
682});
683
684// モーダル(lightbox2)の処理はloadイベント時に発火するようにしてください。
685// readyイベント $(function(){}); 時の発火だとGoogleカスタム検索にフォーカスが当たらない可能性があります。
686$(window).on('load', function() {
687  //モーダル(検索)
688  $('.menu-btn-search').customLightbox1({
689    modalBg:$('.modal-search-bg'),
690    modal:$('.modal-search'),
691    close:$('.modal-search-close'),
692    scrollID:'sWrapper',
693    lightSpot:$('.menu-btn-search'),
694    menuBtn: 'menu_btn_search.png',
695    closeBtn: 'sp_modal_menu_close.png',
696    closeBtnText: '閉じる',
697    menuBtnA: $('.menu-btn-search a'),
698  });
699
700
701    //モーダル(メニュー)
702  $('.pc-shien-menu-btn-menu').customLightbox1({
703    modalBg:$('.pc-shien-modal-menu-bg'),
704    modal:$('.pc-shien-modal-menu'),
705    close:$('.pc-shien-modal-menu-close'),
706    scrollID:'sWrapper',
707    lightSpot:$('.pc-shien-menu-btn-menu'),
708    menuBtn: 'menu_btn_shien.png',
709    closeBtn: 'menu_btn_close.png',
710    closeBtnText: 'Languages<br>を閉じる',
711    menuBtnA: $('.pc-shien-menu-btn-menu a'),
712  });
713
714  $('.pc-search-menu-btn-menu').customLightbox1({
715    modalBg:$('.pc-search-modal-menu-bg'),
716    modal:$('.pc-search-modal-menu'),
717    close:$('.pc-search-modal-menu-close'),
718    scrollID:'sWrapper',
719    lightSpot:$('.pc-search-menu-btn-menu'),
720    menuBtn: 'sub_menu_btn_search.png',
721    closeBtn: 'menu_btn_close.png',
722    closeBtnText: '<span>を閉じる</span>',
723    menuBtnA: $('.pc-search-menu-btn-menu a'),
724  });
725
726});
727
728
729function _eqGroupHeight () {
730  $(".level1col2").eqGroupHeight(2);
731  $(".level2col1 .list").eqGroupHeight(2);
732  $(".level1-gaiyo").eqGroupHeight(2);
733  $(".level1col2-gaiyo .col").eqGroupHeight(2);
734
735  $(".level2col2 .box2 .list").eqGroupHeight(2);
736
737  //混在用
738  $(".level2col1-mixed .list").eqGroupHeight(2);
739  $(".level2col2-mixed .col").eqGroupHeight(2);
740  $(".level2col2-mixed .box2 .list").eqGroupHeight(2);
741  $(".level2col2-mixed-js .col").eqGroupHeight(2);
742  $(".level2col2-mixed-js .box2 .list").eqGroupHeight(2);
743
744  $(".thumbnail-list-area .list").eqGroupHeight(3);
745}
746
747function waitForExternalChanges(callback) {
748  const observer = new MutationObserver(function(mutations){
749    callback();
750  });
751  const config = { childList: true, subtree: true };
752  observer.observe(document.body, config);
753}

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.