"use strict";!function(t){t.fn.circliful=function(e,o){var r=t.extend({foregroundColor:"#3498DB",backgroundColor:"#ccc",pointColor:"none",fillColor:"none",foregroundBorderWidth:15,backgroundBorderWidth:15,pointSize:28.5,fontColor:"#aaa",percent:75,animation:1,animationStep:5,icon:"none",iconSize:"30",iconColor:"#ccc",iconPosition:"top",target:0,start:0,showPercent:1,percentageTextSize:22,textAdditionalCss:"",targetPercent:0,targetTextSize:17,targetColor:"#2980B9",text:null,textStyle:null,textColor:"#666",multiPercentage:0,percentages:null},e);return this.each(function(){var e,o,n,i=t(this),c=r.percent,l=83,a=100,s=110,d=100,x=r.backgroundBorderWidth;"bottom"==r.iconPosition?(l=124,s=95):"left"==r.iconPosition?(a=80,l=110,d=117):"middle"==r.iconPosition?1==r.multiPercentage?(console.log("object"==typeof r.percentages),"object"==typeof r.percentages?x=30:(l=110,o='',o+='',d=228,s=47)):(l=110,o='',o+='',d=175,s=35):"right"==r.iconPosition&&(a=120,l=110,d=80),r.targetPercent>0&&(s=95,o='',o+=''+r.targetPercent+"%",o+='',o+=''),null!=r.text&&0==r.multiPercentage?o+=''+r.text+"":null!=r.text&&1==r.multiPercentage&&(o+=''+r.text+""),"none"!=r.icon&&(n='&#x'+r.icon+""),i.addClass("svg-container").append(t(''+o+''+n+'0%'));var g=i.find(".circle"),k=i.find(".timer"),f=30,u=0,y=r.animationStep,h=0,C=0,p=0;if(r.start>0&&r.target>0&&(c=r.start/(r.target/100),p=r.target/100),1==r.animation)var m=window.setInterval(function(){u>=3.6*c?(window.clearInterval(m),h=1):(u+=y,C+=p),u/3.6>=c&&1==h&&(u=3.6*c),C>r.target&&1==h&&(C=r.target),g.attr("stroke-dasharray",u+", 20000"),1==r.showPercent?k.text(parseInt(u/360*100)+"%"):k.text(C)}.bind(g),f);else g.attr("stroke-dasharray",3.6*c+", 20000"),1==r.showPercent?k.text(c+"%"):k.text(r.target)})}}(jQuery);