/*! * jQuery.cSpinner, v0.3.0 * https://github.com/mrienstra/jQuery.cSpinner * * Copyright 2012, Michael Rienstra * Dual licensed under the MIT or GPL Version 2 licenses. * * A jQuery plugin to create animated loading indicators using the canvas element * * Date: Wed Jan 18, 2012 */ (function(e){var Z="cSpinner",u={init:function(c){var b=this,g=function(){var b=document.createElement("canvas");return b.getContext&&b.getContext("2d")?0===b.toDataURL("image/png").indexOf("data:image/png")?2:1:0}();this.each(function(p){var a={speed:1,scale:1,lineWidth:3,lineCap:"round",innerRadius:8.7,outerRadius:14.42,color:"#000",minimumOpacity:0.18,segments:12,dimmestSegments:1,shadow:!1,shadowOffsetX:1,shadowOffsetY:1,shadowBlur:1,shadowColor:"rgba(10, 10, 10, 0.5)",pixelRatio:1,autoStart:!0, pauseOnBlur:!0,alwaysReplaceTarget:!1,fallbackSourcesArray:void 0,checkExistsInterval:1E3,preserveExisting:["id","class","style"],drawSegment:function(a,b,c,d,e,g,f,h){a.globalAlpha=b();a.rotate(2*Math.PI/c);a.beginPath();a.moveTo(0,f.innerRadius);a.lineTo(0,h);a.stroke()}},r="",j,d,v,u="lineWidth,innerRadius,outerRadius,shadowOffsetX,shadowOffsetY,shadowBlur".split(","),h,C,D,k,w,y,s,m,f,z=e(this),A,n,B,q,E,x,l,o=[],t,F,G,i=0;c&&e.extend(a,c);if(0===g){if("undefined"===typeof a.fallbackSourcesArray)return!0; r=""}j=a.pixelRatio;h=a.segments;1!==j&&(a.scale*=j);for(d=0,v=u.length;dy?w:y,k+=a.shadowBlur;k=Math.ceil(k);s=m=2*k;1!==j&&(m/=j);!0===a.alwaysReplaceTarget||"DIV"!==this.nodeName?(f=e("
"+r+"
"),z.replaceWith(function(){for(d=0,v=a.preserveExisting.length;d").attr("src",o[d])}});2===g&&e("canvas:eq(0)",j).remove();t=a.minimumOpacity;0>=t&&(t=1.0E-4);F=Math.round(a.checkExistsInterval/C);G=function(){var b=(h+d-i)%h;return b>=a.dimmestSegments- 1?(b=b-a.dimmestSegments+1,b*(1-t)/(h-a.dimmestSegments)+t):t};w=function(){l.clearRect(-k,-k,s,s);for(d=0;d").attr("src",o[o.length-1])):E.drawImage(x,0,i*s);i+=1};if(0!==g){for(;i