var imgArr; $(document).ready(function(){ preload(["/vehiclephotos/1163013/huge/0e53fa6e-dd37-4ed2-b94b-639906fe8e31.jpg", "/vehiclephotos/1163013/huge/cff3437c-be57-4854-9847-2883b5e7a099.jpg", "/vehiclephotos/1163013/huge/bc9a1820-276f-4a7b-8a72-75a7803b46a1.jpg", "/vehiclephotos/1163013/huge/46eb9c22-70b6-45f5-8d96-7ac300acdea0.jpg", "/vehiclephotos/1163013/huge/a3655391-1044-470d-abc3-7c97a59e0167.jpg", "/vehiclephotos/1163013/huge/551ff2d4-eda1-44f1-8315-d19b189cba6c.jpg", "/vehiclephotos/1163013/huge/784e2773-024f-4a3c-a409-3cd4469ccc76.jpg", "/vehiclephotos/1163013/huge/23c25954-dd66-40a6-818d-692e62305aea.jpg", "/vehiclephotos/1163013/huge/60524e1e-1dd4-4f9e-9a0e-97a56df62770.jpg", "/vehiclephotos/1163013/huge/fa9a8039-4240-4dae-bcf3-17c29482cad6.jpg", "/vehiclephotos/1163013/huge/44318136-fdc9-4920-8905-09994797b736.jpg", "/vehiclephotos/1163013/huge/a32dc865-3c4e-4849-91c9-c7fd3d0604a9.jpg"]); $("#photo-main").attr("src","/vehiclephotos/1163013/huge/0e53fa6e-dd37-4ed2-b94b-639906fe8e31.jpg"); }); function preload(arrayOfImages) { $(arrayOfImages).each(function(){ $('')[0].src = this; }); imgArr = arrayOfImages; }