Hi paquito, and welcome to Sitepoint
I generally wouldn't pre-load images in a gallery like this as it would require more bandwidth. but the trick would be to load the images not in the page after it's finished loading.
If 1.jpg is already in the page it can be removed from the pre-load script. You should also always be on the lookout for places where you can reduce the code.
...



