function ImageFader(c,a,b){this.node_wrapper=document.getElementById(c);if(this.node_wrapper){this.interval=!a?5000:a;this.speed=!b?50:b;this.current=0;this.nodes=this.node_wrapper.getElementsByTagName("img")}}ImageFader.prototype.start=function(){if(this.nodes){var c=this;for(var b=1;b<this.nodes.length;b++){this.nodes[b].xOpacity=0}this.nodes[0].style.display="block";this.nodes[0].xOpacity=0.99;var a=setTimeout(function(){c.set()},c.interval)}};ImageFader.prototype.set=function(){var e=this;var d=this.nodes[this.current].xOpacity;var b=this.nodes[this.current+1]?(this.current+1):0;var c=this.nodes[b].xOpacity;d-=0.05;c+=0.05;this.nodes[b].style.display="block";this.nodes[this.current].xOpacity=d;this.nodes[b].xOpacity=c;this.opacity(this.nodes[this.current]);this.opacity(this.nodes[b]);if(d<=0){this.nodes[this.current].style.display="none";this.current=b;var a=setTimeout(function(){e.set()},e.interval)}else{var a=setTimeout(function(){e.set()},e.speed)}};ImageFader.prototype.opacity=function(a){if(a.xOpacity>0.99){a.xOpacity=0.99;return}a.style.opacity=a.xOpacity;a.style.MozOpacity=a.xOpacity;a.style.filter="alpha(opacity="+(a.xOpacity*100)+")"};
