(function(n){var t=!1,r,i;typeof define=="function"&&define.amd&&(define(n),t=!0);typeof exports=="object"&&(module.exports=n(),t=!0);t||(r=window.Cookies,i=window.Cookies=n(),i.noConflict=function(){return window.Cookies=r,i})})(function(){function n(){for(var n=0,r={},t,i;n<arguments.length;n++){t=arguments[n];for(i in t)r[i]=t[i]}return r}function t(i){function r(t,u,f){var o,c,l,s,a,e,h;if(typeof document!="undefined"){if(arguments.length>1){f=n({path:"/"},r.defaults,f);typeof f.expires=="number"&&(c=new Date,c.setMilliseconds(c.getMilliseconds()+f.expires*864e5),f.expires=c);f.expires=f.expires?f.expires.toUTCString():"";try{o=JSON.stringify(u);/^[\{\[]/.test(o)&&(u=o)}catch(w){}u=i.write?i.write(u,t):encodeURIComponent(String(u)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent);t=encodeURIComponent(String(t));t=t.replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent);t=t.replace(/[\(\)]/g,escape);l="";for(s in f)f[s]&&(l+="; "+s,f[s]!==!0)&&(l+="="+f[s]);return document.cookie=t+"="+u+l}t||(o={});for(var y=document.cookie?document.cookie.split("; "):[],p=/(%[0-9A-Z]{2})+/g,v=0;v<y.length;v++){a=y[v].split("=");e=a.slice(1).join("=");this.json||e.charAt(0)!=='"'||(e=e.slice(1,-1));try{if(h=a[0].replace(p,decodeURIComponent),e=i.read?i.read(e,h):i(e,h)||e.replace(p,decodeURIComponent),this.json)try{e=JSON.parse(e)}catch(w){}if(t===h){o=e;break}t||(o[h]=e)}catch(w){}}return o}}return r.set=r,r.get=function(n){return r.call(r,n)},r.getJSON=function(){return r.apply({json:!0},[].slice.call(arguments))},r.defaults={},r.remove=function(t,i){r(t,"",n(i,{expires:-1}))},r.withConverter=t,r}return t(function(){})}),function(n,t,i){function h(t,i){this.bodyOverflowX;this.callbacks={hide:[],show:[]};this.checkInterval=null;this.Content;this.$el=n(t);this.$elProxy;this.elProxyPosition;this.enabled=!0;this.options=n.extend({},f,i);this.mouseIsOverProxy=!1;this.namespace="tooltipster-"+Math.round(Math.random()*1e5);this.Status="hidden";this.timerHide=null;this.timerShow=null;this.$tooltip;this.options.iconTheme=this.options.iconTheme.replace(".","");this.options.theme=this.options.theme.replace(".","");this._init()}function e(t,i){var r=!0;return n.each(t,function(n){if(typeof i[n]=="undefined"||t[n]!==i[n])return r=!1,!1}),r}function o(){return!s&&r}function u(){var u=i.body||i.documentElement,r=u.style,n="transition",t;if(typeof r[n]=="string")return!0;for(v=["Moz","Webkit","Khtml","O","ms"],n=n.charAt(0).toUpperCase()+n.substr(1),t=0;t<v.length;t++)if(typeof r[v[t]+n]=="string")return!0;return!1}var f={animation:"fade",arrow:!0,arrowColor:"",autoClose:!0,content:null,contentAsHTML:!1,contentCloning:!0,debug:!0,delay:200,minWidth:0,maxWidth:null,functionInit:function(){},functionBefore:function(n,t){t()},functionReady:function(){},functionAfter:function(){},hideOnClick:!1,icon:"(?)",iconCloning:!0,iconDesktop:!1,iconTouch:!1,iconTheme:"tooltipster-icon",interactive:!1,interactiveTolerance:350,multiple:!1,offsetX:0,offsetY:0,onlyOne:!1,position:"top",positionTracker:!1,positionTrackerCallback:function(){this.option("trigger")=="hover"&&this.option("autoClose")&&this.hide()},restoration:"current",speed:200,timer:0,theme:"tooltipster-default",touchDevices:!0,trigger:"hover",updateAnimation:!0},r,s;h.prototype={_init:function(){var t=this,u,f;if(i.querySelector)if(u=null,t.$el.data("tooltipster-initialTitle")===undefined&&(u=t.$el.data("tip"),u===undefined&&(u=null),t.$el.data("tooltipster-initialTitle",u)),t.options.content!==null?t._content_set(t.options.content):t._content_set(u),f=t.options.functionInit.call(t.$el,t.$el,t.Content),typeof f!="undefined"&&t._content_set(f),t.$el.removeAttr("title").addClass("tooltipstered"),!r&&t.options.iconDesktop||r&&t.options.iconTouch?(typeof t.options.icon=="string"?(t.$elProxy=n('<span class="'+t.options.iconTheme+'"><\/span>'),t.$elProxy.text(t.options.icon)):t.$elProxy=t.options.iconCloning?t.options.icon.clone(!0):t.options.icon,t.$elProxy.insertAfter(t.$el)):t.$elProxy=t.$el,t.options.trigger=="hover"){t.$elProxy.on("mouseenter."+t.namespace,function(){(!o()||t.options.touchDevices)&&(t.mouseIsOverProxy=!0,t._show())}).on("mouseleave."+t.namespace,function(){(!o()||t.options.touchDevices)&&(t.mouseIsOverProxy=!1)});if(r&&t.options.touchDevices)t.$elProxy.on("touchstart."+t.namespace,function(){t._showNow()})}else if(t.options.trigger=="click")t.$elProxy.on("click."+t.namespace,function(){(!o()||t.options.touchDevices)&&t._show()})},_show:function(){var n=this;n.Status!="shown"&&n.Status!="appearing"&&(n.options.delay?n.timerShow=setTimeout(function(){(n.options.trigger=="click"||n.options.trigger=="hover"&&n.mouseIsOverProxy)&&n._showNow()},n.options.delay):n._showNow())},_showNow:function(i){var f=this;f.options.functionBefore.call(f.$el,f.$el,function(){var e,s,o;if(f.enabled&&f.Content!==null){if(i&&f.callbacks.show.push(i),f.callbacks.hide=[],clearTimeout(f.timerShow),f.timerShow=null,clearTimeout(f.timerHide),f.timerHide=null,f.options.onlyOne&&n(".tooltipstered").not(f.$el).each(function(t,i){var r=n(i),u=r.data("tooltipster-ns");n.each(u,function(n,t){var i=r.data(t),u=i.status(),f=i.option("autoClose");u!=="hidden"&&u!=="disappearing"&&f&&i.hide()})}),e=function(){f.Status="shown";n.each(f.callbacks.show,function(n,t){t.call(f.$el)});f.callbacks.show=[]},f.Status!=="hidden")s=0,f.Status==="disappearing"?(f.Status="appearing",u()?(f.$tooltip.clearQueue().removeClass("tooltipster-dying").addClass("tooltipster-"+f.options.animation+"-show"),f.options.speed>0&&f.$tooltip.delay(f.options.speed),f.$tooltip.queue(e)):f.$tooltip.stop().fadeIn(e)):f.Status==="shown"&&e();else{f.Status="appearing";s=f.options.speed;f.bodyOverflowX=n("body").css("overflow-x");n("body").css("overflow-x","hidden");var h="tooltipster-"+f.options.animation,c="-webkit-transition-duration: "+f.options.speed+"ms; -webkit-animation-duration: "+f.options.speed+"ms; -moz-transition-duration: "+f.options.speed+"ms; -moz-animation-duration: "+f.options.speed+"ms; -o-transition-duration: "+f.options.speed+"ms; -o-animation-duration: "+f.options.speed+"ms; -ms-transition-duration: "+f.options.speed+"ms; -ms-animation-duration: "+f.options.speed+"ms; transition-duration: "+f.options.speed+"ms; animation-duration: "+f.options.speed+"ms;",l=f.options.minWidth?"min-width:"+Math.round(f.options.minWidth)+"px;":"",a=f.options.maxWidth?"max-width:"+Math.round(f.options.maxWidth)+"px;":"",v=f.options.interactive?"pointer-events: auto;":"";f.$tooltip=n('<div class="tooltipster-base '+f.options.theme+'" style="'+l+" "+a+" "+v+" "+c+'"><div class="tooltipster-content"><\/div><\/div>');u()&&f.$tooltip.addClass(h);f._content_insert();f.$tooltip.appendTo("body");f.reposition();f.options.functionReady.call(f.$el,f.$el,f.$tooltip);u()?(f.$tooltip.addClass(h+"-show"),f.options.speed>0&&f.$tooltip.delay(f.options.speed),f.$tooltip.queue(e)):f.$tooltip.css("display","none").fadeIn(f.options.speed,e);f._interval_set();n(t).on("scroll."+f.namespace+" resize."+f.namespace,function(){f.reposition()});if(f.options.autoClose)if(n("body").off("."+f.namespace),f.options.trigger=="hover"){if(r&&setTimeout(function(){n("body").on("touchstart."+f.namespace,function(){f.hide()})},0),f.options.interactive){if(r)f.$tooltip.on("touchstart."+f.namespace,function(n){n.stopPropagation()});o=null;f.$elProxy.add(f.$tooltip).on("mouseleave."+f.namespace+"-autoClose",function(){clearTimeout(o);o=setTimeout(function(){f.hide()},f.options.interactiveTolerance)}).on("mouseenter."+f.namespace+"-autoClose",function(){clearTimeout(o)})}else f.$elProxy.on("mouseleave."+f.namespace+"-autoClose",function(){f.hide()});if(f.options.hideOnClick)f.$elProxy.on("click."+f.namespace+"-autoClose",function(){f.hide()})}else if(f.options.trigger=="click"&&(setTimeout(function(){n("body").on("click."+f.namespace+" touchstart."+f.namespace,function(){f.hide()})},0),f.options.interactive))f.$tooltip.on("click."+f.namespace+" touchstart."+f.namespace,function(n){n.stopPropagation()})}f.options.timer>0&&(f.timerHide=setTimeout(function(){f.timerHide=null;f.hide()},f.options.timer+s))}})},_interval_set:function(){var t=this;t.checkInterval=setInterval(function(){if(n("body").find(t.$el).length===0||n("body").find(t.$elProxy).length===0||t.Status=="hidden"||n("body").find(t.$tooltip).length===0)(t.Status=="shown"||t.Status=="appearing")&&t.hide(),t._interval_cancel();else if(t.options.positionTracker){var i=t._repositionInfo(t.$elProxy),r=!1;e(i.dimension,t.elProxyPosition.dimension)&&(t.$elProxy.css("position")==="fixed"?e(i.position,t.elProxyPosition.position)&&(r=!0):e(i.offset,t.elProxyPosition.offset)&&(r=!0));r||(t.reposition(),t.options.positionTrackerCallback.call(t,t.$el))}},200)},_interval_cancel:function(){clearInterval(this.checkInterval);this.checkInterval=null},_content_set:function(n){typeof n=="object"&&n!==null&&this.options.contentCloning&&(n=n.clone(!0));this.Content=n},_content_insert:function(){var n=this,t=this.$tooltip.find(".tooltipster-content");typeof n.Content!="string"||n.options.contentAsHTML?t.empty().append(n.Content):t.text(n.Content)},_update:function(n){var t=this;t._content_set(n);t.Content!==null?t.Status!=="hidden"&&(t._content_insert(),t.reposition(),t.options.updateAnimation&&(u()?(t.$tooltip.css({width:"","-webkit-transition":"all "+t.options.speed+"ms, width 0ms, height 0ms, left 0ms, top 0ms","-moz-transition":"all "+t.options.speed+"ms, width 0ms, height 0ms, left 0ms, top 0ms","-o-transition":"all "+t.options.speed+"ms, width 0ms, height 0ms, left 0ms, top 0ms","-ms-transition":"all "+t.options.speed+"ms, width 0ms, height 0ms, left 0ms, top 0ms",transition:"all "+t.options.speed+"ms, width 0ms, height 0ms, left 0ms, top 0ms"}).addClass("tooltipster-content-changing"),setTimeout(function(){t.Status!="hidden"&&(t.$tooltip.removeClass("tooltipster-content-changing"),setTimeout(function(){t.Status!=="hidden"&&t.$tooltip.css({"-webkit-transition":t.options.speed+"ms","-moz-transition":t.options.speed+"ms","-o-transition":t.options.speed+"ms","-ms-transition":t.options.speed+"ms",transition:t.options.speed+"ms"})},t.options.speed))},t.options.speed)):t.$tooltip.fadeTo(t.options.speed,.5,function(){t.Status!="hidden"&&t.$tooltip.fadeTo(t.options.speed,1)}))):t.hide()},_repositionInfo:function(n){return{dimension:{height:n.outerHeight(!1),width:n.outerWidth(!1)},offset:n.offset(),position:{left:parseInt(n.css("left")),top:parseInt(n.css("top"))}}},hide:function(i){var r=this,f,e;return i&&r.callbacks.hide.push(i),r.callbacks.show=[],clearTimeout(r.timerShow),r.timerShow=null,clearTimeout(r.timerHide),r.timerHide=null,f=function(){n.each(r.callbacks.hide,function(n,t){t.call(r.$el)});r.callbacks.hide=[]},r.Status=="shown"||r.Status=="appearing"?(r.Status="disappearing",e=function(){r.Status="hidden";typeof r.Content=="object"&&r.Content!==null&&r.Content.detach();r.$tooltip.remove();r.$tooltip=null;n(t).off("."+r.namespace);n("body").off("."+r.namespace).css("overflow-x",r.bodyOverflowX);n("body").off("."+r.namespace);r.$elProxy.off("."+r.namespace+"-autoClose");r.options.functionAfter.call(r.$el,r.$el);f()},u()?(r.$tooltip.clearQueue().removeClass("tooltipster-"+r.options.animation+"-show").addClass("tooltipster-dying"),r.options.speed>0&&r.$tooltip.delay(r.options.speed),r.$tooltip.queue(e)):r.$tooltip.stop().fadeOut(r.options.speed,e)):r.Status=="hidden"&&f(),r},show:function(n){return this._showNow(n),this},update:function(n){return this.content(n)},content:function(n){return typeof n=="undefined"?this.Content:(this._update(n),this)},reposition:function(){var r=this,k,v,et,p,it,rt,w,dt,c,d,yt,g,gt,ni;if(n("body").find(r.$tooltip).length!==0){r.$tooltip.css("width","");r.elProxyPosition=r._repositionInfo(r.$elProxy);var o=null,b=n(t).width(),i=r.elProxyPosition,e=r.$tooltip.outerWidth(!1),ui=r.$tooltip.innerWidth()+1,l=r.$tooltip.outerHeight(!1);if(r.$elProxy.is("area")){var pt=r.$elProxy.attr("shape"),ti=r.$elProxy.parent().attr("name"),ot=n('img[usemap="#'+ti+'"]'),st=ot.offset().left,ht=ot.offset().top,y=r.$elProxy.attr("coords")!==undefined?r.$elProxy.attr("coords").split(","):undefined;if(pt=="circle"){var wt=parseInt(y[0]),bt=parseInt(y[1]),ct=parseInt(y[2]);i.dimension.height=ct*2;i.dimension.width=ct*2;i.offset.top=ht+bt-ct;i.offset.left=st+wt-ct}else if(pt=="rect"){var wt=parseInt(y[0]),bt=parseInt(y[1]),ii=parseInt(y[2]),ri=parseInt(y[3]);i.dimension.height=ri-bt;i.dimension.width=ii-wt;i.offset.top=ht+bt;i.offset.left=st+wt}else if(pt=="poly"){var ut=0,ft=0,lt=0,at=0,kt="even";for(k=0;k<y.length;k++)v=parseInt(y[k]),kt=="even"?(v>lt&&(lt=v,k===0&&(ut=lt)),v<ut&&(ut=v),kt="odd"):(v>at&&(at=v,k==1&&(ft=at)),v<ft&&(ft=v),kt="even");i.dimension.height=at-ft;i.dimension.width=lt-ut;i.offset.top=ht+ft;i.offset.left=st+ut}else i.dimension.height=ot.outerHeight(!1),i.dimension.width=ot.outerWidth(!1),i.offset.top=ht,i.offset.left=st}var u=0,vt=0,a=0,s=parseInt(r.options.offsetY),h=parseInt(r.options.offsetX),f=r.options.position;function nt(){var i=n(t).scrollLeft();u-i<0&&(o=u-i,u=i);u+e-i>b&&(o=u-(b+i-e),u=b+i-e)}function tt(r,u){i.offset.top-n(t).scrollTop()-l-s-12<0&&u.indexOf("top")>-1&&(f=r);i.offset.top+i.dimension.height+l+12+s>n(t).scrollTop()+n(t).height()&&u.indexOf("bottom")>-1&&(f=r,a=i.offset.top-l-s-12)}f=="top"&&(et=i.offset.left+e-(i.offset.left+i.dimension.width),u=i.offset.left+h-et/2,a=i.offset.top-l-s-12,nt(),tt("bottom","top"));f=="top-left"&&(u=i.offset.left+h,a=i.offset.top-l-s-12,nt(),tt("bottom-left","top-left"));f=="top-right"&&(u=i.offset.left+i.dimension.width+h-e,a=i.offset.top-l-s-12,nt(),tt("bottom-right","top-right"));f=="bottom"&&(et=i.offset.left+e-(i.offset.left+i.dimension.width),u=i.offset.left-et/2+h,a=i.offset.top+i.dimension.height+s+12,nt(),tt("top","bottom"));f=="bottom-left"&&(u=i.offset.left+h,a=i.offset.top+i.dimension.height+s+12,nt(),tt("top-left","bottom-left"));f=="bottom-right"&&(u=i.offset.left+i.dimension.width+h-e,a=i.offset.top+i.dimension.height+s+12,nt(),tt("top-right","bottom-right"));f=="left"&&(u=i.offset.left-h-e-12,vt=i.offset.left+h+i.dimension.width+12,p=i.offset.top+l-(i.offset.top+i.dimension.height),a=i.offset.top-p/2-s,u<0&&vt+e>b?(it=parseFloat(r.$tooltip.css("border-width"))*2,rt=e+u-it,r.$tooltip.css("width",rt+"px"),l=r.$tooltip.outerHeight(!1),u=i.offset.left-h-rt-12-it,p=i.offset.top+l-(i.offset.top+i.dimension.height),a=i.offset.top-p/2-s):u<0&&(u=i.offset.left+h+i.dimension.width+12,o="left"));f=="right"&&(u=i.offset.left+h+i.dimension.width+12,vt=i.offset.left-h-e-12,p=i.offset.top+l-(i.offset.top+i.dimension.height),a=i.offset.top-p/2-s,u+e>b&&vt<0?(it=parseFloat(r.$tooltip.css("border-width"))*2,rt=b-u-it,r.$tooltip.css("width",rt+"px"),l=r.$tooltip.outerHeight(!1),p=i.offset.top+l-(i.offset.top+i.dimension.height),a=i.offset.top-p/2-s):u+e>b&&(u=i.offset.left-h-e-12,o="right"));r.options.arrow&&(w="tooltipster-arrow-"+f,dt=r.options.arrowColor.length<1?r.$tooltip.css("background-color"):r.options.arrowColor,o?o=="left"?(w="tooltipster-arrow-right",o=""):o=="right"?(w="tooltipster-arrow-left",o=""):o="left:"+Math.round(o)+"px;":o="",f=="top"||f=="top-left"||f=="top-right"?(c=parseFloat(r.$tooltip.css("border-bottom-width")),d=r.$tooltip.css("border-bottom-color")):f=="bottom"||f=="bottom-left"||f=="bottom-right"?(c=parseFloat(r.$tooltip.css("border-top-width")),d=r.$tooltip.css("border-top-color")):f=="left"?(c=parseFloat(r.$tooltip.css("border-right-width")),d=r.$tooltip.css("border-right-color")):f=="right"?(c=parseFloat(r.$tooltip.css("border-left-width")),d=r.$tooltip.css("border-left-color")):(c=parseFloat(r.$tooltip.css("border-bottom-width")),d=r.$tooltip.css("border-bottom-color")),c>1&&c++,yt="",c!==0&&(g="",gt="border-color: "+d+";",w.indexOf("bottom")!==-1?g="margin-top: -"+Math.round(c)+"px;":w.indexOf("top")!==-1?g="margin-bottom: -"+Math.round(c)+"px;":w.indexOf("left")!==-1?g="margin-right: -"+Math.round(c)+"px;":w.indexOf("right")!==-1&&(g="margin-left: -"+Math.round(c)+"px;"),yt='<span class="tooltipster-arrow-border" style="'+g+" "+gt+';"><\/span>'),r.$tooltip.find(".tooltipster-arrow").remove(),ni='<div class="'+w+' tooltipster-arrow" style="'+o+'">'+yt+'<span style="border-color:'+dt+';"><\/span><\/div>',r.$tooltip.append(ni));r.$tooltip.css({top:Math.round(a)+"px",left:Math.round(u)+"px"})}return r},enable:function(){return this.enabled=!0,this},disable:function(){return this.hide(),this.enabled=!1,this},destroy:function(){var t=this,i,r;return t.hide(),t.$el[0]!==t.$elProxy[0]&&t.$elProxy.remove(),t.$el.removeData(t.namespace).off("."+t.namespace),i=t.$el.data("tooltipster-ns"),i.length===1?(r=null,t.options.restoration==="previous"?r=t.$el.data("tooltipster-initialTitle"):t.options.restoration==="current"&&(r=typeof t.Content=="string"?t.Content:n("<div><\/div>").append(t.Content).html()),r&&t.$el.attr("title",r),t.$el.removeClass("tooltipstered").removeData("tooltipster-ns").removeData("tooltipster-initialTitle")):(i=n.grep(i,function(n){return n!==t.namespace}),t.$el.data("tooltipster-ns",i)),t},elementIcon:function(){return this.$el[0]!==this.$elProxy[0]?this.$elProxy[0]:undefined},elementTooltip:function(){return this.$tooltip?this.$tooltip[0]:undefined},option:function(n,t){return typeof t=="undefined"?this.options[n]:(this.options[n]=t,this)},status:function(){return this.Status}};n.fn.tooltipster=function(){var t=arguments,r,i;if(this.length===0){if(typeof t[0]=="string"){r=!0;switch(t[0]){case"setDefaults":n.extend(f,t[1]);break;default:r=!1}return r?!0:this}return this}if(typeof t[0]=="string")return i="#*$~&",this.each(function(){var f=n(this).data("tooltipster-ns"),r=f?n(this).data(f[0]):null,u;if(r){if(typeof r[t[0]]=="function")u=r[t[0]](t[1],t[2]);else throw new Error('Unknown method .tooltipster("'+t[0]+'")');if(u!==r)return i=u,!1}else throw new Error("You called Tooltipster's \""+t[0]+'" method on an uninitialized element');}),i!=="#*$~&"?i:this;var u=[],e=t[0]&&typeof t[0].multiple!="undefined",o=e&&t[0].multiple||!e&&f.multiple,s=t[0]&&typeof t[0].debug!="undefined",c=s&&t[0].debug||!s&&f.debug;return this.each(function(){var f=!1,i=n(this).data("tooltipster-ns"),r=null;i?o?f=!0:c&&console.log('Tooltipster: one or more tooltips are already attached to this element: ignoring. Use the "multiple" option to attach more tooltips.'):f=!0;f&&(r=new h(this,t[0]),i||(i=[]),i.push(r.namespace),n(this).data("tooltipster-ns",i),n(this).data(r.namespace,r));u.push(r)}),o?u:this};r=!!("ontouchstart"in t);s=!1;n("body").one("mousemove",function(){s=!0})}(jQuery,window,document),function(n){typeof define=="function"&&define.amd?define(["jquery"],n):typeof exports=="object"?n(require("jquery")):n(jQuery)}(function(n){function i(n,t){return n.toFixed(t.decimals)}var t=function(i,r){this.$element=n(i);this.options=n.extend({},t.DEFAULTS,this.dataOptions(),r);this.init()};t.DEFAULTS={from:0,to:0,speed:1e3,refreshInterval:100,decimals:0,formatter:i,onUpdate:null,onComplete:null};t.prototype.init=function(){this.value=this.options.from;this.loops=Math.ceil(this.options.speed/this.options.refreshInterval);this.loopCount=0;this.increment=(this.options.to-this.options.from)/this.loops};t.prototype.dataOptions=function(){var n={from:this.$element.data("from"),to:this.$element.data("to"),speed:this.$element.data("speed"),refreshInterval:this.$element.data("refresh-interval"),decimals:this.$element.data("decimals")},i=Object.keys(n),r,t;for(r in i)t=i[r],typeof n[t]=="undefined"&&delete n[t];return n};t.prototype.update=function(){this.value+=this.increment;this.loopCount++;this.render();typeof this.options.onUpdate=="function"&&this.options.onUpdate.call(this.$element,this.value);this.loopCount>=this.loops&&(clearInterval(this.interval),this.value=this.options.to,typeof this.options.onComplete=="function"&&this.options.onComplete.call(this.$element,this.value))};t.prototype.render=function(){var n=this.options.formatter.call(this.$element,this.value,this.options);this.$element.text(n)};t.prototype.restart=function(){this.stop();this.init();this.start()};t.prototype.start=function(){this.stop();this.render();this.interval=setInterval(this.update.bind(this),this.options.refreshInterval)};t.prototype.stop=function(){this.interval&&clearInterval(this.interval)};t.prototype.toggle=function(){this.interval?this.stop():this.start()};n.fn.countTo=function(i){return this.each(function(){var u=n(this),r=u.data("countTo"),f=!r||typeof i=="object",e=typeof i=="object"?i:{},o=typeof i=="string"?i:"start";f&&(r&&r.stop(),u.data("countTo",r=new t(this,e)));r[o].call(r)})}})