window.addEvent('domready', function() {
			
	var duration = 4500,
       container = $('slideshow'),
       images = container.getElements('li'),
       currentIndex = 0,
       interval;

    images.each(function(img, i) {
        if (i > 0) {
            img.set('opacity', 0);
        }
    });
    
    var show = function() {
        // images[currentIndex++].fade("out");
        // images[currentIndex %= images.length].fade("in");
        images[currentIndex++].set('tween', {
            duration: 1500
        }).tween('opacity', 0);
        images[currentIndex %= images.length].set('tween', {
            duration: 1500
        }).tween('opacity', 1);
    }
        
    show.periodical(duration);
						
});