1$(function() { 2 (function($) { 3 var cName; 4 switch (true) { 5 case window._ua.Tablet: 6 cName = 'tablet'; 7 break; 8 case window._ua.Mobile: 9 cName = 'mobile'; 10 break; 11 default: 12 cName = ''; 13 } 14 $('body').addClass(cName); 15 var isTouchDevice = (function(d) { 16 var iframe = d.createElement('iframe'); 17 d.body.appendChild(iframe); 18 var result = 'ontouchstart' in iframe.contentWindow; 19 d.body.removeChild(iframe); 20 return result; 21 })(document); 22 if (!isTouchDevice) { 23 $('body').addClass('touch-disabled'); 24 } 25 })($); 26 27 var headerHeight = 0; 28 var headerOffset = 0; 29 var footerOffset = 0; 30 $('header').addClass('low'); 31 $('footer').addClass('low'); 32 $('.pagetop') 33 .hide() 34 .addClass('hidden'); 35 36 var ua = navigator.userAgent.toLowerCase(); 37 if (ua.indexOf('android') !== -1) { 38 $('.menu_icon a').addClass('fix'); 39 } 40 if (ua.indexOf('iphone') !== -1 || ua.indexOf('ipad') !== -1) { 41 $('.parallax').addClass('ios'); 42 } 43 if (ua.indexOf('safari') !== -1 && ua.indexOf('iPad') !== -1) { 44 $('.parallax').addClass('ios'); 45 } 46 if (ua.indexOf('iPad') !== -1) { 47 $('.parallax').addClass('ios'); 48 } 49 var ipad = 50 ua.indexOf('ipad') > -1 || 51 (ua.indexOf('macintosh') > -1 && 'ontouchend' in document); 52 if (ipad == true) { 53 $('.parallax').addClass('ios'); 54 } 55 56 // scrollbar 57 var scrollbarWidth = window.innerWidth - document.body.clientWidth; 58 59 // sp gnav 60 $('.menu_icon a').on('click', function(e) { 61 e.preventDefault(); 62 $(this) 63 .toggleClass('close') 64 .parent() 65 .prev(); 66 $('body') 67 .removeClass('down') 68 .addClass('up'); 69 $(this) 70 .closest('header') 71 .toggleClass('menu_open'); 72 }); 73 74 // gnav 75 var navi_event = 'click'; 76 if ($('.global_nav').css('list-style-position') === 'inside') { 77 navi_event = 78 !$('body.mobile').length && !$('body.tablet').length 79 ? 'mouseenter mouseleave' 80 : 'touchend'; 81 $('.has_under').on('click', function(e) { 82 var tagName = e.target.tagName.toLowerCase(); 83 if (!tagName === 'a' || $(e.target.parentNode).hasClass('has_under')) { 84 e.preventDefault(); 85 } 86 }); 87 } 88 $('.has_under').on(navi_event, function(e) { 89 var tagName = e.target.tagName.toLowerCase(); 90 if (tagName === 'a' && !$(e.target.parentNode).hasClass('has_under')) { 91 return; 92 } 93 e.preventDefault(); 94 var $self = $('>a', $(this)); 95 //var $self = $(this); 96 if (!$self.hasClass('menu_under_open') && $('.menu_under_open').length) { 97 $('.menu_under_open') 98 .removeClass('menu_under_open') 99 .next() 100 .stop() 101 .slideToggle(200); 102 } 103 $self.toggleClass('menu_under_open'); 104 $self 105 .next() 106 .stop() 107 .slideToggle(200); 108 }); 109 $('.gnav_search>a').on('click', function(e) { 110 e.preventDefault(); 111 //$(this).toggleClass('menu_under_open'); 112 $(this) 113 .next() 114 .slideToggle(200); 115 }); 116 117 // pagetop 118 $('.pagetop a').on('click', function(e) { 119 e.preventDefault(); 120 $('html, body').animate({ 121 scrollTop: 0 122 }); 123 }); 124 125 // iOS svg tap fix 126 if ($('body.mobile').length || $('body.tablet').length) { 127 $('header .title a').on('touchend', function(e) { 128 e.preventDefault(); 129 location.href = this.href; 130 }); 131 } 132 133 // swipebox 134 if ($.isFunction($().swipebox)) { 135 var swipebox = $('.swipebox').swipebox(); 136 $(document).on('click touchend', '#swipebox-overlay', function(e) { 137 e.preventDefault(); 138 if ($(e.target).hasClass('slide')) $.swipebox.close(); 139 }); 140 } 141 142 // slider 143 if ($.isFunction($().sliderPro)) { 144 var sliderDefaults = { 145 center: { 146 width: 1000, 147 height: 450, 148 slideDistance: 0, 149 visibleSize: '100%', 150 arrows: true, 151 fadeArrows: false, 152 autoScaleLayers: false, 153 breakpoints: {} 154 }, 155 wide: { 156 width: '100%', 157 autoHeight: true, 158 slideDistance: 0, 159 arrows: true, 160 fadeArrows: false, 161 fade: true, 162 autoScaleLayers: false, 163 touchSwipe: false, 164 breakpoints: {} 165 }, 166 contents: { 167 width: 450, 168 height: 300, 169 aspectRatio: 1.5, 170 slideDistance: 10, 171 visibleSize: '100%', 172 arrows: true,
173 fadeArrows: false, 174 buttons: false, 175 fadeCaption: false, 176 breakpoints: {} 177 } 178 }; 179 $('.slider-pro').each(function() { 180 var opt = $(this).data(); 181 var number_of_slide = $(this).find('.sp-slide').length; 182 $(this).addClass(opt.type || 'center'); 183 if (!this.hasAttribute('data-type')) { 184 return true; 185 } 186 var options = $.extend( 187 true, 188 sliderDefaults[opt.type] || sliderDefaults.center, 189 {} 190 ); 191 if (opt.width) { 192 options.width = opt.width; 193 } 194 if (opt.height) { 195 options.height = opt.height; 196 } 197 if (typeof opt.distance !== 'undefined') { 198 options.slideDistance = opt.distance; 199 } 200 if (opt.type == 'contents') { 201 if (opt.width || opt.height) { 202 options.aspectRatio = 203 Math.round((options.width / options.height) * 100) / 100; 204 } 205 if (number_of_slide % 2 === 0) { 206 options.visibleSize = 207 options.width * (number_of_slide - 1) + 208 options.slideDistance * (number_of_slide - 2); 209 } 210 } 211 if (typeof opt.autoplay !== 'undefined') { 212 options.autoplay = opt.autoplay; 213 } 214 if (typeof opt.arrows !== 'undefined') { 215 switch (opt.arrows) { 216 case false: 217 options.arrows = false; 218 $(this).addClass('disable-arrows'); 219 break; 220 case 'pc-only': 221 var bp = 768 - scrollbarWidth - 1; 222 options.breakpoints[bp] = options.breakpoints[bp] || {}; 223 options.breakpoints[bp].arrows = false; 224 $(this).addClass('sp-disable-arrows'); 225 break; 226 } 227 } 228 if (typeof opt.buttons !== 'undefined') { 229 switch (opt.buttons) { 230 case false: 231 options.buttons = false; 232 break; 233 case 'pc-only': 234 var bp = 768 - scrollbarWidth - 1; 235 options.breakpoints[bp] = options.breakpoints[bp] || {}; 236 options.breakpoints[bp].buttons = false; 237 break; 238 } 239 } 240 $(this).sliderPro(options); 241 }); 242 } 243 244 $('.slide_scroll').click(function(e) { 245 e.preventDefault(); 246 var pos = $(this) 247 .closest('section') 248 .next() 249 .offset().top; 250 $('html, body').animate({ 251 scrollTop: pos 252 }); 253 }); 254 255 // Q&A 256 // $('.qa:not(.qa-open) .question').click(function() { 257 // $(this).toggleClass('open').next('.answer').slideToggle(); 258 // }); 259 260 // responsive scroll table 261 $('table.responsive-scroll').wrap( 262 '<div><div class="responsive-scroll-container"><div class="responsive-scroll-inner"></div></div><p class="sp-only text-center text-small">â»æ¨ªã¹ã¯ãã¼ã«ã§å ¨ä½ã表示ãã¾ãã</p></div>' 263 ); 264 265 // responsive list table 266 $('table.responsive-list').each(function() { 267 var header = []; 268 $(this) 269 .find('thead th') 270 .each(function() { 271 header.push($(this).text()); 272 }); 273 $(this) 274 .find('tbody td') 275 .each(function() { 276 $(this).attr('data-title', header[$(this).index()]); 277 }); 278 }); 279
280 // combine table 281 $('table.combine') 282 .closest('.col') 283 .css('margin-bottom', 0); 284 285 // Fix SP Menu 286 function fixSpMenu() { 287 var win_h = $(window).height(); 288 var hdr_h = $('header').height(); 289 if ( 290 $('.menu_icon').is(':visible') && 291 $('header').css('z-index') != 'auto' 292 ) { 293 // SP && Fixed 294 $('header .global_nav>ul').css('max-height', win_h - hdr_h); 295 } else { 296 $('header .global_nav>ul').css('max-height', 'none'); 297 } 298 } 299 300 function fixPageTop(window) { 301 var currentPos = $(window).scrollTop(); 302 var $pagetop = $('.pagetop'); 303 if (currentPos > 200) { 304 $pagetop.fadeIn(200, function() { 305 $(this).removeClass('hidden'); 306 }); 307 } else { 308 $pagetop.fadeOut(200, function() { 309 $(this).addClass('hidden'); 310 }); 311 } 312 } 313 314 function fixMainSize() { 315 if ($('.main_visual').length) { 316 var mainPadding = +$('.main_visual') 317 .css('padding-top') 318 .replace('px', ''); 319 var mainHeight = $('.main_visual').height(); 320 return mainPadding > mainHeight ? mainPadding : mainHeight; 321 } else { 322 return false; 323 } 324 } 325 326 // Load Event 327 $(window).on('load', function() { 328 headerOffset = fixMainSize(); 329 footerOffset = $('footer').offset().top; 330 headerHeight = $('header').height(); 331 $('body') 332 .removeClass('down') 333 .addClass('up') 334 .css('paddingTop', function() { 335 return $('header').css('position') == 'fixed' 336 ? $('header').height() 337 : 0; 338 }); 339 if (typeof WOW !== 'undefined') { 340 new WOW().init(); 341 } 342 fixSpMenu(); 343 $('.tile').each(function() { 344 $(this) 345 .children() 346 .tile(); 347 }); 348 }); 349 350 // Scroll Event 351 var scrolltimer = false; 352 var prevPos = 0; 353 $(window).on('scroll touchmove', function() { 354 $('body').addClass('scroll'); 355 var currentPos = $(this).scrollTop(); 356 357 headerOffset = fixMainSize(); 358 footerOffset = $('footer').offset().top; 359 360 if (currentPos > headerOffset) { 361 $('header') 362 .removeClass('low') 363 .addClass('high'); 364 } else { 365 $('header') 366 .removeClass('high') 367 .addClass('low'); 368 } 369 370 if (currentPos + $(this).height() > footerOffset) { 371 $('footer') 372 .removeClass('low') 373 .addClass('high'); 374 } else { 375 $('footer') 376 .removeClass('high') 377 .addClass('low'); 378 } 379 380 fixPageTop(this); 381 382 if (currentPos > prevPos && currentPos > 0) { 383 // down 384 $('body') 385 .removeClass('up') 386 .addClass('down'); //.css('paddingTop', 0); 387 if (currentPos > headerHeight) { 388 $('header').addClass('hidden'); 389 } 390 } else { 391 // up 392 $('body') 393 .removeClass('down') 394 .addClass('up') 395 .css('paddingTop', function() { 396 return $('header').css('position') == 'fixed' ? headerHeight : 0; 397 }); 398 $('header').removeClass('hidden'); 399 } 400 if (!currentPos) { 401 $('body').addClass('scrollTop'); 402 } else { 403 $('body').removeClass('scrollTop'); 404 } 405 prevPos = currentPos; 406 407 if (scrolltimer !== false) { 408 clearTimeout(scrolltimer); 409 } 410 scrolltimer = setTimeout(function() { 411 $('body').removeClass('scroll'); 412 $('body') 413 .removeClass('down') 414 .addClass('up') 415 .css('paddingTop', function() { 416 return $('header').css('position') == 'fixed' ? headerHeight : 0; 417 }); 418 $('header').removeClass('hidden'); 419 }, 500); 420 }); 421 422 // Resize Event 423 var resizetimer = false; 424 $(window).resize(function() { 425 if (resizetimer !== false) { 426 clearTimeout(resizetimer); 427 } 428 resizetimer = setTimeout(function() { 429 fixSpMenu(); 430 $('.tile').each(function() { 431 $(this) 432 .children() 433 .tile(); 434 }); 435 headerHeight = $('header').height(); 436 headerOffset = $('header').offset().top; 437 footerOffset = $('footer').offset().top; 438 $('.tile').each(function() { 439 $(this) 440 .children() 441 .tile(); 442 }); 443 }, 200); 444 }); 445 446 // main_slider 447 if ($.isFunction($().slick)) { 448 (function($) { 449 if ($('.main_visual_slick li').length <= 1) return; 450 if ($('.main_visual').css('transform') !== 'none') { 451 var html = $('.main_visual_slick').html(); 452 var $ul = $('<ul class="main_visual_slick_thumb">'); 453 $('.main_visual').append($ul.html(html)); 454 } 455 var fade = false;
456 var arrows = false; 457 var dots = false; 458 var speed = 500; 459 var appendArrows = $('.main_visual_slick'); 460 if ($('.main_visual').css('table-layout') === 'fixed') { 461 fade = true; 462 speed = 1000; 463 } 464 if ($('.main_visual').css('list-style-position') === 'inside') { 465 arrows = true; 466 $('.main_visual').append('<div class="main_visual_arrow"></div>'); 467 appendArrows = $('.main_visual_arrow'); 468 } 469 if ($('.main_visual').css('list-style-type') === 'circle') { 470 dots = true; 471 } 472 var slick = $('.main_visual_slick') 473 .slick({ 474 slidesToShow: 1, 475 autoplay: true, 476 fade: fade, 477 arrows: arrows, 478 dots: dots, 479 appendArrows: appendArrows, 480 autoplaySpeed: 7000, 481 speed: speed 482 }) 483 .on('beforeChange', function(e, slick, currentSlide, nextSlide) { 484 if ($('.main_visual_slick_thumb').length) { 485 $('.main_visual_slick_thumb_current').removeClass( 486 'main_visual_slick_thumb_current' 487 ); 488 $('.main_visual_slick_thumb>li') 489 .eq(nextSlide) 490 .addClass('main_visual_slick_thumb_current'); 491 } 492 if ($('.main_visual_copy').css('transform') !== 'none') { 493 var $copy = $('.main_visual_copy li'); 494 $copy.eq(currentSlide).removeClass('active'); 495 $copy.eq(nextSlide).addClass('active'); 496 } 497 }); 498 if ($('.main_visual_copy').css('transform') !== 'none') { 499 $('.main_visual_copy li') 500 .eq(0) 501 .addClass('active') 502 .show(); 503 } 504 $('.main_visual_slick_thumb>li').on('click', function() { 505 var index = $(this).index(); 506 slick.slick('slickGoTo', index); 507 }); 508 })($); 509 } 510 511 if ( 512 typeof skrollr !== 'undefined' && 513 !$('body').hasClass('tablet') && 514 !$('body').hasClass('mobile') 515 ) { 516 skrollr.init(); 517 } 518 519 if (typeof objectFitImages !== 'undefined') { 520 objectFitImages('.ofi img'); 521 } 522 523 // pc-onlyçã®ã¿ã°åå¾ã«åºã¦ããæ¹è¡ã³ã¼ããé¤å» 524 $('br.pc-only, br.sp-only, br.tablet-only, br.pc-hide, br.sp-hide, br.tablet-hide, sup, sub').each(function(){ 525 var $parent = $(this).parent(); 526 if( !$parent.length ) return true; 527 var html = $parent.html(); 528 html = html 529 .replace(/\n/g, '') 530 .replace(/\s*?(<br class="(sp|pc|tablet)-(only|hide)([^>+?])>)\s*/g, '$1') 531 .replace(/(,|\.)(<br class="(sp|pc|tablet)-(only|hide))/g, '$1 $2') 532 .replace(/(\d)(<br class="(sp|pc|tablet)-(only|hide))/g, '$1ã$2') 533 .replace(/\s*?<(sup|sub)/g, '<$1'); 534 $parent.html( html ); 535 }); 536 537 // é å»¶èªã¿è¾¼ã¿æã®tileå¼·å¶çºç« 538 if (typeof MutationObserver !== 'undefined') { 539 // IE10- 540 var observer = new MutationObserver(function() { 541 $(window).trigger('resize'); 542 }); 543 544 var config = { 545 attributes: true, 546 childList: true, 547 characterData: true 548 }; 549 550 $('.tile .lazy-hidden').each(function() { 551 observer.observe(this, config); 552 }); 553 } 554 555 $('.global_nav ul>li a').wrapInner('<span>') 556 557 // ãã¼ãã£ã³ã°ã¢ãã¡ã¼ã·ã§ã³ // 558 var webStorage = function () { 559 if (sessionStorage.getItem('access')) { 560 /* 561 2åç®ä»¥éã¢ã¯ã»ã¹æã®å¦ç 562 */ 563 $(".loading").addClass('is-active'); 564 } else { 565 /* 566 ååã¢ã¯ã»ã¹æã®å¦ç 567 */ 568 sessionStorage.setItem('access', 'true'); // sessionStorageã«ãã¼ã¿ãä¿å 569 $(".loading-animation").addClass('is-active'); // loadingã¢ãã¡ã¼ã·ã§ã³ã表示 570 setTimeout(function () { 571 // ãã¼ãã£ã³ã°ãæ°ç§å¾ã«é表示ã«ãã 572 $(".loading").addClass('is-active'); 573 $(".loading-animation").removeClass('is-active'); 574 }, 4000); // ãã¼ãã£ã³ã°ã表示ããæé 575 } 576 } 577 webStorage(); 578 579 580});
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.