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.