apct-landing/public/js/script.min.b98b8dcfa3dc53b74ecf3cf8724a1f75b4d217da25463ff3d6a28fc4a09e965bf9818dfce85452f5fb478bce779ee8cc.js

1 line
1.7 KiB
JavaScript
Raw Permalink Normal View History

2021-08-31 18:36:53 +00:00
$(window).on('load',function(){$('.preloader').fadeOut(100)}),jQuery(function(a){"use strict";var b,c,d,e;const f=lozad();f.observe(),a('.image-popup').magnificPopup({type:'image',removalDelay:160,callbacks:{beforeOpen:function(){this.st.image.markup=this.st.image.markup.replace('mfp-figure','mfp-figure mfp-with-anim'),this.st.mainClass=this.st.el.attr('data-effect')}},closeOnContentClick:!0,midClick:!0,fixedContentPos:!1,fixedBgPos:!0}),b=document.querySelector('.shuffle-wrapper'),b&&(c=window.Shuffle,d=new c(document.querySelector('.shuffle-wrapper'),{itemSelector:'.shuffle-item',buffer:1}),jQuery('input[name="shuffle-filter"]').on('change',function(b){var a=b.currentTarget;a.checked&&d.filter(a.value)})),a("#testimonials").slick({infinite:!0,arrows:!1,autoplay:!0,autoplaySpeed:4e3});function h(b){var a;b.matches?(a=50):(a=350)}e=a('html, body'),a('nav a, .page-scroll').on('click',function(){if(location.pathname.replace(/^\//,'')===this.pathname.replace(/^\//,'')&&location.hostname===this.hostname){var b=a(this.hash);if(b=b.length?b:a('[name='+this.hash.slice(1)+']'),b.length)return e.animate({scrollTop:b.offset().top-50},1500,'easeInOutExpo'),!1}}),jQuery.extend(jQuery.easing,{easeInOutExpo:function(e,a,b,c,d){return a===0?b:a===d?b+c:(a/=d/2)<1?c/2*Math.pow(2,10*(a-1))+b:c/2*(-Math.pow(2,-10*--a)+2)+b}});function g(){var b;a('.count').length!==0&&(b=a('.count').offset().top-window.innerHeight),a(window).scrollTop()>b&&a('.count').each(function(){var b=a(this),c=b.attr('data-count');a({countNum:b.text()}).animate({countNum:c},{duration:1e3,easing:'swing',step:function(){b.text(Math.floor(this.countNum))},complete:function(){b.text(this.countNum)}})})}a(window).on('scroll',function(){g()})})