(function(e){"use strict";var t=function(e,t){if(typeof t=="undefined"){t={}}this.init(e,t)},n=t.prototype,r,i=["canvas","gif"],s=["oval","spiral","square","rect","roundRect"],o=/^\#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$/,u=navigator.appVersion.indexOf("MSIE")!==-1&&parseFloat(navigator.appVersion.split("MSIE")[1])===8?true:false,a=!!document.createElement("canvas").getContext,f=40,l=true,c=function(e,t,n){var r=document.createElement(e),i;for(i in n){r[i]=n[i]}if(typeof t!=="undefined"){t.appendChild(r)}return r},h=function(e,t){for(var n in t){e.style[n]=t[n]}return e},p=function(e,t){for(var n in t){e.setAttribute(n,t[n])}return e},d=function(e,t,n,r){e.save();e.translate(t,n);e.rotate(r);e.translate(-t,-n);e.beginPath()};n.init=function(e,t){function s(e){var t=new RegExp("^[0-9-.]*$","g");return t.test(e)}if(typeof t.safeVML==="boolean"){l=t.safeVML}try{if(document.getElementById(e)!==undefined){this.mum=document.getElementById(e)}else{this.mum=document.body}}catch(n){this.mum=document.body}t.id=typeof t.id!=="undefined"?t.id:"canvasLoader";this.cont=c("div",this.mum,{id:t.id});if(a){r=i[0];this.can=c("canvas",this.cont);this.con=this.can.getContext("2d");this.cCan=h(c("canvas",this.cont),{display:"none"});this.cCon=this.cCan.getContext("2d")}else{}this.setColor(this.color);this.draw();h(this.cont,{display:"none"})};n.cont={};n.can={};n.con={};n.cCan={};n.cCon={};n.timer={};n.activeId=0;n.diameter=40;n.setDiameter=function(e){this.diameter=Math.round(Math.abs(e));this.redraw()};n.getDiameter=function(){return this.diameter};n.cRGB={};n.color="#000000";n.setColor=function(e){this.color=o.test(e)?e:"#000000";this.cRGB=this.getRGB(this.color);this.redraw()};n.getColor=function(){return this.color};n.shape=s[0];n.setShape=function(e){var t;for(t in s){if(e===s[t]){this.shape=e;this.redraw();break}}};n.getShape=function(){return this.shape};n.density=40;n.setDensity=function(e){if(l&&r===i[1]){}else{this.density=Math.round(Math.abs(e))}if(this.density>360){this.density=360}this.activeId=0;this.redraw()};n.getDensity=function(){return this.density};n.range=1.3;n.setRange=function(e){this.range=Math.abs(e);this.redraw()};n.getRange=function(){return this.range};n.speed=2;n.setSpeed=function(e){this.speed=Math.round(Math.abs(e))};n.getSpeed=function(){return this.speed};n.fps=24;n.setFPS=function(e){this.fps=Math.round(Math.abs(e));this.reset()};n.getFPS=function(){return this.fps};n.getRGB=function(e){e=e.charAt(0)==="#"?e.substring(1,7):e;return{r:parseInt(e.substring(0,2),16),g:parseInt(e.substring(2,4),16),b:parseInt(e.substring(4,6),16)}};n.draw=function(){var e=0,t,n,o,u,a,f,l,c,h=this.density,v=Math.round(h*this.range),m,g=0,y,b,w,E,S=1e3,x=0,T=this.cCon,N=this.diameter,C=.47;if(r===i[0]){T.clearRect(0,0,S,S);p(this.can,{width:N,height:N});p(this.cCan,{width:N,height:N});while(e