$(function() { $(document).on('contextmenu','img', dp); $(document).on('mousedown','img', dp); $(document).on('mouseup','img', dp); // $("img").on('contextmenu', dp); function dp (e) { // alert('画像の右クリックは禁止です'); e.preventDefault(); return false; } var pb = $('[data-remodal-id=modal]').remodal(); $(document).on("click",".rsv", function(){ pb.open(); }); // おもてなし var mySwiper = new Swiper ('#linkInner', { pagination: { el: '#linkpointer', }, autoplay: { delay: 1500, disableOnInteraction: false, }, loop: true, slidesPerView: 'auto', centeredSlides: true, spaceBetween: 10, }); /*$('.center').slick({ centerMode: true, centerPadding: '150px', slidesToShow: 1, arrows: false, dots: true, swipe: true, autoplay: true, autoplaySpeed: 1000, variableWidth: true });*/ /* スムーススクロール --------------------------------------------------*/ /*var menuHeight = $("#hdInner").outerHeight(); $("a.scr").on("click",function(event){ event.preventDefault(); scr(this); }); function scr (obj) { var obj = obj; var url = obj.href; var parts = url.split("#"); var target = parts[1]; var target_offset = $("#"+target).offset(); var target_top = target_offset.top - menuHeight; $('html, body').animate({scrollTop:target_top}, 800); }*/ /* ハッシュ値があればページ内スクロール --------------------------------------------------------------------*/ var urlHash = location.hash; if(urlHash) { history.replaceState('','',location.pathname); $('body,html').stop().scrollTop(0); setTimeout(function () { //ロード時の処理を待ち、時間差でスクロール実行 scrollToAnker(urlHash) ; }, 100); } $("a.scr").on("click",function(event){ event.preventDefault(); scr(this); }); function scr (obj) { // var menuHeight = $('header').outerHeight(); var obj = obj; var url = obj.href; var parts = url.split("#"); var target = parts[1]; var target_offset = $("#"+target).offset(); if(target_offset){ // var target_top = target_offset.top; /*var target_top = target_offset.top - menuHeight; $('html, body').animate({scrollTop:target_top}, 800);*/ scrollToAnker($("#"+target)); }else{ window.location.href = url; } } function scrollToAnker(hash) { // var menuHeight = $('header').outerHeight(); var menuHeight = $('#fix').outerHeight(); var target = $(hash); var position = target.offset().top- menuHeight; // var position = target.offset().top; $('body,html').stop().animate({scrollTop:position}, 600); } /* 背景切替class --------------------------------------------------*/ var ampm = ""; var season = ""; var bgClass = ""; GetDate(); // デバッグ用変数 GetDate();はコメントアウト // myD = new Date(2015,11,26,18); // myMonth = myD.getMonth() + 1; // myDate = myD.getDate(); // myHours = myD.getHours(); if (1 <= myMonth && myMonth <= 2){ season = "wn"; } else if (3 <= myMonth && myMonth <= 5){ season = "sp"; } else if (6 <= myMonth && myMonth <= 8){ season = "sm"; } else if (9 <= myMonth && myMonth <= 11){ season = "fl"; } else if (myMonth == 12){ season = "wn"; } $('body').attr("id",season); var opt = { hashTracking: false, modifier: "with-dot" }; var inst = $('[data-remodal-id=info]').remodal(opt); function dispInfo(e) { e.preventDefault(); inst.open(); } var fs; const mediaQueryList = window.matchMedia("(max-width:768px)"); const listener = (event) => { if (event.matches) { $('#fxTel').off('click',dispInfo); $('#rsvTEL').off('click',dispInfo); //女性詳細ページ中段 if(inst.getState() == 'opened') inst.close(); // console.log('SP用ブレークポイント用処理'); } else { $('#fxTel').on('click',dispInfo); $('#rsvTEL').on('click',dispInfo); //女性詳細ページ中段 // console.log('PC用ブレークポイント用処理'); } }; mediaQueryList.addListener(listener); listener(mediaQueryList); }); // 日付の取得 function GetDate(){ myTbl = new Array("日","月","火","水","木","金","土"); myD = new Date(); myYear = myD.getYear() myYear4 = (myYear < 2000) ? myYear+1900 : myYear; myMonth = myD.getMonth() + 1; myDate = myD.getDate(); myDay = myD.getDay(); myHours = myD.getHours(); myMinutes = myD.getMinutes(); mySeconds = myD.getSeconds(); mm = ('0' + (myD.getMonth() + 1)).slice(-2); }