function ImageFader(f,c,b,e,a,d){this.uniqueID=f;this.cycleTime=c;this.loop=b;this.duration=e;this.cycleDelay=a;this.slideShow=$("#slideShow_"+this.uniqueID);this.randomSelection=d;this.toShow=-1;if(d){this.randomize()}this.slideShow.find("IMG:first").addClass("active");setTimeout("slideShow_"+f+".slideStart();",this.cycleDelay+this.cycleTime)}ImageFader.prototype.slideSwitch=function(){if(this.loop===0){if(this.toShow--==1){return}}var a=this.slideShow.find("IMG.active");for(var b=a.next();!b.is("IMG");b=b.next().length?b.next():this.slideShow.find("IMG:first")){}a.addClass("last-active");var c=this;b.css({opacity:0}).addClass("active").animate({opacity:1},(this.duration),function(){a.removeClass("active last-active");setTimeout("slideShow_"+c.uniqueID+".slideSwitch()",c.cycleTime)})};ImageFader.prototype.slideStart=function(){this.toShow=this.slideShow.children().length;this.slideSwitch()};ImageFader.prototype.randomize=function(){var b=this.slideShow.children();for(var a=0;a<b.length;a++){var c=Math.floor(Math.random()*(b.length-a));this.slideShow.append(b[c])}};

