$(document).ready(function(){ //This keeps track of the slideshow's current location var current_panel = 1; //Controlling the duration of animation by variable will simplify changes var animation_duration = 2500; $.timer(6000, function (timer) { //Determine the current location, and transition to next panel switch(current_panel){ timer.reset(12000); } }); });