window.addEvent('domready', function() {
    var list = $('showcase'),
        items = list.getElements('li'),
        length = items.length,
        currentIndex = length - 1;

    function rotate () {
        var next = items[currentIndex];
        list.grab(next, 'top');
        next.get('tween').set(1).start(1);

        currentIndex = (currentIndex + length - 1) % length; 
    }

    function move () {
        items[currentIndex].get('tween').start(0).chain(rotate);
    }

    items.each(function (item) {
        item.set('tween', {
            property: 'opacity'
        });
    });

	move.periodical(10000);
});
