﻿var numberOfItems = 3;
var currentIndex = 1;

function CycleMe() {
    var nextIndex = currentIndex == numberOfItems ? 1 : currentIndex + 1;
    $("#Apple" + currentIndex).animate({
        opacity: 0.0
    }, 1000, function () {
        $("#Apple" + nextIndex).animate({
            opacity: 1
        }, 1000, function () { });
    });
    currentIndex = nextIndex;
}
