File: /www/wwwroot/www.scdc-marine.com/wp-content/themes/scdc-marine/assets/js/jquery.hekunum.min.js
(function($){$.fn.num_running=function(){function n(){var t=$(".HekuNum");var n={top:$(window).scrollTop(),bottom:$(window).scrollTop()+$(window).height()};t.each(function(){var num=$(this).data("num")>0?$(this).data("num"):3000;var time=parseInt($(this).data("time"))>0?parseInt($(this).data("time")):3000;n.top<=$(this).offset().top+$(this).height()&&n.bottom>=$(this).offset().top&&!$(this).data("start")&&($(this).data("start",!0),new AnimateNum({obj:$(this),target:num,totalTime:time}))})}$(window).bind("scroll",function(){n()});function AnimateNum(t){this.obj=t.obj,this.target=t.target.toString(),this.totalTime=t.totalTime||1000,this.init()}AnimateNum.prototype={init:function(){return this.target?(this.animation(),void 0):!1},animation:function(){var t=this,i=this.target.indexOf("."),e=0;i>=0&&(e=this.target.length-i-1);var n=this.target.replace(".",""),s=this.totalTime/30|0,s1=s-14,a=n/s|0,r=0,h=0,r1=0,r2=0,r3=0;t.timer30=setInterval(function(){r++,h+=a,t.obj.html(h/Math.pow(10,e)),r>=s1&&(clearInterval(t.timer30),(t.timer90=setInterval(function(){r1++,h+=a,t.obj.html(h/Math.pow(10,e)),r1>=7&&(clearInterval(t.timer90),(t.timer180=setInterval(function(){r2++,h+=a,t.obj.html(h/Math.pow(10,e)),r2>=5&&(clearInterval(t.timer180),(t.timer400=setInterval(function(){r3++,h+=a,t.obj.html(h/Math.pow(10,e)),r3>=2&&(clearInterval(t.timer400),t.obj.html(t.target))},400)))},180)))},90)))},30)}}}})(jQuery);