var SmokeEffect={imgLocation:"./wp-content/themes/game/images/mario.png",smokeWidth:130,smokeHeight:171,smokePos:new Array(),makeEffect:function(a,c,b,d){SmokeEffect.smokePos[a]=new Array();SmokeEffect.smokePos[a]['x']=c;SmokeEffect.smokePos[a]['y']=b;var e=(Math.floor(Math.random()*3001));setTimeout("SmokeEffect.animate('"+a+"','"+d+"')",e)},animate:function(a,c){var b=document.createElement("IMG");$(b).attr("src",c);$(b).attr("alt","puff");$(b).attr("class","puff");var d="puff"+Math.floor(Math.random()*1001);$(b).attr("id",d);$(document.body).append($(b));var e=$('#'+a).offset();$(b).css({top:(e['top']+SmokeEffect.smokePos[a]['y'])+"px",left:(e['left']+SmokeEffect.smokePos[a]['x'])+"px",zIndex:25,opacity:0.4});$(b).animate({width:SmokeEffect.smokeWidth+"px",height:SmokeEffect.smokeHeight+"px",marginLeft:"-"+(SmokeEffect.smokeWidth/2)+"px",marginTop:"-"+(SmokeEffect.smokeHeight*1.5)+"px",opacity:0.9},{duration:1500}).animate({marginTop:"-"+(SmokeEffect.smokeHeight*4.5)+"px",opacity:0.0},{duration:2500});var f=5500+(Math.floor(Math.random()*4501));setTimeout("SmokeEffect.animate('"+a+"','"+c+"')",f);setTimeout("$('#"+d+"').remove()",4200)}}
