;(function($,_,undefined){"use strict";ips.controller.register('landingpage.main',{initialize:function(){this.setup();},setup:function(){this.blockAnimation();this.siteStatsAnmation();this.memberStatsAnmation();},blockAnimation:function(){ips.loader.get(['core/interface/jquery/jquery-ui.js']).then(function(){$.fn.visible=function(partial){var $t=$(this),$w=$(window),viewTop=$w.scrollTop(),viewBottom=viewTop+$w.height(),_top=$t.offset().top,_bottom=_top+$t.height(),compareTop=partial===true?_bottom:_top,compareBottom=partial===true?_top:_bottom;return((compareBottom<=viewBottom)&&(compareTop>=viewTop));};var win=$(window);var allColumns=$(".landingpage_blocks");allColumns.each(function(i,el){var el=$(el);if(el.visible(true)){el.addClass("in-view");}});win.scroll(function(event){allColumns.each(function(i,el){var el=$(el);if(el.visible(true)){if(!el.hasClass("in-view")&&ips.getSetting('landingpageBlockAnimations')){if(ips.getSetting('landingpageBlockAnimations')=='slideRight'){el.show().addClass(['ipsAnim','ipsAnim_slide','ipsAnim_right','ipsAnim_'+ips.getSetting('landingpageBlockAnimationSpeed')].join(' '))
el.animationComplete(function(){el.removeClass(['ipsAnim','ipsAnim_slide','ipsAnim_right','ipsAnim_'+ips.getSetting('landingpageBlockAnimationSpeed')]);});}
else{ips.utils.anim.go(ips.getSetting('landingpageBlockAnimations')+' '+ips.getSetting('landingpageBlockAnimationSpeed'),el);}}
el.addClass("in-view");}});});});},siteStatsAnmation:function(){ips.loader.get(['core/interface/jquery/jquery-ui.js']).then(function(){$.fn.visible=function(partial){var $t=$(this),$w=$(window),viewTop=$w.scrollTop(),viewBottom=viewTop+$w.height(),_top=$t.offset().top,_bottom=_top+$t.height(),compareTop=partial===true?_bottom:_top,compareBottom=partial===true?_top:_bottom;return((compareBottom<=viewBottom)&&(compareTop>=viewTop));};var win=$(window);var allStats=$(".counter");var allRatio=$(".ratio");allStats.each(function(i,el){var el=$(el);if(el.visible(true)){var $this=$(this),countTo=$this.attr('data-count').replace(',','');$({countNum:$this.text()}).animate({countNum:countTo},{duration:1350,easing:'linear',step:function(){$this.text(Math.floor(this.countNum).toLocaleString('en'));},complete:function(){return;}});el.addClass("counted");}});allRatio.each(function(i,el){var el=$(el);if(el.visible(true)){var $this=$(this),countTo=$this.attr('data-count').replace(',','');$({countNum:$this.text()}).animate({countNum:countTo},{duration:1350,easing:'linear',step:function(){$this.text(this.countNum.toLocaleString('en'));},complete:function(){return;}});el.addClass("counted");}});win.scroll(function(event){allStats.each(function(i,el){var el=$(el);if(!el.hasClass("counted")){if(el.visible(true)){var $this=$(this),countTo=$this.attr('data-count').replace(',','');$({countNum:$this.text()}).animate({countNum:countTo},{duration:1350,easing:'linear',step:function(){$this.text(Math.floor(this.countNum).toLocaleString('en'));},complete:function(){return;}});el.addClass("counted");}}});allRatio.each(function(i,el){var el=$(el);if(!el.hasClass("counted")){if(el.visible(true)){el.addClass("counted");var $this=$(this),countTo=$this.attr('data-count').replace(',','');$({countNum:$this.text()}).animate({countNum:countTo},{duration:1350,easing:'linear',step:function(){$this.text(this.countNum.toLocaleString('en'));},complete:function(){return;}});el.addClass("counted");}}});});});},memberStatsAnmation:function(){ips.loader.get(['core/interface/jquery/jquery-ui.js']).then(function(){$.fn.visible=function(partial){var $t=$(this),$w=$(window),viewTop=$w.scrollTop(),viewBottom=viewTop+$w.height(),_top=$t.offset().top,_bottom=_top+$t.height(),compareTop=partial===true?_bottom:_top,compareBottom=partial===true?_top:_bottom;return((compareBottom<=viewBottom)&&(compareTop>=viewTop));};var win=$(window);var allStats=$(".mCounter");allStats.each(function(i,el){var el=$(el);if(el.visible(true)){var $this=$(this),countTo=$this.attr('data-count').replace(',','');$({countNum:$this.text()}).animate({countNum:countTo},{duration:1350,easing:'linear',step:function(){$this.text(Math.floor(this.countNum).toLocaleString('en'));},complete:function(){return;}});el.addClass("counted");}});win.scroll(function(event){allStats.each(function(i,el){var el=$(el);if(!el.hasClass("counted")){if(el.visible(true)){var $this=$(this),countTo=$this.attr('data-count').replace(',','');$({countNum:$this.text()}).animate({countNum:countTo},{duration:1350,easing:'linear',step:function(){$this.text(Math.floor(this.countNum).toLocaleString('en'));},complete:function(){return;}});el.addClass("counted");}}});});});}});}(jQuery,_));;