Second iteration of slideshow function from Smashing Coffeescript