You can use js setinterval to repeat the event of clicking the thumbnails.
HTML
<input type="checkbox" name="autoplay" value="autoplay" />autoplay
JS
function autoPlay() {
var nextImg = $('#thumbs>img.clicked').next();
if (nextImg.length == 0) {
nextImg = $('#thumbs>img').eq(0);
}
nextImg.click();
}
var autoInterval;
$('input[type="checkbox"][name="autoplay"]').click(function () {
if ($(this).is(":checked")) {
autoInterval = setInterval(autoPlay, 2000);
} else {
clearInterval(autoInterval);
}
});