window.addEvent('domready', function(){
	var showDuration = 5000;
	var images = $$('div#sidebar div.artist');
	var currentIndex = 0;
	var interval;
	
	var count = 0;
	
	images.each(function(el) {
		if(count != 0) {
			el.fade('hide');
		} else {
			el.setStyle('z-index', '1');
		}
		count++;
	})

	var show = function() {
		if(images.length > 0) {
			images[currentIndex].fade('out').setStyle('z-index', '0');
			images[currentIndex = currentIndex < images.length - 1 ? currentIndex+1 : 0];
			images[currentIndex].fade('in').setStyle('z-index', '1');
		}
	};
	
	window.addEvent('domready',function() {
		interval = show.periodical(showDuration);
	});
});
