Changed slideshow() to preload images before displaying them.