var imgArr; $(document).ready(function(){ preload(["/vehiclephotos/1184931/huge/28f48a9b-03bf-41ca-881c-bd6c86665661.jpg", "/vehiclephotos/1184931/huge/be4ee6b0-a579-4814-9271-954ba9048a5c.jpg", "/vehiclephotos/1184931/huge/9c2b4f59-d2d7-410a-983d-8d9b09ecd3f5.jpg", "/vehiclephotos/1184931/huge/2634ee11-3c9c-4a12-b9f7-d7782e7ea086.jpg", "/vehiclephotos/1184931/huge/f2f3b49b-82e2-4303-9bea-7317f6f5ceca.jpg", "/vehiclephotos/1184931/huge/bb69fbbc-bf0b-49d6-bf48-8db72784aea2.jpg", "/vehiclephotos/1184931/huge/32e17733-33dc-417f-8459-ef3f8c58d5b4.jpg", "/vehiclephotos/1184931/huge/9367141c-3e69-4f15-8edb-ac108b7afc38.jpg", "/vehiclephotos/1184931/huge/d446b776-0400-4020-8463-f1821a8d225d.jpg", "/vehiclephotos/1184931/huge/746498a6-1a4c-4153-bf57-2a57a3b255e2.jpg", "/vehiclephotos/1184931/huge/4f7a2710-a4f9-468f-898f-97060e2ca631.jpg", "/vehiclephotos/1184931/huge/ef16586d-8152-42d5-90cc-bfd98a849c02.jpg", "/vehiclephotos/1184931/huge/f99bb557-36ea-41b9-899a-61adcbff3b95.jpg", "/vehiclephotos/1184931/huge/0a09eded-58fe-425c-a59c-d435d157a929.jpg", "/vehiclephotos/1184931/huge/eb1e0b5f-161f-423d-8f96-3b0dd5b47666.jpg", "/vehiclephotos/1184931/huge/84e4e4f6-4ba3-4261-b891-066e816a10c1.jpg", "/vehiclephotos/1184931/huge/ac44e9db-d8d7-41dd-9163-f1f652ac501e.jpg"]); $("#photo-main").attr("src","/vehiclephotos/1184931/huge/28f48a9b-03bf-41ca-881c-bd6c86665661.jpg"); }); function preload(arrayOfImages) { $(arrayOfImages).each(function(){ $('')[0].src = this; }); imgArr = arrayOfImages; }