
// ----------- Slideshow
	dojo.declare("rra.Slideshow", null, {
		activeContainer : 1,
		activeElement : 1,
		dataLoaded : 0,
		imagesSlideShow: [],
		constructor: function(tmpContainer, inervallTime){
			this.slidesSlideShow	= tmpContainer;
			this.inervallTime		= inervallTime;
		},
	
		play: function(arrImages){
			this.imagesSlideShow = arrImages;
			setInterval(dojo.hitch(this, "toggleImg"), this.inervallTime);
		},
		toggleImg: function(){
			
			elFadeOut = this.slidesSlideShow[this.activeContainer];
			this.activeContainer++;
			if (this.activeContainer == 2) this.activeContainer = 0; 
			elFadeIn = this.slidesSlideShow[this.activeContainer];

			var anim = dojo.fadeOut({ node: elFadeOut,duration: 1000 }); 
			var anim2 = dojo.fadeIn({ node: elFadeIn, duration: 1000 }); 
			dojo.fx.combine([anim,anim2]).play(); 
			setTimeout(dojo.hitch(this, "setSlidePic"), 1000);
			
		},
		setSlidePic: function(){
			if (this.activeElement == this.imagesSlideShow.length-1) this.activeElement = 0;
			else this.activeElement++;
			if (this.activeContainer == 1) {
				dojo.byId("slideImg1").src = this.imagesSlideShow[this.activeElement];
			} else {
				dojo.byId("slideImg2").src = this.imagesSlideShow[this.activeElement];
			}
		}
	});
// ----------- Slideshow END