function AuctionCounter(c,d,f,e,g,b,a){this.minPrice=f;this.startPrice=c;this.wrapper=g;this.dropRate=d;this.span=e;this.color1=b;this.color2=a;this.runStartTime=(new Date()).getTime();this.getTimePassed=function(){return(new Date()).getTime()-this.runStartTime;
};this.getCurrentPrice=function(){return this.startPrice-((Math.round(this.getTimePassed()/1000))*this.dropRate);};this.getFormattedPrice=function(){var h=""+(Math.floor(this.getCurrentPrice()*100)/100);
var i=(h.split("."));if(i.length==1){return i[0]+",00";}if(i.length==2){if(i[1].length==1){return i[0]+","+i[1]+"0";}}return i[0]+","+i[1];};this.updatePrice=function(){newPrice=this.getFormattedPrice();
if(this.span.text()==""||this.span.text()=="auctionPrice"||(this.span.text()!=newPrice&&Math.random()<0.2)){if(this.minPrice<this.getCurrentPrice()){this.wrapper.animate({backgroundColor:this.color1},200).animate({backgroundColor:this.color2},200);
this.span.text(newPrice);}}};this.updateSinglePrice=function(){newPrice=this.getFormattedPrice();if(this.span.text()==""||this.span.text()=="auctionPrice"||this.span.text()!=newPrice){if(this.minPrice<this.getCurrentPrice()){this.wrapper.animate({backgroundColor:this.color1},200).animate({backgroundColor:this.color2},200);
this.span.text(newPrice);}}};}
