var ecblib = ecblib || {}; ecblib.customize = ecblib.customize || {}; ecblib.customize.user = ecblib.customize.user || {}; function locationJump(url) { if (url == "" || url == undefined) { return false; } location.href = url; } jQuery(function () { var _user = ecblib.customize.user; //グローバルナビ jQuery('.js-globalnav-menu').click(function () { if(jQuery(this).hasClass('js-active')){ jQuery('.block-globalnav-menu').fadeOut(); jQuery(this).removeClass('js-active'); }else{ var menuId = jQuery(this).attr('href'); var headerH = Math.floor(jQuery('#header').height()); jQuery('.block-globalnav-menu').hide(); jQuery(menuId).fadeIn().css('top', headerH + 'px'); jQuery('.js-globalnav-menu').removeClass('js-active'); jQuery(this).addClass('js-active'); } return false; }); jQuery('.js-globalnav-close, .js-globalnav-menu--anchor').click(function () { jQuery('.block-globalnav-menu').fadeOut(); jQuery('.js-globalnav-menu''js-active'); return false; }); jQuery(document).on('click', function(e) { if (!jQuery(e.target).closest('#header, .block-globalnav-menu').length) { if(jQuery('.js-globalnav-menu').hasClass('js-active')){ jQuery('.block-globalnav-menu').fadeOut(); jQuery('.js-globalnav-menu').removeClass('js-active'); } } }); //ヘッダー 検索 jQuery('.block-headernav--item-list li.block-headernav--search').hover(function(){ sethover = setTimeout(jQuery.proxy(function(){ jQuery(this).addClass('js-active'); }, this), 300); }); jQuery(document).on('click', function(e) { if (!jQuery(e.target).closest('.block-headernav--item-list li.block-headernav--search').length) { if(jQuery('.block-headernav--item-list li.block-headernav--search').hasClass('js-active')){ jQuery('.block-headernav--item-list li.block-headernav--search').removeClass('js-active'); } } }); //-- カテゴリツリー if (jQuery('.block-category-tree--level-2').length) { jQuery('.block-category-tree--level-2').each(function() { jQuery(this).before('アコーディオン'); jQuery(this).parent('li').children('a').addClass('js-accordion-link'); }); if (jQuery('.block-category-tree--level-3').length) { jQuery('.block-category-tree--level-3').each(function() { jQuery(this).before('アコーディオン'); jQuery(this).parent('li').children('a').addClass('js-accordion-link'); }); } if (jQuery('.block-category-tree--level-4').length) { jQuery('.block-category-tree--level-4').each(function() { jQuery(this).before('アコーディオン'); jQuery(this).parent('li').children('a').addClass('js-accordion-link'); }); } if (jQuery('.block-category-tree--item__open').length) { jQuery('.block-category-tree--item__open').children('.js-accordion').addClass('is-close'); jQuery('.block-category-tree--item__open').parents('.block-category-tree--items').css('display','block'); jQuery('.block-category-tree--item__open').parents('.block-category-tree--items').prev('.js-accordion').addClass('is-close'); } } //カテゴリツリー アコーディオン展開 jQuery('.block-category-tree .js-accordion').click(function() { jQuery(this).next('.block-category-tree--items').slideToggle(); jQuery(this).toggleClass('is-close'); }); //-- ジャンルツリー if (jQuery('.block-genre-tree--level2').length) { jQuery('.block-genre-tree--level2').each(function() { jQuery(this).before('アコーディオン'); jQuery(this).parent('li').children('a').addClass('js-accordion-link'); }); if (jQuery('.block-genre-tree--level3').length) { jQuery('.block-genre-tree--level3').each(function() { jQuery(this).before('アコーディオン'); jQuery(this).parent('li').children('a').addClass('js-accordion-link'); }); } if (jQuery('.block-genre-tree--level4').length) { jQuery('.block-genre-tree--level4').each(function() { jQuery(this).before('アコーディオン'); jQuery(this).parent('li').children('a').addClass('js-accordion-link'); }); } if (jQuery('.block-genre-tree--item__open').length) { jQuery('.block-genre-tree--item__open').children('.js-accordion').addClass('is-close'); jQuery('.block-genre-tree--item__open').parents('.block-genre-tree--items').css('display','block'); jQuery('.block-genre-tree--item__open').parents('.block-genre-tree--items').prev('.js-accordion').addClass('is-close'); } } //ジャンルツリー アコーディオン展開 jQuery('.block-genre-tree .js-accordion').click(function() { jQuery(this).next('.block-genre-tree--items').slideToggle(); jQuery(this).toggleClass('is-close'); }); //商品一覧ページャー省略 jQuery('div.pager').each(function() { jQuery(this).find('.pagination li.pager-current').parent('.pagination').addClass('js-numbers'); }); jQuery('.pagination.js-numbers').each(function() { //省略要素のHTML var pageOmit = '
  • ...
  • '; //ページャーの最初と最後にclass追加 jQuery(this).children('li:first-child').addClass('js-first'); jQuery(this).children('li:last-child').addClass('js-last'); var pageSize = jQuery(this).children('li').length; if (pageSize > 5) { //5ページ以上で省略 if(jQuery(this).children('li:first-child').hasClass('pager-current')){ //最初のページの時 jQuery(this).children('li:lt(3)').addClass('js-show'); jQuery(this).children('li.js-show:last').after(pageOmit); } else if(jQuery(this).children('li:last-child').hasClass('pager-current')){ //最後のページの時 jQuery(this).children('li:nth-last-child(-n+3)').addClass('js-show'); jQuery(this).children('li.js-show:eq(0)').before(pageOmit); } else if(jQuery(this).children('li:eq(1)').hasClass('pager-current')){ //2ページ目の時 jQuery(this).children('li:eq(2)').addClass('js-show'); jQuery(this).children('li.js-show').after(pageOmit); } else if(jQuery(this).children('li:eq(2)').hasClass('pager-current')){ //3ページ目の時 jQuery(this).children('li:eq(1)').addClass('js-show'); jQuery(this).children('li:eq(3)').addClass('js-show'); jQuery(this).children('li.pager-current').next('li.js-show').after(pageOmit); } else if(jQuery(this).children('li:nth-last-child(2)').hasClass('pager-current')){ //最後から2番目ページの時 jQuery(this).children('li.pager-current').prev('li').addClass('js-show'); jQuery(this).children('li.pager-current').prev('li.js-show').before(pageOmit); } else if(jQuery(this).children('li:nth-last-child(3)').hasClass('pager-current')){ //最後から3番目ページの時 jQuery(this).children('li.pager-current').prev('li').addClass('js-show'); jQuery(this).children('li.pager-current').next('li').addClass('js-show'); jQuery(this).children('li.pager-current').prev('li.js-show').before(pageOmit); } else { jQuery(this).children('li.pager-current').prev('li').addClass('js-show'); jQuery(this).children('li.pager-current').next('li').addClass('js-show'); jQuery(this).children('li.pager-current').prev('li.js-show').before(pageOmit); jQuery(this).children('li.pager-current').next('li.js-show').after(pageOmit); } } else { jQuery(this).removeClass('js-numbers'); } }); //最近ご覧になった商品 スライダー if (jQuery('#itemHistory').length) { var HistorySize = jQuery('#itemHistory').find('.block-thumbnail-h li').length; if(HistorySize > 7) { jQuery('#itemHistory').find('.block-thumbnail-h').slick({ arrows: true, slidesToShow: 7, slidesToScroll: 1, }); } else { jQuery('#itemHistory').find('.block-thumbnail-h').addClass('js-scroll'); } } //よくある質問 jQuery('.block-freeguide--faq-box-q').click(function () { jQuery(this).toggleClass('js-open'); jQuery(this).next('.block-freeguide--faq-box-a').slideToggle(); }); jQuery('.js-faq-open').click(function () { var faqId = jQuery(this).attr('href'); jQuery(faqId).children('.block-freeguide--faq-box-q').addClass('js-open'); jQuery(faqId).children('.block-freeguide--faq-box-a').slideDown(); }); //商品購入規約 if (jQuery('.block-goods-agree--privacy').length) { var $submitBtn = jQuery('[type=submit]'), $privacyCheckbox = jQuery('[name=privacy]'), $birthday = jQuery('[name=birthday]'), $birthday2 = jQuery('[name=year],[name="month"],[name="date"]'), $ageLimitFg = jQuery('[name=age_limit_fg]'); function addDisabled() { setTimeout(function() { var privacyCheckboxVal = $privacyCheckbox.filter(':checked').val(); if($ageLimitFg.length) { if(privacyCheckboxVal == 1 && $ageLimitFg.val() == 'adult') { $submitBtn.removeAttr('disabled').removeClass('disabled'); } else { $submitBtn.attr('disabled', 'disabled').addClass('disabled'); } } else { if(privacyCheckboxVal == 1) { $submitBtn.removeAttr('disabled').removeClass('disabled'); } else { $submitBtn.attr('disabled', 'disabled').addClass('disabled'); } } }, 10); } addDisabled(); $privacyCheckbox.on('change', function() { addDisabled(); }); $birthday.on('blur', function() { addDisabled(); }); $birthday2.on('change', function() { addDisabled(); }); } if(jQuery('input[name="age_limit_fg"]').length >= 2) { jQuery('input[name="age_limit_fg"]').each(function(i, elem) { if (i >= 1) { jQuery(elem).parents('.agree-overlapping').hide(); } }); } //商品一覧 MVスライダー if (jQuery('.block-list-page--header-slider').length) { var listPageMv = jQuery('.block-list-page--header-slider ul li').length; if(listPageMv > 1) { jQuery('.block-list-page--header-slider ul').slick({ dots: true, infinite: true, speed: 500, autoplay: true, autoplaySpeed: 3000, pauseOnHover: true, arrows: true, slidesToShow: 1, lazyLoad: 'progressive', }); } } //フッター背景切り替え if (jQuery('.block-footer-inner').length) { var num = Math.ceil(4 * Math.random()); jQuery('.block-footer-inner').addClass('js-background' + num); } //-- トップページへ戻る初期値 jQuery('#footer_pagetop').hide(); //--- スムーススクロール jQuery('a[href^="#"]').not(".no-scroll").click(function (e) { var speed = 500; var headerH; var headerH = jQuery('#header').height(); var href = jQuery(this).attr("href"); var target = jQuery(href == "#" || href == "" ? 'html' : href); var position = target.offset().top - headerH; jQuery.when( jQuery('body,html').animate({ scrollTop: position }, speed, 'swing'), e.preventDefault() ).done(function(){ var diff = target.offset().top - headerH; if(diff !== position) { jQuery('body,html').animate({ scrollTop: diff }, 10, 'swing'); } }) return false; }); if (location.hash) { var hash = location.hash; var headerH; var headerH = jQuery('#header').height(); setTimeout(function(){ var pos = jQuery(location.hash).offset().top - headerH; jQuery("html, body").scrollTop(pos); },200); } }); jQuery(window).on('scroll resize', function () { var _user = ecblib.customize.user; var scrollHeight = jQuery(document).height(); var scrollPosition = jQuery(window).height() + jQuery(window).scrollTop(); var footHeight = jQuery('footer').height(); if (jQuery(this).scrollTop() > 120) { jQuery('#footer_pagetop').fadeIn(); } else if (jQuery(this).scrollTop() < 80) { jQuery('#footer_pagetop').fadeOut(); } if (scrollHeight - scrollPosition <= footHeight) { jQuery('#footer_pagetop').css({ 'position': 'absolute', 'bottom': (footHeight - 22) + 'px' }); } else { jQuery('#footer_pagetop').css({ 'position': 'fixed', 'bottom': '10px' }); } }); jQuery(window).on('load resize', function(){ //テキスト省略 //トップページバナー if (jQuery('.block-top-body--banner').length) { jQuery("div.block-top-body--banner ul li span").ry({ size: 53, suffix: '...' }); } //4つ並び if (jQuery('.block-thumbnail-t').length) { if (jQuery('.page-top').length) { jQuery(".block-thumbnail-t--goods-name a").ry({ size: 37, suffix: '...' }); jQuery(".block-thumbnail-t--supplier-place").ry({ size: 16, suffix: '...' }); jQuery(".block-thumbnail-t--comment").ry({ size: 22, suffix: '...' }); } else { jQuery(".block-thumbnail-t--goods-name a").ry({ size: 27, suffix: '...' }); jQuery(".block-thumbnail-t--supplier-place").ry({ size: 12, suffix: '...' }); jQuery(".block-thumbnail-t--comment").ry({ size: 16, suffix: '...' }); } } //3つ+4つ並び if (jQuery('.block-pickup-list-p').length) { jQuery(".block-pickup-list-p--goods-name:lt(3) a").ry({ size: 38, suffix: '...' }); jQuery(".block-pickup-list-p--supplier-place:lt(3)").ry({ size: 18, suffix: '...' }); jQuery(".block-pickup-list-p--comment:lt(3)").ry({ size: 24, suffix: '...' }); jQuery(".block-pickup-list-p--goods-name:gt(2) a").ry({ size: 28, suffix: '...' }); jQuery(".block-pickup-list-p--supplier-place:gt(2)").ry({ size: 12, suffix: '...' }); jQuery(".block-pickup-list-p--comment:gt(2)").ry({ size: 17, suffix: '...' }); } if (jQuery('.block-pickup-list-s').length) { jQuery(".block-pickup-list-s--goods-name:lt(3) a").ry({ size: 38, suffix: '...' }); jQuery(".block-pickup-list-s--supplier-place:lt(3)").ry({ size: 18, suffix: '...' }); jQuery(".block-pickup-list-s--comment:lt(3)").ry({ size: 24, suffix: '...' }); jQuery(".block-pickup-list-s--goods-name:gt(2) a").ry({ size: 28, suffix: '...' }); jQuery(".block-pickup-list-s--supplier-place:gt(2)").ry({ size: 12, suffix: '...' }); jQuery(".block-pickup-list-s--comment:gt(2)").ry({ size: 17, suffix: '...' }); } //ランキング if (jQuery('.block-ranking-r').length) { if (jQuery('.page-top').length) { jQuery(".block-ranking-r--goods-name a").ry({ size: 37, suffix: '...' }); jQuery(".block-ranking-r--supplier-place").ry({ size: 16, suffix: '...' }); jQuery(".block-ranking-r--comment").ry({ size: 22, suffix: '...' }); } else { jQuery(".block-ranking-r--goods-name a").ry({ size: 28, suffix: '...' }); jQuery(".block-ranking-r--supplier-place").ry({ size: 12, suffix: '...' }); jQuery(".block-ranking-r--comment").ry({ size: 17, suffix: '...' }); } } //最近ご覧になった商品 if (jQuery('.block-thumbnail-h').length) { jQuery(".block-thumbnail-h--goods-name a").ry({ size: 18, suffix: '...' }); jQuery(".block-thumbnail-h--supplier-place").ry({ size: 7, suffix: '...' }); } //高さ調整 jQuery('.block-thumbnail-t--goods-description').each(function(){ if (!(jQuery(this).find('.block-icon').length)) { jQuery(this).prepend('
    '); } }); jQuery('.block-ranking-r--goods-description').each(function(){ if (!(jQuery(this).find('.block-icon').length)) { jQuery(this).prepend('
    '); } }); jQuery('.block-pickup-list-p--item-description').each(function(){ if (!(jQuery(this).find('.block-icon').length)) { jQuery(this).prepend('
    '); } }); if (jQuery('.block-thumbnail-t').length) { jQuery('.block-thumbnail-t').each(function(){ jQuery(this).find('.block-icon').tile(4); jQuery(this).find('.block-thumbnail-t--goods-name').tile(4); jQuery(this).find('.block-thumbnail-t--gift').tile(4); jQuery(this).find('.block-thumbnail-t--price-infos').tile(4); jQuery(this).find('.block-thumbnail-t--supplier').tile(4); }); } if (jQuery('.block-variation').length) { jQuery('.block-size--item dt').tile(4); } if (jQuery('.block-ranking-r').length) { jQuery('.block-ranking-r--goods-description').find('.block-icon').tile(4); jQuery('.block-ranking-r--goods-name').tile(4); jQuery('.block-ranking-r--gift').tile(4); jQuery('.block-ranking-r--price-infos').tile(4); jQuery('.block-ranking-r--supplier').tile(4); } if (jQuery('.block-pickup-list-p').length) { jQuery('.block-pickup-list-p--item-body:lt(3)').addClass('js-adj3'); jQuery('.block-pickup-list-p--item-body:gt(2)').addClass('js-adj4'); jQuery('.block-pickup-list-p--item-body.js-adj3').find('.block-icon').tile(3); jQuery('.block-pickup-list-p--item-body.js-adj3').find('.block-pickup-list-p--goods-name').tile(3); jQuery('.block-pickup-list-p--item-body.js-adj3').find('.block-pickup-list-p--gift').tile(3); jQuery('.block-pickup-list-p--item-body.js-adj3').find('.block-pickup-list-p--price-infos').tile(3); jQuery('.block-pickup-list-p--item-body.js-adj3').find('.block-pickup-list-p--supplier').tile(3); jQuery('.block-pickup-list-p--item-body.js-adj4').find('.block-icon').tile(4); jQuery('.block-pickup-list-p--item-body.js-adj4').find('.block-pickup-list-p--goods-name').tile(4); jQuery('.block-pickup-list-p--item-body.js-adj4').find('.block-pickup-list-p--gift').tile(4); jQuery('.block-pickup-list-p--item-body.js-adj4').find('.block-pickup-list-p--price-infos').tile(4); jQuery('.block-pickup-list-p--item-body.js-adj4').find('.block-pickup-list-p--supplier').tile(4); } if (jQuery('.block-pickup-list-s').length) { jQuery('.block-pickup-list-s--item-body:lt(3)').addClass('js-adj3'); jQuery('.block-pickup-list-s--item-body:gt(2)').addClass('js-adj4'); jQuery('.block-pickup-list-s--item-body.js-adj3').find('.block-pickup-list-s--goods-name').tile(3); jQuery('.block-pickup-list-s--item-body.js-adj3').find('.block-pickup-list-s--gift').tile(3); jQuery('.block-pickup-list-s--item-body.js-adj4').find('.block-pickup-list-s--goods-name').tile(4); jQuery('.block-pickup-list-s--item-body.js-adj4').find('.block-pickup-list-s--gift').tile(4); } //最近ご覧になった商品 setTimeout(function(){ for (var i=1; i<500; i++) { if (jQuery('.block-thumbnail-h').length) { if (jQuery('.block-thumbnail-h').length) { jQuery(".block-thumbnail-h--goods-name a").ry({ size: 17, suffix: '...' }); jQuery(".block-thumbnail-h--supplier-place").ry({ size: 7, suffix: '...' }); } if (jQuery('.block-thumbnail-h').length) { jQuery('.block-thumbnail-h--goods-name').tile(50); jQuery('.block-thumbnail-h--gift').tile(50); jQuery('.block-thumbnail-h--price-items').tile(50); } break; } } },1000); }); jQuery(window).on('load', function(){ //商品詳細 レビコ表示位置調整 jQuery('div.pane-goods-footer').insertAfter('div.block-goods-detail'); setTimeout(function(){ for (var i=1; i<500; i++) { if (jQuery('#revico-review-zone').length) { jQuery('#revico-review-zone').insertBefore('div.pane-goods-footer'); jQuery('#revico-review-zone').wrap('
    '); break; } } },1000); //最近ご覧になった商品 スライダー if (jQuery('#itemHistory').length) { setTimeout(function(){ var HistorySize = jQuery('#itemHistory').find('.block-thumbnail-h li').length; if(HistorySize > 7) { jQuery('#itemHistory').find('.block-thumbnail-h').slick({ arrows: true, slidesToShow: 7, slidesToScroll: 1, }); } else { jQuery('#itemHistory').find('.block-thumbnail-h').addClass('js-scroll'); } },3000); } }); jQuery(function(){ jQuery(".pane-contents").before(jQuery(".point-exchange-slider-box")); jQuery('.point-exchange-slider').slick({ centerMode: true, // slidesToShowが奇数のとき、現在のスライドを中央に表示する variableWidth: true, // スライド幅の自動計算を無効化 dots: true, autoplay: true, }); }); jQuery(function(){ jQuery(".block-pickup-list-p--comment").ry({ size: 18, suffix: '...' }); jQuery(".block-ranking-r--comment").ry({ size: 18, mb:false, suffix: '...' }); }); // ポイント交換トップイベントスライダー jQuery(function(){ jQuery('.block-top-ranking-slider').slick({ dots: false, autoplay: false, arrows: true, slidesToShow: 3, slidesToScroll: 3, variableWidth: true, }); }); // ポイント交換商品詳細関連商品スライダー jQuery(function(){ jQuery('.page-point-goods .block-accessory-list .block-thumbnail-t li').slick({ dots: false, autoplay: false, arrows: true, variableWidth: true, }); }); // WESTER移行ページアコーディオン jQuery(function(){ jQuery('.wester-migration-deny').on('click',function(){ if(!jQuery(this).hasClass('active')){ jQuery(this).addClass('active'); jQuery('.block-wester-migration-deny-box').slideDown(); } else{ jQuery(this).removeClass('active'); jQuery('.block-wester-migration-deny-box').slideUp(); } }); }); // ログインページ jQuery(window).on('load', function(){ if (jQuery('body').hasClass('page-login')) { const openClass = 'is-open'; const guestDetailClass = '.area-guest-detail'; const guestTtlClass = '.area-guest-ttl'; let tglBtnParent; if (jQuery('.area-guest').find('.form-error').length) { tglBtnParent = jQuery(guestTtlClass); tglBtnParent.addClass(openClass); tglBtnParent.next(guestDetailClass).slideToggle(); const headerH = jQuery('#header').height() + 20; jQuery('html, body').animate({'scrollTop':tglBtnParent.offset().top - headerH}, 500); } jQuery('.js-login-tgl').on('click', function() { tglBtnParent = jQuery(this).closest(guestTtlClass); tglBtnParent.next(guestDetailClass).slideToggle(); tglBtnParent.toggleClass(openClass); return false; }); } }); window.lazySizesConfig = window.lazySizesConfig || {}; /* lazysizesの設定の変更はここから記述してください ・window.lazySizesConfig.expandは、大きな画像を早めに読み込み開始させたい場合などに使用してください 正の値を指定すると読み込み開始スクロール位置が上に(早く)なります 負の値を設定すると読み込み開始スクロール位置が下に(遅く)なります ※lazySizesConfig.expandを指定しない場合、画像の読み込み状況やブラウザのアイドリング状況に応じて動的に最適化されますが 指定すると動的な最適化が無効になることに注意してください */ jQuery(function () { if (jQuery('.pane-goods-right-side .block-goods-comment').length === 0) { jQuery('.pane-goods-right-side .block-icon').after('
    '); } if (!jQuery('.pane-goods-center').next('#revico-review-zone').length) { jQuery('.pane-goods-center').after('
    '); } if (!jQuery('.revico-star-zone').length) { jQuery('.block-goods-comment').append('
    '); } if (!jQuery('#revico-review-zone').length) { jQuery('.pane-goods-center').after('
    '); } }); // ポイント交換トップイベント jQuery(window).on('load', function() { if(jQuery('.page-point-exchange .item-ranking li').length){ jQuery('.page-point-exchange .item-ranking li').tile(); } }); // 商品ステータス画像 jQuery(function() { jQuery(document).on('click', '.block-icon--overlay-period-before, .block-icon--overlay-period-after, .block-icon--overlay-soldout, .block-icon--overlay-relational-mizukaze', function() { let itemHref; if(jQuery(this).closest('.block-thumbnail-t').length > 0 || jQuery(this).closest('.block-thumbnail-h').length > 0) { itemHref = jQuery(this).closest('.block-icon').next().children('a').attr('href'); } else if(jQuery(this).closest('.block-favorite').length > 0 || jQuery(this).closest('.block-cart--goods-list').length > 0) { itemHref = jQuery(this).closest('.block-icon').prev('a').attr('href'); } else if(jQuery(this).closest('.block-goods-list-c').length > 0) { itemHref = jQuery(this).closest('.block-icon').prev().children('a').attr('href'); } window.location.href = itemHref; }); }); // 帯バナー jQuery(window).on('load',function() { const $infobnr = jQuery('#js-infobnr-wrapper'); if ($infobnr.length) { const infobnrLen = $infobnr.find('.block-headernav--infobnr').length; if (infobnrLen > 1) { $infobnr.slick({ vertical: true, speed: 500, autoplay: true, autoplaySpeed: 3000, arrows: false, lazyLoad: 'progressive' }); } }; }); // 獲得WESTERポイントバナー制御 jQuery(function() { if (jQuery('.block-goods-point').length) { jQuery('.block-comment01').show(); } }); // レコメンドもっと見る jQuery(window).on('load',function() { const recoParet = jQuery('.block-free-common-airecommend-goods-list'); if(recoParet.length) { recoParet.addClass('is-load'); let recoItems = recoParet.find('.block-ranking-r--goods'); let recoTotal = recoItems.length; if(recoTotal > 20) { recoItems.each(function(i) { i = i + 1; if(i > 20) { jQuery(this).addClass('is-hidden'); } }); const moreBtn = jQuery('\').attr({ 'class': 'aireco-more', 'type': 'button' }).text('\u3082\u3063\u3068\u898B\u308B'); // もっと見る recoParet.append(moreBtn); } jQuery(document).on('click', '.aireco-more', function () { recoItems.removeClass('is-hidden'); jQuery(this).fadeOut(200); }); } }); // 追従バナー jQuery(function(){ if(jQuery('body').hasClass('page-top')) { jQuery("#w_campaign_popup").hide(); jQuery(window).scroll(function(){ var scroll = jQuery(window).scrollTop(); var mv_H = jQuery('#top-slider').innerHeight(); if(scroll > mv_H / 2 ) { jQuery("#w_campaign_popup").show(); } }); } if(Cookies.get('popupbnr') == undefined) { } else { jQuery('#w_campaign_popup').addClass('none_bnr'); jQuery("#w_campaign_popup").hide(); } jQuery('#w_campaign_popup .wcp_image').click(function(){ layerPopupHide(1); jQuery('#w_campaign_popup').addClass('none_bnr'); }); jQuery('#w_campaign_popup .wcp_close_btn').click(function(){ layerPopupHide(1); jQuery('#w_campaign_popup').addClass('none_bnr'); }); function layerPopupHide(state) { jQuery("#w_campaign_popup").hide(); if(state === 1) { if(Cookies.get('popupbnr') == undefined) { Cookies.set('popupbnr', 'Y', { expires: 1, path: '/' }); } jQuery('#w_campaign_popup').hide(); } } });