var quickvewbind=null; jQuery(window).load(function() { jQuery('div.goods_').each(function(a){ jQuery(this).attr('id','goods_box' + (a+1)); idname = "#goods_box" + (a+1) + " "; // //--- 高さ調整:ランキング表示 // jQuery(idname + "div.StyleR_Item_ div.name_").tile(3); // jQuery(idname + "div.StyleR_Item_ div.price_").tile(3); // jQuery(idname + "div.StyleR_Item_").tile(3); // // //--- 高さ調整:ピックアップ表示(4個並び) jQuery(idname + "div.StyleP_Item_ div.icon1_").tile(4); jQuery(idname + "div.StyleP_Item_ .desc_ div.img_").tile(4); jQuery(idname + "div.StyleP_Item_ .desc_ div.icon2_").tile(4); jQuery(idname + "div.StyleP_Item_ .desc_ div.price_").tile(4); jQuery(idname + "div.StyleP_Item_ div.tile_elm_").tile(4); jQuery(idname + "div.StyleP_Item_").tile(4); // // //--- 高さ調整:サムネイル表示(5個並び) jQuery("div.contents_ " + idname + "div.StyleT_Item_ div.icon1_").tile(5); jQuery("div.contents_ " + idname + "div.StyleT_Item_ .desc_ div.img_").tile(5); jQuery("div_ " + idname + "div.StyleT_Item_ .desc_ div.price_").tile(5); jQuery("div.contents_ " + idname + "div.StyleT_Item_ div.tile_elm_").tile(5); jQuery("div.contents_ " + idname + "div.StyleT_Item_").tile(5); // // //--- 高さ調整:レコメンド表示 // jQuery(idname + "div.StyleW_Item_ div.icon_").tile(5); // jQuery(idname + "div.StyleW_Item_ div.img_").tile(5); // jQuery(idname + "div.StyleW_Item_ div.name_").tile(5); // jQuery(idname + "div.StyleW_Item_ div.price_").tile(5); // jQuery(idname + "div.StyleW_Item_").tile(5); // //--- 高さ調整:詳細ページ:レコメンド(5個並び) jQuery(idname + "div.StyleI_Item_ div.icon1_").tile(5); jQuery(idname + "div.StyleI_Item_ div.img_").tile(5); jQuery(idname + "div.StyleI_Item_ div.icon2_").tile(5); jQuery(idname + "div.StyleI_Item_ div.price_").tile(5); jQuery(idname + "div.StyleI_Item_ div.tile_elm_").tile(5); jQuery(idname + "div.StyleI_Item_").tile(5); }); //--- 高さ調整:ご利用ガイドページ:目次(5個並び) jQuery(".guide_index_list > li").tile(5); //=========================================================================================================== //商品詳細:商品画像 jQuery('#gallery').each(function() { var imgSize = jQuery(this).find('ul.mainslide_ li').length; if(imgSize > 1){ jQuery('div.etc_goodsimg_item_ a').each(function(i) { jQuery(this).attr("data-slide-index", i); }); var gallery = jQuery('div.goodsimg_ .img_L_ ul.mainslide_').bxSlider({ auto: false, pause: 5000, speed: 300, pager: true, controls: true, pagerCustom: '.etc_goodsimg_line_' , }); } else { jQuery('div.goodsimg_ .img_L_ ul.mainslide_ li').css('display','block'); } }); //=========================================================================================================== //グローバルナビ jQuery('#globalnav > ul > li').hover(function(){ jQuery(this).addClass('active_'); },function(){ jQuery(this).removeClass('active_'); }); jQuery('#globalnav > ul > li span.nolink_').click(function(){ if(jQuery(this).parent().hasClass('active_')){ jQuery('#globalnav > ul > li .gnav_layer_').stop().hide(); jQuery('#globalnav > ul > li').removeClass('on_'); jQuery(this).parent().addClass('on_'); jQuery(this).parent().children('.gnav_layer_').stop().fadeIn('5000'); } if(jQuery('#globalnav > ul > li').hasClass('on_')){ jQuery('.header_inner_').click(function(){ GnavClose(); }); jQuery('.container_').click(function(){ GnavClose(); }); jQuery('#footer').click(function(){ GnavClose(); }); if(!jQuery('.toppage_').length){ jQuery('#header').next('div').click(function(){ GnavClose(); }); } } }); jQuery('p.gnav_layer_close').click(function(){ GnavClose(); }); function GnavClose(){ jQuery('#globalnav > ul > li').children('.gnav_layer_').stop().fadeOut('50000'); jQuery('#globalnav > ul > li').removeClass('active_'); jQuery('#globalnav > ul > li').removeClass('on_'); } }); //ショップリスト あらかじめアコーディオンを開く jQuery(function() { var now_url = window.location.pathname; if(now_url.indexOf('shoplist.aspx') != -1) { jQuery('.acc_list_').each(function(index, area){ jQuery(this).attr('id','area' + index); }); }; var urlHash = location.hash; if (urlHash.indexOf('area0') != -1) { jQuery('#area0').children('dl').children('dt').addClass('open_'); jQuery('#area0').children('dl').children('dd').slideDown(0); } else if (urlHash.indexOf('area1') != -1) { jQuery('#area1').children('dl').children('dt').addClass('open_'); jQuery('#area1').children('dl').children('dd').slideDown(0); } else if (urlHash.indexOf('area2') != -1) { jQuery('#area2').children('dl').children('dt').addClass('open_'); jQuery('#area2').children('dl').children('dd').slideDown(0); } else if (urlHash.indexOf('area3') != -1) { jQuery('#area3').children('dl').children('dt').addClass('open_'); jQuery('#area3').children('dl').children('dd').slideDown(0); } else if (urlHash.indexOf('area4') != -1) { jQuery('#area4').children('dl').children('dt').addClass('open_'); jQuery('#area4').children('dl').children('dd').slideDown(0); } else if (urlHash.indexOf('area5') != -1) { jQuery('#area5').children('dl').children('dt').addClass('open_'); jQuery('#area5').children('dl').children('dd').slideDown(0); } else if (urlHash.indexOf('area6') != -1) { jQuery('#area6').children('dl').children('dt').addClass('open_'); jQuery('#area6').children('dl').children('dd').slideDown(0); } }); jQuery(function() { //ヘッダー jQuery('#header').each(function(){ if(jQuery(this).hasClass('toppage_')){ var headerH = jQuery(this).height() + 30; jQuery('.wrapper_').css('padding-top', headerH + 'px'); } else { if(jQuery('div.navitopicpath_').length){ var headerH = jQuery(this).height() + 10; jQuery('.wrapper_').css('padding-top', headerH + 'px'); } else { var headerH = jQuery(this).height() + 30; jQuery('.wrapper_').css('padding-top', headerH + 'px'); } } }); jQuery(window).on('scroll', function() { if (jQuery(this).scrollTop() > 10) { jQuery('#header').addClass('fixed'); } else { jQuery('#header').removeClass('fixed'); } }); //=========================================================================================================== //検索窓にうっすら文字を入れておく=================================== jQuery('input#keyword[value=""]').val("商品名・キーワードを入力").css("color","#999999"); jQuery("input#keyword").focus(function(){ if(this.value == "商品名・キーワードを入力"){ jQuery(this).val("").css("color","#000000"); } }); jQuery("input#keyword").blur(function(){ if(this.value == ""){ jQuery(this).val("商品名・キーワードを入力") .css("color","#999999"); } if(this.value != "商品名・キーワードを入力"){ jQuery(this).css("color","#000000"); } }); jQuery("input.go_").click(function(){ var keyval = jQuery('#keyword').val() if(keyval == ('商品名・キーワードを入力')){ jQuery('input#keyword').val(""); } }); //=========================================================================================================== //パンくずの移動 jQuery('div.mainframe_ div.navitopicpath_').each(function() { jQuery(this).prependTo('div.contents_'); }); //=========================================================================================================== //[商品一覧]商品画像切り替え/クイックビュー=================================== //クイックビュー用背景 jQuery("body").append(''); jQuery('.goods_').each(function() { if(quickvewbind != null){return false;} //クイックビュー jQuery('.goods_ .item_menu_ a.quick_view_').click(function(){ addQuickView(jQuery(this).parents("[class^='Style'][class$='_Item_ tile_item_']").find(".popup_layer_"), jQuery(this).attr("goods")); if (jQuery(this).parents().nextAll('.popup_layer_').css('display') == 'none') { jQuery(this).parents().nextAll('.popup_layer_').show(); jQuery('.popup_layer_bg_').show(); if (jQuery(this).parents().nextAll('.popup_layer_').find("img.lazy").length > 0){ jQuery(this).parents().nextAll('.popup_layer_').find("img.lazy").bind("load", function(){ }); jQuery(this).parents().nextAll('.popup_layer_').find("img.lazy").each(function(i, elem) { jQuery(elem).attr("src",jQuery(elem).attr("data-original")); }); } return false; } }); jQuery('.popup_layer_ .btn_close_ , .popup_layer_bg_').click(function(){ jQuery('.popup_layer_').hide(); jQuery('.popup_layer_bg_').hide(); }); quickvewbind = 'True'; /** //マウスオーバーで画像を切り替える jQuery('div.goods_ .img_').hover(function(){ var imgsrc = jQuery(this).children('a').children('img.listimg_'); jQuery(this).children('div.goods_ div.img_ > a').addClass('on_'); jQuery(this).children('div.goods_ .item_menu_').addClass('on_'); if (jQuery(this).hasClass("hasover_")) { jQuery(imgsrc).attr('src',(imgsrc).attr('src').replace('/L/','/1/')); } },function(){ var imgsrc = jQuery(this).children('a').children('img.listimg_'); jQuery(this).children('div.goods_ div.img_ > a').removeClass('on_'); jQuery(this).children('div.goods_ .item_menu_').removeClass('on_'); if (jQuery(this).hasClass("hasover_")) { jQuery(imgsrc).attr('src',(imgsrc).attr('src').replace('/1/','/L/')); } }); **/ }); //====================================================================== //[商品一覧/商品詳細]L画像とサムネイル画像の切り替え=================================== jQuery('.etc_goodsimg_ img').click(function(){ var ImgSrc = jQuery(this).attr("src"); var ImgAlt = jQuery(this).attr("alt"); var ImgL = jQuery(this).parents('.goodsimg_').children('.img_L_').find('a').children('img'); jQuery(ImgL).attr({src:ImgSrc,alt:ImgAlt}); jQuery(ImgL).hide().removeAttr('style'); }); //aタグの無効化 jQuery('div.goods_ .goodsimg_ .img_L_ a').click(function(){ return false; }); //====================================================================== //マウスオンで画像の切り替え jQuery('img.imghover_').hover(function(){ jQuery(this).attr('src', jQuery(this).attr('src').replace('_off', '_on')); }, function(){ jQuery(this).attr('src', jQuery(this).attr('src').replace('_on', '_off')); }); //====================================================================== //商品詳細:ショッピングバック jQuery('div.StyleA_Frame_').each(function() { var saSize = jQuery('table.StyleA_Item_').find('tr').length; if (1 < saSize) { //「もっと見る」を追加 jQuery('div.StyleA_Frame_').append('
もっと見る
'); //2番目以降を非表示 jQuery('table.StyleA_Item_').find('tr:not(:first)').addClass('item_hide_'); //クリックして開閉 jQuery('div.StyleA_Frame_').find('.more_').click(function(){ if (jQuery('table.StyleA_Item_').find('tr:not(:first)').hasClass('item_hide_')) { jQuery('table.StyleA_Item_').find('tr:not(:first)').removeClass('item_hide_'); jQuery('div.StyleA_Frame_').find('.more_').text('閉じる').addClass('close_'); } else { jQuery('table.StyleA_Item_').find('tr:not(:first)').addClass('item_hide_'); jQuery('div.StyleA_Frame_').find('.more_').text('もっと見る').removeClass('close_'); } }); } }); //=========================================================================================================== //[商品詳細]店舗在庫=================================== //クイックビュー用背景 jQuery('#shopstock_wrap').each(function() { jQuery('div.cartbox_ ul li.btn_stock_ a').click(function(){ if (jQuery('#shopstock_wrap').css('display') == 'none') { jQuery('#shopstock_wrap').show(); jQuery('.popup_layer_bg_').show(); } return false; }); jQuery('.popup_layer_ .btn_close_ , .popup_layer_bg_, #shopstock_wrap .btn_close_, #shopstock_wrap .top_close_').click(function(){ jQuery('#shopstock_wrap').hide(); jQuery('.popup_layer_bg_').hide(); }); }); //店舗在庫アコーディオン jQuery('#shopstock_wrap .shopstock_body_ .shopstock_list_ h3').click(function(){ jQuery(this).next('div.stocklist_wrap_').slideToggle(); jQuery(this).toggleClass('open_'); }); jQuery('#shopstock_wrap .shopstock_body_ .shopstock_list_ h4').click(function(){ jQuery(this).next('div.stocklist_box_').slideToggle(); jQuery(this).toggleClass('open_'); }); //=========================================================================================================== //[商品詳細]お気に入りふきだし=================================== //jQuery('ul li.btn_bookmark_ a, ul li.bookmark_btn_ a').click(function(){ // jQuery(this).append('
お気に入りに追加しました。
'); // jQuery('div.balloon_bookmark_').fadeIn(); // setTimeout(function(){ // jQuery('div.balloon_bookmark_').fadeOut().queue(function() { // jQuery('div.balloon_bookmark_').remove(); // }); // },1500); // // return false //}); //====================================================================== //最近見た商品 jQuery('#itemHistory').each(function() { var hiSize = jQuery('#sidebox_itemhistory .StyleT_Line_').length; if (8 < hiSize) { var His = jQuery('#itemHistory').find('div.StyleT_Frame_').bxSlider({ auto:false, speed: 500, /* エフェクトのスピード */ pause: 3000, /* 表示間隔 */ slideWidth: 98, minSlides: 8, maxSlides: 8, moveSlides: 1, slideMargin: 30, controls:true, autoHover:true, pager: false, infiniteLoop: true /* ループ */ }); } else { jQuery('#itemHistory').find('div.StyleT_Frame_').css('width','104%'); } }); jQuery('div.StyleH_Frame_').each(function() { var LhiSize = jQuery(this).find('div.StyleH_Item_').length; if (8 < LhiSize) { var LHis = jQuery('div.StyleH_Line_').bxSlider({ auto:false, speed: 500, /* エフェクトのスピード */ pause: 3000, /* 表示間隔 */ slideWidth: 98, minSlides: 8, maxSlides: 8, moveSlides: 1, slideMargin: 30, controls:true, autoHover:true, pager: false, infiniteLoop: true /* ループ */ }); } else { jQuery('div.StyleH_Line_').css('width','104%'); } }); //====================================================================== //並び替えと表示切替を囲う=================================== jQuery('dl.navisort_').each(function() { jQuery(this).addClass('switching_item_'); jQuery('dl.navistyle_').addClass('switching_item_'); jQuery(".switching_item_").wrapAll('
'); }); //====================================================================== //サイドナビ;アコーディオン=================================== jQuery('div.leftnav_ ul.layer1_ > li > span.nolink_:not(div.leftnav_ ul.layer1_ > li.nochild_ > span.nolink_, div.leftnav_ ul.layer1_ > li.price_acc_ > span.nolink_)').click(function(){ jQuery(this).parent('li').toggleClass('open_'); jQuery(this).next('ul.layer2_').slideToggle(); }); var op2=''; var op3=''; jQuery('div.leftnav_ ul li').each(function(){ if(jQuery(this).attr('class') == 'side_tree2_open_'){ op2='on'; }else if(jQuery(this).attr('class') == 'side_tree2_'){ op2=''; } if(jQuery(this).attr('class') == 'side_tree3_open_'){ op3='on'; }else if(jQuery(this).attr('class') == 'side_tree3_'){ op3=''; if(op2 == 'on'){ jQuery(this).show(); } } if(jQuery(this).attr('class') == 'side_tree4_'){ if(op3 == 'on'){ jQuery(this).show(); } }else if(jQuery(this).attr('class') == 'side_tree4_open_'){ jQuery(this).prevAll().each(function(){ if(jQuery(this).attr('class') == 'side_tree2_'){ jQuery(this).show(); return false; } if(jQuery(this).attr('class') == 'side_tree3_'){ jQuery(this).show(); } }); } }); //====================================================================== //サイドナビ;価格スライド=================================== jQuery('div.leftnav_ ul.layer1_ > li.price_side_').each(function() { var min=0; var max=0; if(jQuery('#bst_price_low').val() != ''){ min = jQuery('#bst_price_low').val();} if(jQuery('#bst_price_up').val() != ''){ max = jQuery('#bst_price_up').val();} jQuery("#price_slider").noUiSlider({ start: [min,max], step: 1000, connect: true, format: wNumb({ decimals: 0 }), range: { 'min': 0, 'max': 60000 } }); jQuery('#price_slider').Link('lower').to(jQuery('#bst_price_low'), 'val'); jQuery('#price_slider').Link('upper').to(jQuery('#bst_price_up'), 'val'); }); //=========================================================================================================== //[柄一覧]ジャンル画像=================================== jQuery('div.Genre_Tstyle_').each(function() { //列の奇数列にクラスを追加 jQuery(this).children('div.Genre_Tstyle_Line_:nth-child(odd)').addClass('odd_'); //列の偶数列にクラスを追加 jQuery(this).children('div.Genre_Tstyle_Line_:nth-child(even)').addClass('even_'); //奇数列の1番目の表示を大きくする jQuery(this).children('div.Genre_Tstyle_Line_.odd_').children('div.Genre_Tstyle_Item_:first-child').addClass('large_img_'); //偶数列の5番目の表示を大きくする jQuery(this).children('div.Genre_Tstyle_Line_.even_').children('div.Genre_Tstyle_Item_:nth-child(5)').addClass('large_img_'); //奇数列の2番目~5番目にclassを追加する jQuery('div.Genre_Tstyle_Line_.odd_').each(function() { jQuery(this).children('div.Genre_Tstyle_Item_:lt(5):gt(0)').addClass('small_img_'); }); jQuery(this).children('div.Genre_Tstyle_Line_.odd_').children('div.Genre_Tstyle_Item_:nth-child(2)').css({'top':'0', 'left':'412px'}); jQuery(this).children('div.Genre_Tstyle_Line_.odd_').children('div.Genre_Tstyle_Item_:nth-child(3)').css({'top':'0', 'left':'618px'}); jQuery(this).children('div.Genre_Tstyle_Line_.odd_').children('div.Genre_Tstyle_Item_:nth-child(4)').css({'top':'206px', 'left':'412px'}); jQuery(this).children('div.Genre_Tstyle_Line_.odd_').children('div.Genre_Tstyle_Item_:nth-child(5)').css({'top':'206px', 'left':'618px'}); //偶数列の1番目~4番目にclassを追加する jQuery('div.Genre_Tstyle_Line_.even_').each(function() { jQuery(this).children('div.Genre_Tstyle_Item_:lt(5)').addClass('small_img_'); }); jQuery(this).children('div.Genre_Tstyle_Line_.even_').children('div.Genre_Tstyle_Item_:nth-child(1)').css({'top':'0', 'left':'0'}); jQuery(this).children('div.Genre_Tstyle_Line_.even_').children('div.Genre_Tstyle_Item_:nth-child(2)').css({'top':'0', 'left':'206px'}); jQuery(this).children('div.Genre_Tstyle_Line_.even_').children('div.Genre_Tstyle_Item_:nth-child(3)').css({'top':'206px', 'left':'0'}); jQuery(this).children('div.Genre_Tstyle_Line_.even_').children('div.Genre_Tstyle_Item_:nth-child(4)').css({'top':'206px', 'left':'206px'}); jQuery('div.Genre_Tstyle_Item_').find('.comment_').ry({ size: 20, suffix: '...' }); }); //====================================================================== //イベントフリースペース;スライダー var obj = jQuery('div.event_freeslide_ .freeslide_body_ ul').bxSlider({ auto: false, speed: 500, /* エフェクトのスピード */ pause: 5000, /* 表示間隔 */ slideWidth: 141, minSlides: 4, maxSlides: 4, moveSlides: 1, slideMargin: 30, autoHover:true, controls: true, pager: false, infiniteLoop: true /* ループ */ }); //====================================================================== //購入フロー;遷移警告 if(jQuery('table.noshi_box_noselect_.highlight_').find('h3.top_massage_').size()){ jQuery('div.submit_ input.button_').click(function(){ if(!confirm('のし・ラッピング設定されていないものがあります。よろしいですか?')){ return false; } }); } //====================================================================== var userAgent = window.navigator.userAgent.toLowerCase(); if(userAgent.indexOf('msie') != -1) { jQuery('div.sender_change_ label > img, #modal_step3 label > img').click(function () { var labelId = jQuery(this).parent().attr('for'); jQuery('#'+labelId ).focus(); }); } else if (userAgent.indexOf('trident') != -1){ jQuery('div.sender_change_ label > img, #modal_step3 label > img').click(function () { //var labelId = jQuery(this).parent().attr('for'); //jQuery('#'+labelId ).focus().click(); jQuery(this).parent().click(); }); jQuery('#modal_step3 #divpaper').on('click', 'label > img', function () { jQuery(this).parent().click(); }); } else if(userAgent.indexOf('edge') != -1) { jQuery('div.sender_change_ label > img, #modal_step3 label > img').click(function () { //var labelId = jQuery(this).parent().attr('for'); //jQuery('#'+labelId ).focus().click(); jQuery(this).parent().click(); }); jQuery('#modal_step3 #divpaper').on('click', 'label > img', function () { jQuery(this).parent().click(); }); } //====================================================================== //Page Top=================================== jQuery("#page_top").hide(); jQuery(window).scroll(function () { if (jQuery(this).scrollTop() > 180) { jQuery('#footer_pagetop > a').fadeIn(); } else if (jQuery(this).scrollTop() < 80) { jQuery('#footer_pagetop > a').fadeOut(); } }); // トップに戻る jQuery(window).bind("scroll", function() { // ドキュメントの高さ scrollHeight = jQuery(document).height(); // ウィンドウの高さ+スクロールした高さ→ 現在のトップからの位置 scrollPosition = jQuery(window).height() + jQuery(window).scrollTop(); // フッターの高さ footHeight = jQuery("#footer_btm").height() + 35; // スクロール位置がフッターまで来たら if ( scrollHeight - scrollPosition <= footHeight ) { // ページトップリンクをフッターに固定 jQuery("#footer_pagetop").css({"position":"absolute","bottom": footHeight + "px"}); jQuery("#banner_wrapping").css({"position":"absolute","bottom": footHeight + "px"}); jQuery("#btn_item_list").css({"position":"absolute","bottom": "290px","z-index":"999999999"}); } else { // cash button yes if(jQuery("#cookieBox #consentButton").length) { // first yes -> click no if(jQuery("#cookieBox #consentButton").css('display') == 'none'){ // recommend btn yes if(jQuery('#btn_item_list').length){ if(jQuery('._comparison_list').hasClass('_show')) { jQuery("#footer_pagetop").css({"position":"fixed","bottom": "160px"}); jQuery("#btn_item_list").css({"position":"fixed","bottom": "310px","z-index": "9"}); } else { jQuery("#footer_pagetop").css({"position":"fixed","bottom": "90px"}); jQuery("#btn_item_list").css({"position":"fixed","bottom": "240px"}); } // recommend btn no } else { jQuery("#footer_pagetop").css({"position":"fixed","bottom": "90px"}); } // banner btn if(jQuery('#banner_wrapping').length){ jQuery("#banner_wrapping").css({"position":"fixed","bottom": footHeight + "px"}); } // first yes -> not click } else { // recommend btn yes if(jQuery('#btn_item_list').length){ if(jQuery('._comparison_list').hasClass('_show')) { jQuery("#footer_pagetop").css({"position":"fixed","bottom": "160px"}); jQuery("#btn_item_list").css({"position":"fixed","bottom": "310px","z-index": "9"}); } else { jQuery("#footer_pagetop").css({"position":"fixed","bottom": "90px"}); jQuery("#btn_item_list").css({"position":"fixed","bottom": "240px"}); } // recommend btn no } else { jQuery("#footer_pagetop").css({"position":"fixed","bottom": "90px"}); } // banner btn if(jQuery('#banner_wrapping').length){ jQuery("#banner_wrapping").css({"position":"fixed","bottom":"75px"}); } } // cash button no } else { // recommend btn yes if(jQuery('#btn_item_list').length){ if(jQuery('._comparison_list').hasClass('_show')) { jQuery("#footer_pagetop").css({"position":"fixed","bottom": "160px"}); jQuery("#btn_item_list").css({"position":"fixed","bottom": "310px","z-index": "9"}); } else { jQuery("#footer_pagetop").css({"position":"fixed","bottom": "70px"}); jQuery("#btn_item_list").css({"position":"fixed","bottom": "205px"}); } // recommend btn no } else { jQuery("#footer_pagetop").css({"position":"fixed","bottom": "90px"}); } // banner btn var now_url = window.location.pathname; if(now_url.indexOf('cart/cart.aspx') != -1) { jQuery("#banner_wrapping").css({"position":"fixed","bottom":"240px","right":"12px"}); } else { jQuery("#banner_wrapping").css({"position":"fixed","bottom": footHeight + "px"}); } } } }); // PageTop //アンカー時の高さ調整 var headerHight = 75; //ヘッダの高さ jQuery('a[href^=#]:not(div.etc_goodsimg_item_ a, #review_read_button a, div.cartbox_ ul li.btn_stock_ a, div.cartbox_ ul li.btn_bookmark_ a, div.goods_ .popup_layer_ .goodsspec_ .spec_btn_ ul li.bookmark_btn_ a, .mymenu_item_ .img_ a, .mymenu_item_ .desc_ h2 a)').click(function(){ var href= jQuery(this).attr("href"); var target = jQuery(href == "#" || href == "" ? 'html' : href); var position = target.offset().top-headerHight; //ヘッダの高さ分位置をずらす jQuery("html, body").animate({scrollTop:position}, 550, "linear"); return false; }); //ページ外リンクの場合「ハッシュ」があるとヘッダ分ずらす if (location.hash) { var hash = location.hash; setTimeout(function(){ var pos = jQuery(location.hash).offset().top - 100; jQuery("html, body").animate({scrollTop:pos}, 0, "swing"); },150); } jQuery('#footer #footer_guide ul li a').click(function(){ if (location.hash) { var hash = location.hash; setTimeout(function(){ var pos = jQuery(location.hash).offset().top - 100; jQuery("html, body").scrollTop(pos); },150); } }); //====================================================================== //フェイラー公式キャラクターリーベ ハンカチ 第4弾 LP if(jQuery('#feilerbear_liebe_4th').length > 0){ jQuery('#feilerbear_liebe_4th ul.item_list > li.item01 .img, #feilerbear_liebe_4th ul.item_list > li.item02 .img').click(function() { var items = []; jQuery( jQuery(this).attr('href') ).find('.slide').each(function() { items.push({ src: jQuery(this) }); }); jQuery.magnificPopup.open({ items:items, gallery: { enabled: true } }); jQuery(document).on('click', '.popup-modal-dismiss', function (e) { e.preventDefault(); jQuery.magnificPopup.close(); }); }); } //====================================================================== //アンケートページ if(jQuery('.questionnaire_.col1_').length){ jQuery('.questionnaire_box_content_ input[type="radio"], .questionnaire_box_content_ input[type="checkbox"]').each(function(){ var ID = jQuery(this).attr('id'); var FOR = jQuery(this).next('label').attr('for'); if(ID == FOR){ var CLASS = 'c_' + ID; jQuery(this).addClass(CLASS); jQuery(this).next('label').addClass(CLASS); jQuery('.' + CLASS).wrapAll('
'); } }); } }); //====================================================================== //お気に入りボタンを切り替え /*jQuery(document).ready(function() { set_ga_send_event_mousedown('li.btn_bookmark_')//id set_ga_send_event_mousedown('li.btn_stock_')//id var favurl = location.href; var rename = "お気に入り"; if(/bookmark.aspx/.test(favurl)) { document.title = rename; jQuery("h1").text(rename); jQuery(".navitopicpath_ a:nth-child(3)").text(rename); jQuery("p.message_").html("お気に入りに登録された商品はありません"); } if(/menu.aspx/.test(favurl)) { jQuery(".mymenu_ div.mymenu_item_:nth-child(10) #mymenu_bookmark a").text(rename); jQuery(".mymenu_ div.mymenu_item_:nth-child(10) .desc_ p").text("お気に入り商品リストです。"); } if(!(jQuery('.goodsspec_ .icon_ img').length) && !(jQuery('.goodsspec_ .icon2_ img').length)){ jQuery('.goodsspec_ h2.goods_name_').css('padding','26px 0 7px'); } }); */ //====================================================================== //ギフト設定をせずにまとめてお届けする jQuery(document).ready(function() { jQuery('#gift_noset_delivery').click(function(){ jQuery('div.gift_noset_method_').toggle(); jQuery(this).hide(); }); }); jQuery(window).load(function() { //=========================================================================================================== //画像遅延読み込み jQuery('.goods_').each(function() { jQuery("img.lazy").lazyload({ threshold: 0 }); }); jQuery('.Genre_Tstyle_').each(function() { jQuery("img.lazy").lazyload({ threshold: 0 }); }); }); //====================================================================== //メールマガジン登録 個人情報に同意の場合のみボタン操作可能 /*利用規約ブロックを移動、同意ボタンを移動*/ jQuery(document).ready(function() { jQuery('.agreement_area').insertBefore('form:first-of-type .submit_') jQuery('form:first-of-type .submit_').insertBefore('.enter_none'); }); /*同意ボタンにチェックでクラスを付与*/ jQuery(function(){ jQuery('#consent_policy,#consent_policy + label').click(function(){ if ( jQuery('#consent_policy').prop('checked')) { jQuery('.agreement_area').addClass('agree_policy'); } else { jQuery('.agreement_area').removeClass('agree_policy'); } }); }); /*ページ読み込み時にも同様の処理*/ jQuery(document).ready(function(){ if ( jQuery('#consent_policy').prop('checked')) { jQuery('.agreement_area').addClass('agree_policy'); } else { jQuery('.agreement_area').removeClass('agree_policy'); } }); //ポップアップバナー;表示 jQuery(function() { if(jQuery('#js-popup').length) { if(!jQuery.cookie('banner_popup')) { jQuery('#js-popup').addClass('is-show'); jQuery.cookie('banner_popup', 'true', {expires: 15}); jQuery('#js-close-btn, #js-black-bg').click(function() { jQuery('#js-popup').removeClass('is-show'); }); } } }); //====================================================================== //=========================================================================// window.onload = function(){ var url_href = location.href; var host_slice = url_href.slice(-1); var host_slice_minus = host_slice - 1; var slice_match = jQuery('.acc_list_').eq(host_slice_minus); slice_match.children('dl').children('dt').addClass("open_") slice_match.children('dl').children('dd').css("display", "block"); }; //=========================================================================// jQuery(function(){ jQuery(".gift_close_btn").click(function(){ jQuery("#banner_wrapping").fadeOut(200).removeClass("show"); }) }); //=========================================================================// //ライトニングレコメンド トップページ/詳細/カート window.LightningRecommendEventV2 = window.LightningRecommendEventV2 || []; window.LightningRecommendEventV2.push({ mount: function(){ if(jQuery('div.goodsproductdetail_').length) { jQuery('.goodsproductdetail_ .recommend-wrap').appendTo('.mainframe_'); } else { jQuery('.cartlist_ .recommend-wrap').insertAfter('#block_of_history'); } //jQuery('.block-thumbnail-t--goods-image').tile(); var recoSize = jQuery('div.recommend-wrap').find('ul.block-thumbnail-t li .block-thumbnail-t--goods').length; if(recoSize > 4) { jQuery('div.recommend-wrap').find('ul.block-thumbnail-t li').bxSlider({ auto: false, speed: 500, /* エフェクトのスピード */ pause: 5000, /* 表示間隔 */ slideWidth: 160, minSlides: 5, maxSlides: 5, moveSlides: 1, slideMargin: 20, autoHover:true, controls: true, infiniteLoop: true, /* ループ */ pager: false, }); } } }); jQuery(window).on('load', function(){ jQuery('.mymenu_item_').each(function(){ var menu_icon = jQuery(this).find('.desc_ #mymenu_destchange a').text(); if(menu_icon.indexOf('アドレス帳 変更') != -1) { jQuery('.mymenu_item_ #destnav').css('display','none'); jQuery(this).find('.img_ a').click(function(event){ event.preventDefault(); }); jQuery(this).find('.desc_ #mymenu_destchange a').click(function(event){ event.preventDefault(); }); jQuery(this).find('.img_ a').click(function(){ if (jQuery('#destnav').css("display") == "none") { jQuery('#destnav').css("display", "flex"); var destnav_H = jQuery(this).parent().parent().find('#destnav').height(); console.log(destnav_H); jQuery(this).parent().parent().css('margin-bottom', destnav_H + 'px'); } else if (jQuery('#destnav').css("display") == "flex") { jQuery('#destnav').css("display", "none"); jQuery(this).parent().parent().css('margin-bottom', '0px'); } }); }; }); jQuery('#dest_change #destnav li a').each(function(){ var dest_text = jQuery(this).text(); jQuery(this).text('「 ' + dest_text + ' 」 の配送先を変更'); }); setTimeout(() => { jQuery('#block_recommend .block-thumbnail-t li dl, .recommend-wrap .block-thumbnail-t li dl').each(function(){ if(jQuery(this).find('.revico-star').css('display') == 'none') { jQuery(this).find('.block-thumbnail-t--goods-description').css('margin-top', '45px'); } }) }, 1000); })