// JavaScript Document // AOS AOS.init({ offset:80, duration: 900, easing: 'ease-out-back', }); if(navigator.userAgent.match(/MSIE 10/i) || navigator.userAgent.match(/Trident\/7\./) || navigator.userAgent.match(/Edge\/\d+\.\d+/)) { $('body').on("mousewheel", function () { "use strict"; event.preventDefault(); var wd = event.wheelDelta; var csp = window.pageYOffset; window.scrollTo(0, csp - wd); }); } // mobile $(function(){ "use strict"; var ua = navigator.userAgent; if(ua.indexOf('iPhone') < 0 && ua.indexOf('Android') < 0){ $('.telhref').contents().unwrap(); } else { $(".bgfix").css({ "background-attachment": "scroll"}); } }); $(function(){ "use strict"; // bigin // PageScroll var headblank = $('#header').outerHeight() + 20; var speed = 600; $(window).on("load", function(){ if(location.hash !== ""){ var hashOffset = $(location.hash).offset().top - headblank; $('html').animate({ scrollTop:hashOffset}, speed); } }); $('a[href^=#]').click(function(){ var href= $(this).attr("href"); var target = $(href === "#" || href === "" ? 'html' : href); var position = target.offset().top - headblank; $("html, body").animate({scrollTop:position}, speed, "swing"); return false; }); // pagetop var topBtn = $('#pagetop'); topBtn.hide(); $(window).on('load scroll', function(){ if ($(this).scrollTop() > 500) { topBtn.fadeIn(); } else { topBtn.fadeOut(); } // var docH = $(document).height(); // var scrlPos = $(window).height() + $(window).scrollTop(); // var footH = $("#footer").outerHeight(); // if ( docH - scrlPos <= footH ) { // topBtn.css({'position':'absolute','bottom': footH - 45 + 'px'}); // } else { // topBtn.css({'position':'fixed','bottom':'3px'}); // } }); topBtn.on('click',function(){ $('body,html').animate({ scrollTop: 0 }, 500); return false; }); // drawerNav $('.nav_toggle').on("click", function(){ $('#header').toggleClass('open'); }); // end }); // accordion $('.accordion .btn').on('click', function () { $(this).toggleClass('open').next().slideToggle(); }); // header $(document).ready(function() { "use strict"; var Item = $('#header'), Posi = $('#header').outerHeight() + 200; $(window).on('load scroll', function() { var value = $(this).scrollTop(); if ( value >= Posi ) { Item.addClass('fixed'); } else { Item.removeClass('fixed'); } }); }); // slider $('.slide_wrap' ).each( function( i ) { "use strict"; var $_t = $( this ); $_t.find( '.viewer' ).addClass( 'viewer' + i ).slick({ autoplay: true, autoplaySpeed: 3000, cssEase: 'ease-in-out', dots: false, fade: true, speed: 1000, arrows: false, swipe: true, }); $_t.find( '.t-slider' ).addClass( 't-slider' + i ).slick({ autoplay: true, autoplaySpeed: 3000, cssEase: 'ease-in-out', dots: true, arrows: true, prevArrow:'