if ( navigator.userAgent.match( /(iPhone|iPad|iPod|Android)/ ) ) { $( function () { $( '.tel' ).each( function () { var str = $( this ).html(); $( this ).html( $( '' ).attr( 'href', 'tel:' + $( this ).text().replace( /-/g, '' ) ).append( str + '' ) ); } ); } ); } var movefun = function ( event ) { event.preventDefault(); } window.addEventListener( 'touchmove', movefun, { passive: false } ); window.removeEventListener( 'touchmove', movefun, { passive: false } ); $( function () { window.devicePixelRatio > 1 && $( "img.retina" ).each( function () { var t = $( this ).attr( "src" ); $( this ).attr( "src", t.replace( /(.jpg|.png)/gi, "_2x$1" ) ).error( function () { $( this ).attr( "src", t ) } ) } ) } ) var swiper = new Swiper( '.swiper-container', { loop: true, speed: 1000, effect: 'fade', autoplay: { delay: 4000, }, navigation: { nextEl: '.swiper-button-next', prevEl: '.swiper-button-prev', }, pagination: { el: '.swiper-pagination', }, } ); var swiper2 = new Swiper("#sauna-slide", { loop: true, effect: 'fade', autoplay: { delay: 4000, }, speed: 2000, // ページネーション pagination: { el: ".swiper-pagination", clickable: true, }, // 前後の矢印 navigation: { nextEl: ".swiper-button-next", prevEl: ".swiper-button-prev", }, } ); var swiper3 = new Swiper("#sauna-loop", { loop: true, // ループ有効 slidesPerView: 2, // 一度に表示する枚数 spaceBetween: 2, // スライド間の余白(ピクセル単位) speed: 7000, // ループの時間 allowTouchMove: false, // スワイプ無効 autoplay: { delay: 0, // 途切れなくループ }, breakpoints: { 1024: { slidesPerView: 3, }, }, });