/*! waypoints - 4.0.0 copyright 2011-2015 caleb troughton licensed under the mit license. https://github.com/imakewebthings/waypoints/blob/master/licenses.txt jquery.countup.js */ !function(){"use strict";function t(o){if(!o)throw new error("no options passed to waypoint constructor");if(!o.element)throw new error("no element option passed to waypoint constructor");if(!o.handler)throw new error("no handler option passed to waypoint constructor");this.key="waypoint-"+e,this.options=t.adapter.extend({},t.defaults,o),this.element=this.options.element,this.adapter=new t.adapter(this.element),this.callback=o.handler,this.axis=this.options.horizontal?"horizontal":"vertical",this.enabled=this.options.enabled,this.triggerpoint=null,this.group=t.group.findorcreate({name:this.options.group,axis:this.axis}),this.context=t.context.findorcreatebyelement(this.options.context),t.offsetaliases[this.options.offset]&&(this.options.offset=t.offsetaliases[this.options.offset]),this.group.add(this),this.context.add(this),i[this.key]=this,e+=1}var e=0,i={};t.prototype.queuetrigger=function(t){this.group.queuetrigger(this,t)},t.prototype.trigger=function(t){this.enabled&&this.callback&&this.callback.apply(this,t)},t.prototype.destroy=function(){this.context.remove(this),this.group.remove(this),delete i[this.key]},t.prototype.disable=function(){return this.enabled=!1,this},t.prototype.enable=function(){return this.context.refresh(),this.enabled=!0,this},t.prototype.next=function(){return this.group.next(this)},t.prototype.previous=function(){return this.group.previous(this)},t.invokeall=function(t){var e=[];for(var o in i)e.push(i[o]);for(var n=0,r=e.length;r>n;n++)e[n][t]()},t.destroyall=function(){t.invokeall("destroy")},t.disableall=function(){t.invokeall("disable")},t.enableall=function(){t.invokeall("enable")},t.refreshall=function(){t.context.refreshall()},t.viewportheight=function(){return window.innerheight||document.documentelement.clientheight},t.viewportwidth=function(){return document.documentelement.clientwidth},t.adapters=[],t.defaults={context:window,continuous:!0,enabled:!0,group:"default",horizontal:!1,offset:0},t.offsetaliases={"bottom-in-view":function(){return this.context.innerheight()-this.adapter.outerheight()},"right-in-view":function(){return this.context.innerwidth()-this.adapter.outerwidth()}},window.waypoint=t}(),function(){"use strict";function t(t){window.settimeout(t,1e3/60)}function e(t){this.element=t,this.adapter=n.adapter,this.adapter=new this.adapter(t),this.key="waypoint-context-"+i,this.didscroll=!1,this.didresize=!1,this.oldscroll={x:this.adapter.scrollleft(),y:this.adapter.scrolltop()},this.waypoints={vertical:{},horizontal:{}},t.waypointcontextkey=this.key,o[t.waypointcontextkey]=this,i+=1,this.createthrottledscrollhandler(),this.createthrottledresizehandler()}var i=0,o={},n=window.waypoint,r=window.onload;e.prototype.add=function(t){var e=t.options.horizontal?"horizontal":"vertical";this.waypoints[e][t.key]=t,this.refresh()},e.prototype.checkempty=function(){var t=this.adapter.isemptyobject(this.waypoints.horizontal),e=this.adapter.isemptyobject(this.waypoints.vertical);t&&e&&(this.adapter.off(".waypoints"),delete o[this.key])},e.prototype.createthrottledresizehandler=function(){function t(){e.handleresize(),e.didresize=!1}var e=this;this.adapter.on("resize.waypoints",function(){e.didresize||(e.didresize=!0,n.requestanimationframe(t))})},e.prototype.createthrottledscrollhandler=function(){function t(){e.handlescroll(),e.didscroll=!1}var e=this;this.adapter.on("scroll.waypoints",function(){(!e.didscroll||n.istouch)&&(e.didscroll=!0,n.requestanimationframe(t))})},e.prototype.handleresize=function(){n.context.refreshall()},e.prototype.handlescroll=function(){var t={},e={horizontal:{newscroll:this.adapter.scrollleft(),oldscroll:this.oldscroll.x,forward:"right",backward:"left"},vertical:{newscroll:this.adapter.scrolltop(),oldscroll:this.oldscroll.y,forward:"down",backward:"up"}};for(var i in e){var o=e[i],n=o.newscroll>o.oldscroll,r=n?o.forward:o.backward;for(var s in this.waypoints[i]){var a=this.waypoints[i][s],l=o.oldscroll=a.triggerpoint,p=l&&h,u=!l&&!h;(p||u)&&(a.queuetrigger(r),t[a.group.id]=a.group)}}for(var c in t)t[c].flushtriggers();this.oldscroll={x:e.horizontal.newscroll,y:e.vertical.newscroll}},e.prototype.innerheight=function(){return this.element==this.element.window?n.viewportheight():this.adapter.innerheight()},e.prototype.remove=function(t){delete this.waypoints[t.axis][t.key],this.checkempty()},e.prototype.innerwidth=function(){return this.element==this.element.window?n.viewportwidth():this.adapter.innerwidth()},e.prototype.destroy=function(){var t=[];for(var e in this.waypoints)for(var i in this.waypoints[e])t.push(this.waypoints[e][i]);for(var o=0,n=t.length;n>o;o++)t[o].destroy()},e.prototype.refresh=function(){var t,e=this.element==this.element.window,i=e?void 0:this.adapter.offset(),o={};this.handlescroll(),t={horizontal:{contextoffset:e?0:i.left,contextscroll:e?0:this.oldscroll.x,contextdimension:this.innerwidth(),oldscroll:this.oldscroll.x,forward:"right",backward:"left",offsetprop:"left"},vertical:{contextoffset:e?0:i.top,contextscroll:e?0:this.oldscroll.y,contextdimension:this.innerheight(),oldscroll:this.oldscroll.y,forward:"down",backward:"up",offsetprop:"top"}};for(var r in t){var s=t[r];for(var a in this.waypoints[r]){var l,h,p,u,c,d=this.waypoints[r][a],f=d.options.offset,w=d.triggerpoint,y=0,g=null==w;d.element!==d.element.window&&(y=d.adapter.offset()[s.offsetprop]),"function"==typeof f?f=f.apply(d):"string"==typeof f&&(f=parsefloat(f),d.options.offset.indexof("%")>-1&&(f=math.ceil(s.contextdimension*f/100))),l=s.contextscroll-s.contextoffset,d.triggerpoint=y+l-f,h=w=s.oldscroll,u=h&&p,c=!h&&!p,!g&&u?(d.queuetrigger(s.backward),o[d.group.id]=d.group):!g&&c?(d.queuetrigger(s.forward),o[d.group.id]=d.group):g&&s.oldscroll>=d.triggerpoint&&(d.queuetrigger(s.forward),o[d.group.id]=d.group)}}return n.requestanimationframe(function(){for(var t in o)o[t].flushtriggers()}),this},e.findorcreatebyelement=function(t){return e.findbyelement(t)||new e(t)},e.refreshall=function(){for(var t in o)o[t].refresh()},e.findbyelement=function(t){return o[t.waypointcontextkey]},window.onload=function(){r&&r(),e.refreshall()},n.requestanimationframe=function(e){var i=window.requestanimationframe||window.mozrequestanimationframe||window.webkitrequestanimationframe||t;i.call(window,e)},n.context=e}(),function(){"use strict";function t(t,e){return t.triggerpoint-e.triggerpoint}function e(t,e){return e.triggerpoint-t.triggerpoint}function i(t){this.name=t.name,this.axis=t.axis,this.id=this.name+"-"+this.axis,this.waypoints=[],this.cleartriggerqueues(),o[this.axis][this.name]=this}var o={vertical:{},horizontal:{}},n=window.waypoint;i.prototype.add=function(t){this.waypoints.push(t)},i.prototype.cleartriggerqueues=function(){this.triggerqueues={up:[],down:[],left:[],right:[]}},i.prototype.flushtriggers=function(){for(var i in this.triggerqueues){var o=this.triggerqueues[i],n="up"===i||"left"===i;o.sort(n?e:t);for(var r=0,s=o.length;s>r;r+=1){var a=o[r];(a.options.continuous||r===o.length-1)&&a.trigger([i])}}this.cleartriggerqueues()},i.prototype.next=function(e){this.waypoints.sort(t);var i=n.adapter.inarray(e,this.waypoints),o=i===this.waypoints.length-1;return o?null:this.waypoints[i+1]},i.prototype.previous=function(e){this.waypoints.sort(t);var i=n.adapter.inarray(e,this.waypoints);return i?this.waypoints[i-1]:null},i.prototype.queuetrigger=function(t,e){this.triggerqueues[e].push(t)},i.prototype.remove=function(t){var e=n.adapter.inarray(t,this.waypoints);e>-1&&this.waypoints.splice(e,1)},i.prototype.first=function(){return this.waypoints[0]},i.prototype.last=function(){return this.waypoints[this.waypoints.length-1]},i.findorcreate=function(t){return o[t.axis][t.name]||new i(t)},n.group=i}(),function(){"use strict";function t(t){this.$element=e(t)}var e=window.jquery,i=window.waypoint;e.each(["innerheight","innerwidth","off","offset","on","outerheight","outerwidth","scrollleft","scrolltop"],function(e,i){t.prototype[i]=function(){var t=array.prototype.slice.call(arguments);return this.$element[i].apply(this.$element,t)}}),e.each(["extend","inarray","isemptyobject"],function(i,o){t[o]=e[o]}),i.adapters.push({name:"jquery",adapter:t}),i.adapter=t}(),function(){"use strict";function t(t){return function(){var i=[],o=arguments[0];return t.isfunction(arguments[0])&&(o=t.extend({},arguments[1]),o.handler=arguments[0]),this.each(function(){var n=t.extend({},o,{element:this});"string"==typeof n.context&&(n.context=t(this).closest(n.context)[0]),i.push(new e(n))}),i}}var e=window.waypoint;window.jquery&&(window.jquery.fn.waypoint=t(window.jquery)),window.zepto&&(window.zepto.fn.waypoint=t(window.zepto))}(); !function(t){"use strict";t.fn.countup=function(e){var a=t.extend({time:2e3,delay:10},e);return this.each(function(){var e=t(this),n=a,u=function(){e.data("counterupto")||e.data("counterupto",e.text());var t=parseint(e.data("counter-time"))>0?parseint(e.data("counter-time")):n.time,a=parseint(e.data("counter-delay"))>0?parseint(e.data("counter-delay")):n.delay,u=t/a,r=e.data("counterupto"),o=[r],c=/[0-9]+,[0-9]+/.test(r);r=r.replace(/,/g,"");for(var d=(/^[0-9]+$/.test(r),/^[0-9]+\.[0-9]+$/.test(r)),s=d?(r.split(".")[1]||[]).length:0,i=u;i>=1;i--){var p=parseint(math.round(r/u*i));if(d&&(p=parsefloat(r/u*i).tofixed(s)),c)for(;/(\d+)(\d{3})/.test(p.tostring());)p=p.tostring().replace(/(\d+)(\d{3})/,"$1,$2");o.unshift(p)}e.data("counterup-nums",o),e.text("0");var f=function(){e.text(e.data("counterup-nums").shift()),e.data("counterup-nums").length?settimeout(e.data("counterup-func"),a):(delete e.data("counterup-nums"),e.data("counterup-nums",null),e.data("counterup-func",null))};e.data("counterup-func",f),settimeout(e.data("counterup-func"),a)};e.waypoint(u,{offset:"100%",triggeronce:!0})})}}(jquery); /** jquery one page nav plugin* http://github.com/davist11/jquery-one-page-nav** copyright (c) 2010 trevor davis (http://trevordavis.net)* dual licensed under the mit and gpl licenses.* uses the same license as jquery, see:* http://jquery.org/license** @version 3.0.0** example usage:* $('#nav').onepagenav({* currentclass: 'current',* changehash: false,* scrollspeed: 750* });*/;(function($, window, document, undefined) {var onepagenav = function(elem, options) {this.elem = elem;this.$elem = $(elem);this.options = options;this.metadata = this.$elem.data('plugin-options');this.$win = $(window);this.sections = {};this.didscroll = false;this.$doc = $(document);this.docheight = this.$doc.height();};onepagenav.prototype = {defaults: {navitems: 'a',currentclass: 'on',changehash: false,easing: 'swing',filter: '',scrollspeed: 750,scrollthreshold: 0.5,begin: false,end: false,scrollchange: false},init: function() {this.config = $.extend({}, this.defaults, this.options, this.metadata);this.$nav = this.$elem.find(this.config.navitems);if (this.config.filter !== '') {this.$nav = this.$nav.filter(this.config.filter);}this.$nav.on('click.onepagenav', $.proxy(this.handleclick, this));this.getpositions();this.bindinterval();this.$win.on('resize.onepagenav', $.proxy(this.getpositions, this));return this;},adjustnav: function(self, $parent) {self.$elem.find('.' + self.config.currentclass).removeclass(self.config.currentclass);$parent.addclass(self.config.currentclass);},bindinterval: function() {var self = this;var docheight;self.$win.on('scroll.onepagenav', function() {self.didscroll = true;});self.t = setinterval(function() {docheight = self.$doc.height();if (self.didscroll) {self.didscroll = false;self.scrollchange();}if (docheight !== self.docheight) {self.docheight = docheight;self.getpositions();}}, 250);},gethash: function($link) {return $link.attr('href').split('#')[1];},getpositions: function() {var self = this;var linkhref;var toppos;var $target;self.$nav.each(function() {linkhref = self.gethash($(this));$target = $('#' + linkhref);if ($target.length) {toppos = $target.offset().top;self.sections[linkhref] = math.round(toppos);}});},getsection: function(windowpos) {var returnvalue = null;var windowheight = math.round(this.$win.height() * this.config.scrollthreshold);for (var section in this.sections) {if (this.sections[section] - 100 <= windowpos) {returnvalue = section;}}return returnvalue;},handleclick: function(e) {var self = this;var $link = $(e.currenttarget);var $parent = $link.parent();var newloc = '#' + self.gethash($link);if (!$parent.hasclass(self.config.currentclass)) {if (self.config.begin) {self.config.begin();}self.adjustnav(self, $parent);self.unbindinterval();self.scrollto(newloc, function() {if (self.config.changehash) {window.location.hash = newloc;}self.bindinterval();if (self.config.end) {self.config.end();}});}e.preventdefault();},scrollchange: function() {var windowtop = this.$win.scrolltop();var position = this.getsection(windowtop);var $parent;if (position !== null) {$parent = this.$elem.find('a[href$="#' + position + '"]').parent();if (!$parent.hasclass(this.config.currentclass)) {this.adjustnav(this, $parent);if (this.config.scrollchange) {this.config.scrollchange($parent);}}}},scrollto: function(target, callback) {var offset = $(target).offset().top;$('html, body').animate({scrolltop: offset}, this.config.scrollspeed, this.config.easing, callback);},unbindinterval: function() {clearinterval(this.t);this.$win.unbind('scroll.onepagenav');}};onepagenav.defaults = onepagenav.prototype.defaults;$.fn.onepagenav = function(options) {return this.each(function() {new onepagenav(this, options).init();});};})(jquery, window, document);