1var thisPage = location.pathname; 2 3jQuery(function($){ 4 //ãã¼ã«ã«ããã²ã¼ã·ã§ã³ã®ã«ã¬ã³ã 5 var localNaviElm = $('#contents__header__navMain ul.nav li'); 6 var noCurrent = true; 7 for(var i = 0, len = localNaviElm.length; i < len; i++){ 8 var thisElm = localNaviElm.eq(i); 9 var thisHref = thisElm.find('a').attr('href'); 10 if(thisHref.replace('index.html', '') == thisPage.replace('index.html', '')){ 11 thisElm.addClass('active'); 12 noCurrent = false; 13 break; 14 } 15 } 16 var localNaviElm2 = $('.header__nav--global--premium .header__nav__item'); 17 for(var i = 0, len = localNaviElm2.length; i < len; i++){ 18 var thisElm = localNaviElm2.eq(i); 19 var thisHref = thisElm.find('a.header__nav__item__name').attr('href'); 20 if(thisHref !== undefined && thisHref.replace('index.html', '') == thisPage.replace('index.html', '')){ 21 thisElm.addClass('active'); 22 noCurrent = false; 23 break; 24 } 25 } 26 if(noCurrent){ 27 var matchArr = [ 28 // ã¤ã¬ã®ã¥ã©ã¼å¯¾å¿ ['親', 'èªãã¼ã¸'] 29 ['/corporate/large/etc.html','/card/add/etc/'], 30 ['/corporate/large/etc.html','/card/add/etc/through-card.html'], 31 ['/corporate/large/etc.html','/ordercard/houjin/etc_through.html'], 32 ['/card/add/quicpay/index.html','/card/add/quicpay/apply-cardmembers/'], 33 ['/card/add/quicpay/index.html','/card/add/quicpay/apply-cardmembers/card/'], 34 ['/card/add/quicpay/index.html','/card/add/quicpay/apply-cardmembers/mobile/'], 35 ['/card/add/quicpay/index.html','/card/add/quicpay/apply-cardmembers/mobile/smartphone.html'], 36 ['/card/add/quicpay/index.html','/card/add/quicpay/apply-cardmembers/mobile/feature-phone.html'], 37 ['/card/add/quicpay/index.html','/card/add/quicpay/apply-cardmembers/children/'], 38 ['/card/add/quicpay/index.html','/card/add/quicpay/apply-cardmembers/nanaco/'], 39 ['/card/add/quicpay/index.html','/card/add/quicpay/apply-cardmembers/speedpassplus/'], 40 ['/card/add/quicpay/index.html','/card/add/quicpay/apply-cardmembers/coin/'], 41 ['/card/add/quicpay/index.html','/card/add/quicpay/apply-cardmembers/ana-nanaco/'], 42 ['/card/add/quicpay/index.html','/card/add/quicpay/apply-new-customer/'], 43 ['/card/add/quicpay/index.html','/card/add/quicpay/disney.html'], 44 ['/card/voucher/gift-card/','/card/voucher/gift-card/order.html'], 45 ['/card/voucher/gift-card/','/card/voucher/gift-card/ecopoint.html'], 46 ['/card/voucher/gift-card/','/card/voucher/gift-card/timber.html'], 47 ['/card/voucher/gift-card/','/card/voucher/gift-card/housing.html'], 48 ['/card/voucher/premo/index.html','/card/voucher/premo/contact.html'], 49 ['/card/voucher/taxi-ticket/index.html','/card/voucher/taxi-ticket/how-to-use.html'], 50 ['/usage/index.html','/usage/structure/'], 51 ['/usage/index.html','/usage/check/'], 52 ['/usage/index.html','/usage/creditlimit/'], 53 ['/usage/index.html','/usage/creditlimit/temporary-increase.html'], 54 ['/corporate/small-business/index.html','/corporate/small-business/premium-service.html'], 55 ['/corporate/large/index.html','/corporate/large/corporate-card.html'], 56 ['/corporate/large/index.html','/corporate/large/express-business.html'], 57 ['/corporate/large/index.html','/corporate/large/purchasing-service.html'], 58 ['/corporate/large/index.html','/corporate/large/purchasing-service-case.html'], 59 ['/corporate/large/index.html','/corporate/large/b-to-b.html'], 60 ['/corporate/large/index.html','/corporate/large/express-reservation.html'], 61 ['/corporate/large/index.html','/corporate/large/taxi-ticket.html'], 62 ['/corporate/large/index.html','/corporate/large/airline-ticket.html'], 63 ['/corporate/large/index.html','/corporate/large/etc.html'], 64 ['/corporate/large/index.html','/corporate/large/gasoline.html'], 65 ['/corporate/service/index.html','/corporate/service/e-co.html'], 66 ['/corporate/contact/index.html','/corporate/contact/corporate.html'], 67 ['/corporate/contact/index.html','/corporate/contact/corporation-desk.html'], 68 ['/corporate/contact/index.html','/corporate/contact/corporation-desk-admission.html'], 69 ['https://www.jcb.co.jp/iss-pc/open/pamphlet/pamphletLargeList.html?ActionType=category','/support/small-business/'], 70 ['https://www.jcb.co.jp/iss-pc/open/pamphlet/pamphletLargeList.html?ActionType=category','/support/corporate/'] 71 ]; 72 for(var i = 0, len = matchArr.length; i < len; i++){ 73 if(matchArr[i][1].replace('index.html', '') == thisPage.replace('index.html', '')){ 74 for(var b = 0, lenb = localNaviElm.length; b < lenb; b++){ 75 var thisElm = localNaviElm.eq(b); 76 var thisHref = thisElm.find('a').attr('href'); 77 if(thisHref.replace('index.html', '') == matchArr[i][0].replace('index.html', '')){ 78 thisElm.addClass('active'); 79 noCurrent = false; 80 break; 81 } 82 } 83 break; 84 } 85 } 86 } 87 88 var winWid = $(window).width(); 89 var winMinWid = 1024; 90 var spView = winWid < winMinWid; 91 92 //.qaAreaã®ã¢ã³ã¼ãã£ãªã³å¦ç 93 var accordionSpeed = 300; 94 95 // URLããç¹å®ã®ãã©ã¡ã¼ã¿ãåå¾ãã颿° 96 function getUrlParameter(name) { 97 var results = new RegExp('[?&]' + name + '=([^&#]*)').exec(window.location.href); 98 return results ? decodeURIComponent(results[1]) : null; 99 } 100 101 // é·ç§»æã®ãã©ã¡ã¼ã¿ãåå¾ 102 var openAccordionId = getUrlParameter('openAccordion'); // ä¾: ?openAccordion=acc-open01 103 104 // ããã©ã«ãã§ãªã¼ãã³ã«ããå¦ç 105 if (openAccordionId) { 106 $('.openDetailArea2 .btnBlock').each(function() { 107 if ($(this).data('acc-open') === openAccordionId) { 108 $(this).addClass('open').next('.detaiBlock').show(); 109 } 110 }); 111 } 112 113 // ã¢ã³ã¼ãã£ãªã³ã®ã¢ã³ã«ã¼ãå®è£ ãã颿° 114 function anchorScroll(target) { 115 const targetElement = $(target); 116 if (!targetElement.length) return; 117
118 // ç»é¢å¹ 768px以ä¸ã®å ´åã¯ãããã¼é«ããèæ ® 119 const isLargeScreen = $(window).width() >= 768; 120 const headerElement = $('#contents__header__nav'); 121 const headerHeight = isLargeScreen && headerElement.length > 0 ? headerElement.outerHeight(true) : 0; 122 123 // ã¿ã¼ã²ããã®ä½ç½®ãè¨ç® 124 const targetPosition = targetElement.offset().top - headerHeight; 125 126 $('html, body').stop(true, true); 127 $(window).scrollTop(targetPosition); 128 } 129 130 // ãã¼ã¸èªã¿è¾¼ã¿æã«ã¹ã¯ãã¼ã«ãå®è¡ 131 $(document).ready(function() { 132 if (openAccordionId && window.location.hash) { 133 const hashId = window.location.hash; 134 anchorScroll(hashId); 135 } 136 }); 137 138 if(spView){ 139 $('.openDetailArea').each(function(){ 140 $(this).find('.btnBlock').addClass('open'); 141 }); 142 }else{ 143 $('.openDetailArea .detaiBlock').each(function(){ 144 var thisElm = $(this); 145 if(thisElm.parents('.pcOpen').length == 0){ 146 thisElm.hide(); 147 } 148 }); 149 } 150 $('.openDetailArea .btnBlock, .openDetailArea2 .btnBlock').on('click',function(){ 151 var thisElm = $(this); 152 if(!spView && thisElm.parents('.pcOpen').length > 0){return;} 153 if(!thisElm.is('.open')){ 154 thisElm.next('.detaiBlock').not(':animated').slideDown('accordionSpeed',function(){ 155 $(this).prev().addClass('open'); 156 }); 157 }else{ 158 thisElm.next('.detaiBlock').not(':animated').slideUp('accordionSpeed',function(){ 159 $(this).prev().removeClass('open'); 160 }); 161 } 162 }); 163 164 //.ã«ã¼ããã¶ã¤ã³ã®ç»ååãæ¿ãå¦ç 165 var switchBtn = $('.tabArea.cards .tab li'); 166 var cardElm = $('.cardsArea li'); 167 var AC = 'active'; 168 var fadeTime = 500; 169 switchBtn.eq(0).addClass(AC); 170 switchBtn.on('click',function(){ 171 var thisElm = $(this); 172 var thisIndex = switchBtn.index(this); 173 if(thisElm.hasClass(AC)){return;} 174 switchBtn.removeClass(AC); 175 thisElm.addClass(AC); 176 if(thisIndex == 0){ 177 cardElm.find('.cardImgFront').fadeIn(fadeTime); 178 }else{ 179 cardElm.find('.cardImgFront').fadeOut(fadeTime); 180 } 181 }); 182 183 //åãæ¿ãã¿ã¤ã 184 var switchTab = $('.tabArea .tab.switchTab'); 185 switchTab.each(function(){ 186 var thisElm = $(this); 187 var thisBtn = thisElm.find('li'); 188 var thisCurrentClass = thisElm.find('li').has('a.active').attr('class'); 189 if(thisElm.parent().next('section').length > 0) { 190 var targetArea = thisElm.parent().next('section').children(); 191 } else { 192 var targetArea = thisElm.parent().next(); 193 } 194 var targetAreaChild = targetArea.children(); 195 targetAreaChild.hide(); 196 targetArea.find('.' + thisCurrentClass).show(); 197 thisBtn.on('click',function(){ 198 var thisElm = $(this); 199 thisBtn.find('a').removeClass('active'); 200 thisElm.find('a').addClass('active'); 201 targetAreaChild.hide(); 202 targetArea.find('.' + thisElm.attr('class')).show(); 203 }); 204 }); 205 $('[class*="anchorToTab0"]').on('click',function(){ 206 var thisElm = $(this); 207 var tabBtn = switchTab.find('li'); 208 var headerElm = $('#contents__header__nav'); 209 var headerElmHei = 0; 210 var thisBtn = null; 211 var parentTop = null; 212 if(thisElm.hasClass('anchorToTab01')){ 213 thisBtn = tabBtn.eq(0); 214 }else if(thisElm.hasClass('anchorToTab02')){ 215 thisBtn = tabBtn.eq(1); 216 }else if(thisElm.hasClass('anchorToTab03')){ 217 thisBtn = tabBtn.eq(2); 218 }else if(thisElm.hasClass('anchorToTab04')){ 219 thisBtn = tabBtn.eq(3); 220 }else if(thisElm.hasClass('anchorToTab05')){ 221 thisBtn = tabBtn.eq(4); 222 }else if(thisElm.hasClass('anchorToTab06')){ 223 thisBtn = tabBtn.eq(5); 224 }else if(thisElm.hasClass('anchorToTab07')){ 225 thisBtn = tabBtn.eq(6); 226 }else if(thisElm.hasClass('anchorToTab08')){ 227 thisBtn = tabBtn.eq(7); 228 }else if(thisElm.hasClass('anchorToTab09')){ 229 thisBtn = tabBtn.eq(8); 230 } 231 if(thisBtn != null){ 232 if(window.matchMedia('(min-width: 768px)').matches){ 233 headerElmHei = $('#contents__header__nav').outerHeight(true); 234 } 235 thisBtn.trigger('click'); 236 $('html, body').stop(false, true).animate({scrollTop: thisBtn.parents('.mainContents').eq(0).offset().top - headerElmHei}, 600); 237 } 238 }); 239 240 //åãæ¿ãã¿ã¤ã2 241 var switchTab02 = $('.tabArea02 .row'); 242 switchTab02.each(function(){ 243 var thisElm02 = $(this); 244 var thisBtn02 = thisElm02.find('a'); 245 var parentContent = thisElm02.parents('.tabArea02').parent(); 246 if(parentContent.parent('section').length > 0) { 247 var targetArea02 = parentContent.parent('section').next(); 248 } else { 249 var targetArea02 = parentContent.next(); 250 } 251 targetArea02.hide(); 252 thisBtn02.on('click', function(){ 253 var thisElm02 = $(this); 254 var targetAttribute = thisElm02.data('tab'); 255 var targetTab = $('.'+ targetAttribute); 256 if(thisElm02.hasClass('active') == 0) { 257 thisBtn02.removeClass('active'); 258 thisElm02.addClass('active'); 259 if ($('.tabArea02 .row').parents('section').next('section').length){ 260 targetArea02.find('.contents__inner').children().hide(); 261 } else { 262 targetArea02.children().hide(); 263 } 264 targetArea02.show(); 265 targetArea02.find(targetTab).show(); 266 } else { 267 thisBtn02.removeClass('active'); 268 targetArea02.hide(); 269 if ($('.tabArea02 .row').parents('section').next('section').length){ 270 targetArea02.find('.contents__inner').children().hide(); 271 } else { 272 targetArea02.children().hide(); 273 } 274 } 275 }); 276 }); 277 278 //.pictType01ã®æ¨ªå¹ å¦ç 279 if(spView){ 280 $('.pictType01').each(function(){ 281 var li = $(this).find('li'); 282 var liWidth = li.outerWidth(); 283 var liLen = li.length;
284 $(this).width(liWidth * liLen); 285 }); 286 } 287 288 //.cardsAreaã®æ¨ªå¹ å¦ç 289 $('.cardsArea .scroll').each(function(){ 290 var li = $(this).find('li'); 291 var liWidth = li.outerWidth(); 292 var liLen = li.length; 293 var margin = 17; 294 var alWidth = liWidth + margin; 295 $(this).width(alWidth * liLen); 296 }); 297 298 //.js-Tile1é«ããæããå¦ç 299 $(window).on('load resize',function(){ 300 if(!window.matchMedia('screen and (max-width:767px)').matches){ 301 $('.js-Tile1 .ttlType2').tile(2); 302 }else{ 303 $('.js-Tile1 .ttlType2').tile(1); 304 } 305 }); 306 307 // index_single_multi.htmlè¨å® 308 var $interval = 3000; // åãæ¿ããã®ééï¼ããªç§ï¼ 309 var $fade_speed = 1000; // ãã§ã¼ãå¦çã®æ©ãï¼ããªç§ï¼ 310 // éå§å¦ç 311 $("#singleMultiSlide ul").css({"position":"relative"}); 312 $("#singleMultiSlide ul li").hide().css({"position":"absolute", "top":0, "left":0}); 313 $("#singleMultiSlide ul li:first").addClass("active").fadeIn($fade_speed); 314 // ã«ã¼ãã»ãã 315 var timerID = setInterval(show, $interval); 316 // ãã¦ã¹ãªã¼ãã¼ã§ä¸æ 317 $("#singleMultiSlide ul li").on('mouseover',function(){ 318 clearInterval(timerID); 319 }, function(){ 320 timerID = setInterval(show, $interval); 321 }); 322 // ãã§ã¼ãã¤ã³å¦ç 323 function show(){ 324 var $active = $("#singleMultiSlide ul li.active"); 325 var $next = $active.next("li").length?$active.next("li"):$("#singleMultiSlide ul li:first"); 326 $active.fadeOut($fade_speed).removeClass("active"); 327 $next.fadeIn($fade_speed).addClass("active"); 328 } 329 330 //#emergencyã®å¦ç 331 var bodyElm = $('body'), 332 bodyClasses = typeof bodyElm.attr('class') != 'undefined' ? bodyElm.attr('class').split(' ') : '', 333 emergencyCookieName = 'URGENCY_NEWS', 334 emergencyClassArr = ['emergencyCard', 'emergencyStore'], 335 emergencyType1 = bodyClasses.indexOf(emergencyClassArr[0]) > -1, 336 emergencyType2 = bodyClasses.indexOf(emergencyClassArr[1]) > -1, 337 emergencyType = '', 338 emergencyJsonURL = '/news/', 339 emergencyXhr; 340 if(emergencyType1 || emergencyType2){ 341 if(emergencyType1){ 342 emergencyJsonURL += 'urgency_news-card.json'; 343 emergencyType = emergencyClassArr[0]; 344 }else if(emergencyType2){ 345 emergencyJsonURL += 'urgency_news-merchant.json'; 346 emergencyType = emergencyClassArr[1]; 347 } 348 emergencyXhr = $.ajax({ 349 url: emergencyJsonURL, 350 dataType: 'json', 351 timeout: 30000 352 }); 353 emergencyXhr.done(function(res){ 354 var cookieDataObj = getCookie(emergencyCookieName) == null ? JSON.parse('{"' + emergencyClassArr[0] + '": [], "' + emergencyClassArr[1] + '": []}') : JSON.parse(getCookie(emergencyCookieName)), 355 popupArr = ['', ' class="external" target="_blank"'], 356 code = ''; 357 code += '<div id="emergency">'; 358 $(res.urgencyNews).each(function(i, obj){ 359 var thisNewsId = obj.newsId, 360 thisPopupAttr = popupArr[obj.popup - 1]; 361 if(cookieDataObj[emergencyType].indexOf(thisNewsId) < 0){ 362 code += '<div class="emergency-banner">'; 363 code += '<p><a href="' + obj.url + '"' + thisPopupAttr + ' data-newsId="' + thisNewsId + '">' + obj.title + '</a></p>'; 364 code += '</div>'; 365 } 366 }); 367 code += '</div>'; 368 bodyElm.prepend(code); 369 var emergencyElm = $('#emergency'); 370 var emergencyCons = $('.emergency-constant_wrap'); 371 if(emergencyElm.find('.emergency-banner').length > 0){ 372 emergencyElm.slideDown(1000); 373 if (emergencyCons.find('.emergency-constant').length > 0) { 374 emergencyElm.addClass('both'); 375 } 376 }else{ 377 emergencyElm.remove(); 378 } 379 }); 380 } 381 382 /** telNo ç¡å¹åã®å¦ç **/ 383 var telDisableArr = [ 384 '.mainContents .infoBox .telNo a', 385 '.mainContents .module__dialBlock--whiteBg a', 386 '.module__dialBlock--blackBg--platinum .module__dialBlockItem--telNumber', 387 '.module__dialBlock--whiteBg a' 388 ]; 389 $(window).on('resize',function(){ 390 for(var i = 0, len = telDisableArr.length; i < len; i++){ 391 if(window.matchMedia('(min-width: 768px)').matches){ 392 $(telDisableArr[i]).on('click', function(e){ 393 e.preventDefault(); 394 }); 395 }else{ 396 $(telDisableArr[i]).off('click'); 397 } 398 } 399 }).trigger('resize'); 400}); 401 402/* function */ 403/** setCookie **/ 404function setCookie(name, value, days){ 405 if(days){ 406 var date = new Date(); 407 date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000)); 408 var expires = '; expires=' + date.toGMTString(); 409 }else{ 410 var expires = ''; 411 }document.cookie = name+'=' + value + expires + '; path=/'; 412} 413/** getCookie **/ 414function getCookie(name){ 415 var nameEQ = name + '='; 416 var ca = document.cookie.split(';'); 417 for(var i = 0, thisLen = ca.length;i < thisLen; i++){ 418 var c = ca[i];
419 while(c.charAt(0) == ' ') c = c.substring(1, c.length); 420 if(c.indexOf(nameEQ)== 0) return c.substring(nameEQ.length, c.length); 421 }return null; 422} 423 424(function() { 425 $(function() { 426 var breakpointMobile, breakpointPC, breakpointTablet, common, contentsNavi__$activatedList, contentsNavi__activeList, contentsNavi__deactiveList, contentsNavi__getDelay, contentsNavi__lastMouseLoc, contentsNavi__mouseLocList, contentsNavi__onMouseEnterToList, contentsNavi__onMouseLeaveFromMainMenu, contentsNavi__onMouseMove, contentsNavi__timeoutFixOpen, contentsNavi__timeoutListID, contentsNavi__timeoutMainMenuID, contentsNavi__tryToActiveMenu, contentsNavi__tryToDeactiveMenu, globalMenu__$activatedList, globalMenu__activeList, globalMenu__deactiveList, globalMenu__getDelay, globalMenu__lastMouseLoc, globalMenu__mouseLocList, globalMenu__onMouseEnterToList, globalMenu__onMouseLeaveFromMainMenu, globalMenu__onMouseMove, globalMenu__timeoutFixOpen, globalMenu__timeoutListID, globalMenu__timeoutMainMenuID, globalMenu__tryToActiveMenu, globalMenu__tryToActiveMenuAlt, globalMenu__tryToDeactiveMenu, goToTop__changefixedMovePageTopFlag, goToTop__checkfixedMovePageTopFlag, goToTop__fixedMovePageTopFlag, goToTop__onClickScrollTop, goToTop__timerIDFixedMovePageTop, init, isInit, isL_XL, mainMenu__$activatedList, mainMenu__activeList, mainMenu__deactiveList, mainMenu__getDelay, mainMenu__getDelayAlt, mainMenu__lastKeyLoc, mainMenu__lastMouseLoc, mainMenu__mouseLocList, mainMenu__onKeyLeaveFromMainMenu, mainMenu__onMouseEnterToList, mainMenu__onMouseLeaveFromMainMenu, mainMenu__onMouseMove, mainMenu__timeoutFixOpen, mainMenu__timeoutListID, mainMenu__timeoutMainMenuID, mainMenu__tryToActiveMenu, mainMenu__tryToActiveMenuAlt, mainMenu__tryToDeactiveMenu, mainMenu__tryToDeactiveMenuAlt, menu__getDelay, menu__getDelayAlt, menu__onMouseEnterToList, menu__onMouseMove, menu__tryToActiveMenu, menu__tryToDeactiveMenu, menu__tryToDeactiveMenuAlt, moduleCardCarouselList__changeAlpha, moduleCardCarouselList__getPosition, moduleCardCarouselList__onClickNav, moduleCardCarouselList__onTouchEnd, moduleCardCarouselList__onTouchMove, moduleCardCarouselList__onTouchStart, moduleCardCarouselList__render, moduleCardCarouselList__reset, moduleCardCarouselList__swipeDirection, moduleCardCarouselList__swipePosition, infinity__cardDetailCarouselList__onClickNav, infinity__cardDetailCarouselList__onTouchStart, infinity__cardDetailCarouselList__onTouchMove, infinity__cardDetailCarouselList__onTouchEnd, infinity__cardDetailCarouselList__dotClick, infinity__cardDetailCarouselList__changeAlpha, infinity__cardDetailCarouselList__render, infinity__cardDetailCarouselList__ini, infinity__cardDetailCarouselList__reset, infinity__cardDetailCarouselList__autoSlide, infinity__cardDetailCarouselList__autoSlideCansel, infinity__cardDetailCarouselList__bringElementFrontNum, infinity__cardDetailCarouselList__isAnimate, infinity__cardDetailCarouselList__timer, moduleScrollMenu__changeActive, navSearch__closeflag, navSearch__onBlurNavSearch, navSearch__onMouseClickNavSearch, navSearch__onMouseEnterNavSearch, navSearch__onMouseLeaveNavSearch, offL_XL, offS_M, onL_XL, onResize, onS_M, onScrollWindowL_XL, onScrollWindowS_M; 427 isL_XL = true; 428 isInit = true; 429 window_mainMenuMouseOverFlag = false; 430 breakpointPC = 1024; 431 breakpointTablet = 768; 432 breakpointMobile = 480; 433 init = function() { 434 $(window).on('resize', onResize); 435 onResize(); 436 return this; 437 }; 438 onResize = function(e) { 439 if ((window.matchMedia('(max-width: ' + (breakpointTablet - 1) + 'px)').matches)) { 440 if (isL_XL || isInit) { 441 if (!isInit) { 442 offL_XL(); 443 } 444 onS_M(); 445 isL_XL = false; 446 } 447 } else { 448 if (!isL_XL || isInit) { 449 if (!isInit) { 450 offS_M(); 451 } 452 onL_XL(); 453 isL_XL = true; 454 } 455 } 456 isInit = false; 457 return this; 458 }; 459 460 /* footerãããã¸æ»ããã¿ã³ãfixedãããã¸æ»ããã¿ã³ï¼ã¹ã¯ãã¼ã«ããã¨åºã¦ãããããã¸æ»ããã¿ã³ï¼ 461 */ 462 var fixedMenu = $(".adsorptionArea"); 463 464 onScrollWindowL_XL = function(e) { 465 // å¸çãã¿ã³ãfoterã®ä¸ã«æ½ããªãããã«ãå¸çãã¿ã³ã®é«ããåå¾ãã¦è¨å® 466 var fixedMenuHeight = $('.adsorptionArea__fixed').outerHeight(); 467 fixedMenu.css("height", fixedMenuHeight + 'px'); 468 469 var s; 470 s = $(this).scrollTop(); 471 if (fixedMenu.length > 0) { 472 if (fixedMenu.hasClass("fixed")) { 473 if (s > fixedMenu.offset().top - $(window).height() + fixedMenuHeight) { 474 fixedMenu.removeClass("fixed"); 475 } 476 } else { 477 if (s <= fixedMenu.offset().top - $(window).height() + fixedMenuHeight) { 478 fixedMenu.addClass("fixed"); 479 } 480 } 481 } 482 }; 483 onScrollWindowS_M = function(e) { 484 // å¸çãã¿ã³ãfoterã®ä¸ã«æ½ããªãããã«ãå¸çãã¿ã³ã®é«ããåå¾ãã¦è¨å® 485 // ã¾ãå¸çãã¿ã³ãPCã¨SPã«åããã¦ããã±ã¼ã¹ããããããSPæç¡ã®å¤å®ããã 486 var fixedMenuHeight; 487 if (fixedMenu.find('.fixedAreaSP').length) { 488 fixedMenuHeight = $('.fixedAreaSP .adsorptionArea__fixed').outerHeight(); 489 } else { 490 fixedMenuHeight = $('.adsorptionArea__fixed').outerHeight(); 491 } 492 fixedMenu.css("height", fixedMenuHeight + 'px'); 493 494 var s; 495 s = $(this).scrollTop(); 496 if (fixedMenu.length > 0) { 497 if (fixedMenu.hasClass("fixed")) { 498 if (s > fixedMenu.offset().top - $(window).height() + fixedMenuHeight) { 499 fixedMenu.removeClass("fixed"); 500 } 501 } else { 502 if (s <= fixedMenu.offset().top - $(window).height() + fixedMenuHeight) { 503 fixedMenu.addClass("fixed"); 504 } 505 } 506 } 507 }; 508 onL_XL = function() { 509 $(window).on("scroll", onScrollWindowL_XL); 510 onScrollWindowL_XL(null); 511 }; 512 offL_XL = function() { 513 $(window).off("scroll"); 514 }; 515 onS_M = function() { 516 $(window).on("scroll", onScrollWindowS_M); 517 onScrollWindowS_M(null); 518 }; 519 offS_M = function() { 520 $(window).off("scroll"); 521 }; 522 init(); 523 }); 524}).call(this); 525 526//SUã¹ã©ã¤ãã¢ã¸ã¥ã¼ã« 527$(function(){ 528 const swiper = new Swiper(".slider__SU__container .swiper", { 529 slidesPerView: 1, 530 breakpoints: { 531 768: { 532 slidesPerView: 2, 533 spaceBetween: 50, 534 } 535 }, 536 pagination: { 537 el: ".swiper-pagination", 538 clickable: true, 539 }, 540 navigation: { 541 nextEl: ".swiper-button-next", 542 prevEl: ".swiper-button-prev" 543 } 544 }); 545}); 546 547/** 548 * ç»åã¬ã¤ã¢ã¦ãï¼è¡ãã¨ã«åæ°ãè¨å®å¯ï¼ 549 */ 550 $(window).on('load resize', function () { 551 const imgList = document.querySelectorAll('.imgList'); 552 //.imgListãã¨ã«å¦ç 553 imgList.forEach(e => { 554 const cList = e.classList; 555 let linePCNum = []; 556 let lineSPNum = []; 557 const imgListItem = e.children[0].children; 558 let step = -1; 559 //classã«è¨å®ãããåæ°ãåå¾ 560 cList.forEach(e => { 561 if (e.startsWith('imgListPC')) { 562 const num = e.split('imgListPC'); 563 linePCNum = num[1].split('-'); 564 } else if (e.startsWith('imgListSP')) { 565 const num = e.split('imgListSP'); 566 lineSPNum = num[1].split('-'); 567 } 568 }); 569 //ã¬ã¹ãã³ã·ã対å¿ã§ãã¼ã¸ã³ããªã»ãã 570 for (item of imgListItem) { 571 item.style.marginRight = ''; 572 item.style.marginLeft = ''; 573 } 574 //è¨å®ãããåæ°ã«æ²¿ã£ã¦ãã¼ã¸ã³ä»ä¸ 575 if (window.matchMedia("(min-width: 768px)").matches) { 576 linePCNum.forEach(e => { 577 e = Number(e); 578 if (imgListItem[step + e]) { 579 if (e == 2) { 580 imgListItem[step + e].style.marginRight = '30%'; 581 imgListItem[step + e - 1].style.marginLeft = '30%'; 582 } else if (e == 3) { 583 imgListItem[step + e].style.marginRight = '20%'; 584 imgListItem[step + e - 2].style.marginLeft = '20%'; 585 } else if (e == 4) { 586 imgListItem[step + e].style.marginRight = '11%'; 587 imgListItem[step + e - 3].style.marginLeft = '11%'; 588 } else if (e == 5) { 589 imgListItem[step + e].style.marginRight = '5%'; 590 imgListItem[step + e - 4].style.marginLeft = '5%'; 591 } else { 592 e = 6; 593 } 594 step = step + e; 595 } 596 }); 597 } else { 598 lineSPNum.forEach(e => { 599 e = Number(e); 600 if (imgListItem[step + e]) { 601 if (e == 2) { 602 imgListItem[step + e].style.marginRight = '11%'; 603 imgListItem[step + e - 1].style.marginLeft = '11%'; 604 } else { 605 e = 3; 606 } 607 step = step + e; 608 } 609 }); 610 } 611 }); 612}); 613 614//ãã©ã¡ã¼ã¿ã¿ãåãæ¿ãã¢ã¸ã¥ã¼ã« 615$(function(){ 616 var url__Par = location.search.substring(1); 617 if(url__Par) { 618 var paramArray__Par = new Object; 619 var pair=location.search.substring(1).split(/abopen=|,|&/); 620 for(var i=0;pair[i];i++) { 621 var kv = pair[i].split('='); 622 paramArray__Par[kv[0]]=kv[1]; 623 } 624 $('.tabArea__Par').each(function(j){ 625 let that = $(this); 626 let data1 = $(this).find('.tab__Par01 a').data('par'); 627 let data2 = $(this).find('.tab__Par02 a').data('par'); 628 let data3 = $(this).find('.tab__Par03 a').data('par'); 629 $.each(paramArray__Par, function(i) { 630 if (i == data1) { 631 that.find('.tab__Par01 a').addClass('active'); 632 that.find('.tab__Par02 a').removeClass('active'); 633 that.find('.tab__Par03 a').removeClass('active'); 634 } 635 if (i == data2) { 636 that.find('.tab__Par01 a').removeClass('active'); 637 that.find('.tab__Par02 a').addClass('active'); 638 that.find('.tab__Par03 a').removeClass('active'); 639 } 640 if (i == data3) { 641 that.find('.tab__Par01 a').removeClass('active'); 642 that.find('.tab__Par02 a').removeClass('active'); 643 that.find('.tab__Par03 a').addClass('active'); 644 } 645 }); 646 }); 647 } 648 var switchTab__Par = $('.tabArea__Par .tab__Par.switchTab__Par'); 649 switchTab__Par.each(function(){ 650 var thisElm__Par = $(this); 651 var thisBtn__Par = thisElm__Par.find('li'); 652 var thisCurrentClass__Par = thisElm__Par.find('li').has('a.active').attr('class'); 653 if(thisElm__Par.parent().next('section').length > 0) { 654 var targetArea__Par = thisElm__Par.parent().next('section').children();
655 } else { 656 var targetArea__Par = thisElm__Par.parent().next(); 657 } 658 var targetAreaChild__Par = targetArea__Par.children(); 659 targetAreaChild__Par.hide(); 660 targetArea__Par.find('.' + thisCurrentClass__Par).show(); 661 thisBtn__Par.on('click',function(){ 662 var thisElm__Par = $(this); 663 thisBtn__Par.find('a').removeClass('active'); 664 thisElm__Par.find('a').addClass('active'); 665 targetAreaChild__Par.hide(); 666 targetArea__Par.find('.' + thisElm__Par.attr('class')).show(); 667 }); 668 }); 669}); 670 671//ã«ã«ã¼ã»ã«ã¢ã¸ã¥ã¼ã« 672$(function(){ 673 $('.usual__slider').each(function(){ 674 let slideView; 675 let slides = $(this).find('.usual__slider__item').length; 676 if (matchMedia('only screen and (max-width: 767px)').matches) { 677 slideView = 2; 678 } else { 679 slideView = 4; 680 } 681 let slidable = slides > slideView; 682 if (slides == 0) { 683 $('.sec.usual').hide(); 684 } 685 if (slidable) { 686 $(".usual__slider").addClass('is-active'); 687 } 688 $('.usual__slider').css('opacity', 1); 689 if (3 <= slides) { 690 $(this).addClass('is-swiper'); 691 } 692 else { 693 $(this).addClass('usual__slider_none'); 694 } 695 }); 696 swiper_set(); 697 }) 698function swiper_set() { 699 const swiper_aa = new Swiper('.usual__slider.is-swiper', { 700 loop: true, 701 pagination: { 702 el: '.usual__swiper-pagination', 703 clickable: true, 704 freeModeSticky:true, 705 }, 706 navigation: { 707 nextEl: '.usual__slider_area .swiper-button-next', 708 prevEl: '.usual__slider_area .swiper-button-prev', 709 }, 710 autoplay: { 711 delay: 5000, 712 disableOnInteraction: false, 713 714 }, 715 centeredSlides: true, 716 slidesPerView: 2, 717 speed: 500, 718 spaceBetween: 10, 719 centerInsufficientSlides: true, 720 watchOverflow: true, 721 breakpoints: { 722 610: { 723 spaceBetween: 10, 724 slidesPerView: 2.5, 725 }, 726 768: { 727 slidesPerView: 3, 728 spaceBetween: 18, 729 } 730 } 731 }); 732}
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.