!function(i){function t(t,o){var s={inline:!0,"font-size":40,"font-family":"Helvetica, Arial, sans-serif","text-color":null,lines:1,line:0,symbol:"",margin:0,color:"rgb(55,123,181)",background:"rgba(0,0,0,0.1)",size:t.outerWidth(),fill:"5px",range:[0,100]};this.options=i.extend(s,o),this.first_rot_base=-135,this.second_rot_base=-315,this.options.size=parseInt(this.options.size,10),this.options.fill=parseInt(this.options.fill,10),this.options["font-size"]=parseInt(this.options["font-size"],10),this.options.margin=Math.max(0,parseInt(this.options.margin,10)),this.options["text-color"]=this.options["text-color"]||this.options.color,t.css({position:"relative",width:this.options.size,height:this.options.size,display:this.options.inline?"inline-block":"block"}),this.$radialBackground=i("
").appendTo(t).css({"box-sizing":"border-box","-moz-box-sizing":"border-box","-webkit-box-sizing":"border-box",position:"absolute",top:this.options.margin,left:this.options.margin,width:this.options.size-2*this.options.margin,height:this.options.size-2*this.options.margin,border:this.options.fill+"px solid "+this.options.background,"border-radius":Math.ceil(this.options.size/2)+"px"}),this.$radialFirstHalfMask=i("
").appendTo(t).css({position:"absolute",top:this.options.margin,right:this.options.margin,width:Math.round(this.options.size/2)-this.options.margin,height:this.options.size-2*this.options.margin,overflow:"hidden"}),this.$radialSecondHalfMask=i("
").appendTo(t).css({position:"absolute",top:this.options.margin,left:this.options.margin,width:Math.round(this.options.size/2)-this.options.margin,height:this.options.size-2*this.options.margin,overflow:"hidden"}),this.$radialFirstHalf=i("
").appendTo(this.$radialFirstHalfMask).css({"box-sizing":"border-box","-moz-box-sizing":"border-box","-webkit-box-sizing":"border-box",position:"absolute",top:"0px","border-width":this.options.fill,"border-style":"solid","border-color":this.options.color+" "+this.options.color+" transparent transparent",width:"200%",height:"100%","border-radius":"50%",left:"-100%",transform:"rotate("+this.first_rot_base+"deg)"}),this.$radialSecondHalf=i("
").appendTo(this.$radialSecondHalfMask).css({"box-sizing":"border-box","-moz-box-sizing":"border-box","-webkit-box-sizing":"border-box",position:"absolute",top:"0px","border-width":this.options.fill,"border-style":"solid","border-color":this.options.color+" "+this.options.color+" transparent transparent",width:"200%",height:"100%","border-radius":"50%",left:"0px",transform:"rotate("+this.second_rot_base+"deg)"}),this.options["text-color"]&&(this.$radialLabel=i("
").appendTo(t).css({position:"absolute","font-size":this.options["font-size"]+"px","font-family":this.options["font-family"],color:this.options["text-color"],left:"50%",top:"50%",transform:"translate(-50%, -50%)"})),this.perc=0,this.queue=[]}t.prototype.toPerc=function(i){var t=this,o=i.offset||0,s=10,r=i.time||1e3,n=Math.max(0,Math.min(100,(i.perc-t.options.range[0])/(t.options.range[1]-t.options.range[0])*100)),e=n-this.perc,a=e/Math.abs(e),l=e/(r/s);this.animation?this.queue.push(i):this.animation=setInterval(function(){if(a>0&&t.perc>=n||0>a&&t.perc<=n){window.clearInterval(t.animation),t.animation=null;var i=t.queue.shift();return void(i&&t.toPerc(i))}t.perc+=l;var s=t.first_rot_base,r=t.second_rot_base;if(t.perc<50?(s=t.first_rot_base+t.perc/50*180,r=t.second_rot_base):(s=t.first_rot_base+180,r=t.second_rot_base+(t.perc-50)/50*180),t.$radialFirstHalf.css({transform:"rotate("+s+"deg)"}),t.$radialSecondHalf.css({transform:"rotate("+r+"deg)"}),t.$radialLabel){var e=n?t.perc/n*(n-o):0;e=t.options.range[0]+e/100*(t.options.range[1]-t.options.range[0]);for(var h=Math.round(e+t.options.symbol),p=0;p"+h;for(var p=t.options.lines-(t.options.line+1);p>0;p--)h+="
 "}},s)},i.fn.radialProgress=function(o,s){return"init"===o?i(this).data("__radialProgress",new t(i(this),s)):i(this).data("__radialProgress")&&"to"===o&&i(this).data("__radialProgress").toPerc(s),this},i.fn.radialPieChart=function(o,s){if("init"===o)for(var r=s.data.reduce(function(i,t){return i+t.perc},0),n=0;n