$(document).ready(function(){ $.endSlideshow = function () { if($.supersized.vars.slideshow_interval){ clearInterval($.supersized.vars.slideshow_interval); }; $(".supersizedHolder").remove(); $('#slideshow-content').hide(); $('#thumb-list').remove(); } // add slideshow in holder div $('#slideshow input.start').click(function(){ var images=[]; $('#gallerycontent div a').each(function(i,a){ images.push({image : a.href, title : a.title, thumb : a.children[0].src, url : 'javascript:$.endSlideshow()'}); }); if (images.length <= 0) { return; } $("body").append("
"); $("#supersized-loader").remove(); $("#supersized").remove(); $(".supersizedHolder").append("