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 accordion = $( ".accordion-wrap" ); accordion.each( function () { var noTargetAccordion = $( this ).siblings( accordion ); $( this ).find( ".accordion-btn" ).click( function () { $( this ).next( ".accordion-content" ).slideToggle(); $( this ).toggleClass( "accordion-open" ); noTargetAccordion.find( ".accordion-content" ).slideUp(); noTargetAccordion.find( ".accordion-btn" ).removeClass( "accordion-open" ); } ); } ); var swiper = new Swiper( '.swiper-container', { loop: true, speed: 1000, effect: 'fade', autoplay: { delay: 4000, }, } ); $( document ).on( 'click', 'a[href*="#"]', function () { let time = 400; let target = $( this.hash ); if ( !target.length ) return; let targetY = target.offset().top; $( 'html,body' ).animate( { scrollTop: targetY }, time, 'swing' ); return false; } ); AOS.init( { once: 'true', easing: 'ease-in-back', delay: 0, offset: 0, duration: 350, } ); $( window ).on( 'load resize', function () { var winW = $( window ).width(); var devW = 768; if ( winW <= devW ) { jQuery( function ( $ ) { $( window ).on( 'load scroll', function () { if ( 30 < $( window ).scrollTop() && $( window ).scrollTop() < 250 ) { $( '.top_slide_scroll' ).fadeOut( 300 ); } else { $( '.top_slide_scroll' ).fadeIn( 300 ); } } ); } ); } else { jQuery( function ( $ ) { $( window ).on( 'load scroll', function () { if ( 170 < $( window ).scrollTop() && $( window ).scrollTop() < 560 ) { $( '.top_slide_scroll' ).fadeOut( 300 ); } else { $( '.top_slide_scroll' ).fadeIn( 300 ); } } ); } ); } } );