Move next image function into ImageGallery. Moved bindPictures back into joopla.js.