improving jquery to auto connect slider and slideshow