- /* settings */
- var showDuration = 6000,
- container = $('#yoga_wrapper'),
- images = container.find('img').css({"opacity":"0"}),
- currentIndex = 0;
- /* worker */
- var show = function() {
- $(images[currentIndex]).animate({"opacity":0});
- $(images[currentIndex = currentIndex < images.length - 1 ? currentIndex + 1 : 0]).animate({"opacity":1});
- };
- window.setInterval(show, showDuration);