Image preloading

Preload the 10 next images forward or backwards, depending on the last button clicked by the user.