var PhotoRotator=new Class({Implements:Options,options:{delay:7000,duration:1000,timeout:900000,start:0},initialize:function(c,e,b){this.setOptions(b);var a=this.options.delay;var f=this.options.duration;var d=this.options.timeout;var g=this.options.start;c=$(c);if($defined(c)){new Request({url:e,method:"get",onSuccess:function(k,o){var t=[];for(var l=0;l<o.documentElement.childNodes.length;l++){if(o.documentElement.childNodes[l].nodeType==1){t.include(o.documentElement.childNodes[l].getAttribute("src"))}}var n=t.slice();var s;var r;var m;var q=function(){m=0;if(n.length==0){n=t.slice()}s=n.getRandom();n.erase(s);new Asset.image(s,{alt:"",onload:function(i){this.setStyles({position:"absolute",opacity:m});this.injectInside(c);this.set("tween",{duration:f});this.tween("opacity",1);r=function(){c.getElements("img").each(function(u){if(u.getNext()!=null){u.dispose()}})}.delay(f)}})};var p;var h=function(){p=q.periodical(a)}.delay(g);var j=function(){p=$clear(p)}.delay(d)}}).send()}}});
