
    var temp = next;
    nextIndex = currentIndex;
    next = current.attr("id", "next");
    currentIndex = previousIndex;
    current = previous.attr("id", "current");
    previousIndex = previousIndex <= 0 ? slides.length - 1 : previousIndex - 1;
    previous = temp.attr("id", "previous");
  } else {
    nextIndex = currentIndex >= slides.length - 1 ? 0 : currentIndex + 1;
    previousIndex = currentIndex <= 0 ? slides.length - 1 : currentIndex - 1;
  }
  previous.transition().delay(750).attr("src", sli