var autoplay = null;
$("#scroll").scrollable().onSeek = function() {
clearTimeout(autoplay); //cancel the previous autoplay timer
autoplay = setTimeout(function(){ //prepare a call in 1000ms to show the next tab.
var tabCount = $("#scroll").scrollable().getItems().length;
var currentTab = $("#scroll").scrollable().getIndex();
if(currentTab == tabCount -1) //if it's the last tab....
{
$("#scroll").scrollable().seekTo(0); // ...show the first one
}
else
{
$("#scroll").scrollable().nextPage(); // ...or show the next one
}
},1000);
};