!function(e){"use strict";e.fn.fusion_draw_circles=function(){var t=e(this),r=t.children(".counter-circle").attr("data-countdown"),i=t.children(".counter-circle").attr("data-filledcolor"),c=t.children(".counter-circle").attr("data-unfilledcolor"),a=t.children(".counter-circle").attr("data-scale"),n=t.children(".counter-circle").attr("data-size"),o=t.children(".counter-circle").attr("data-speed"),s=t.children(".counter-circle").attr("data-strokesize"),d=t.children(".counter-circle").attr("data-percent-original");a&&(a=e("body").css("color")),r?(t.children(".counter-circle").attr("data-percent",100),t.children(".counter-circle").easyPieChart({barColor:i,trackColor:c,scaleColor:a,scaleLength:5,lineCap:"round",lineWidth:s,size:n,rotate:0,animate:{duration:o,enabled:!0}}),t.children(".counter-circle").data("easyPieChart").enableAnimation(),t.children(".counter-circle").data("easyPieChart").update(d)):t.children(".counter-circle").easyPieChart({barColor:i,trackColor:c,scaleColor:a,scaleLength:5,lineCap:"round",lineWidth:s,size:n,rotate:0,animate:{duration:o,enabled:!0}})},e.fn.fusion_recalc_circles=function(t){var r,i,c=e(this);c.is(":hidden")||(c.attr("data-currentsize",c.width()),c.removeAttr("style"),c.children().removeAttr("style"),r=c.data("originalsize"),(i=c.parent().width())<c.data("currentsize")?(c.css({width:i,height:i}),c.find(".fusion-counter-circle").each(function(){e(this).css({width:i,height:i,"font-size":50*i/220}),e(this).data("size",i),e(this).data("strokesize",i/220*11),t||e(this).data("animate",!1),e(this).attr("data-size",i),e(this).attr("data-strokesize",i/220*11)})):(c.css({width:r,height:r}),c.find(".fusion-counter-circle").each(function(){e(this).css({width:r,height:r,"font-size":50*r/220}),e(this).data("size",r),e(this).data("strokesize",r/220*11),t||e(this).data("animate",!1),e(this).attr("data-size",r),e(this).attr("data-strokesize",r/220*11)})))},e.fn.fusion_redraw_circles=function(){var t=e(this);t.is(":hidden")||(t.fusion_recalc_circles(!1),t.find("canvas").remove(),t.find(".counter-circle").removeData("easyPieChart"),t.fusion_draw_circles())}}(jQuery),jQuery(window).on("load",function(){jQuery(".counter-circle-wrapper").not(".fusion-accordian .counter-circle-wrapper, .fusion-tabs .counter-circle-wrapper, .fusion-modal .counter-circle-wrapper").each(function(){var e=jQuery(this),t=getWaypointOffset(jQuery(this));e.waypoint(function(){e.fusion_recalc_circles(!0),e.fusion_draw_circles(),this.destroy()},{offset:t})}),jQuery(".counter-circle-wrapper").not(".fusion-modal .counter-circle-wrapper").each(function(){var e=jQuery(this),t=jQuery(window).width(),r=jQuery(window).height(),i=getWaypointOffset(e);"top-out-of-view"===i&&(i=getAdminbarHeight()+("function"==typeof getStickyHeaderHeight?getStickyHeaderHeight():"0")),e.waypoint(function(){var i=e;jQuery(window).on("resize",function(e,c){void 0!==c&&"modal-open"===c||(jQuery(window).width()!=t||jQuery(window).width()!=t&&jQuery(window).height()!=r)&&i.fusion_redraw_circles()}),this.destroy()},{offset:i})}),jQuery(".fusion-accordian .counter-circle-wrapper, .fusion-tabs .counter-circle-wrapper, .fusion-modal .counter-circle-wrapper").on("appear",function(){jQuery(this).fusion_draw_circles()})}),jQuery(window).on("fusion-element-render-fusion_counter_circle",function(e,t){jQuery('div[data-cid="'+t+'"]').fusion_redraw_circles()});