function thumbnail(g,e,b,f,d,a,c){this.id=g;this.galleries_id=e;this.caption=b;this.src=getServerPath(c)+"/"+f;this.width=d;this.height=a}function gallery(e,c,d,b,a){this.id=e;this.featured_images=c;this.title=d;this.section_code=b;this.photoIDs=a}var thumbnails=new Object();thumbnails[2557092]=new thumbnail(2557092,"244907","Warbarrow bay","WarbarrowBay1_thumb.jpg",130,86,32);thumbnails[2557105]=new thumbnail(2557105,"244907","Kimmeridge Bay","Kimmeridge2_thumb.jpg",130,194,32);thumbnails[2557223]=new thumbnail(2557223,"244907","Kimmeridge bay 2 ","Kimmeridge_thumb.jpg",130,196,32);thumbnails[2557227]=new thumbnail(2557227,"244907","Warbarrow bay at Sunset","WarbarrowSunset_thumb.jpg",130,86,32);thumbnails[2557891]=new thumbnail(2557891,"244906","Archirondel tower ","cruickshank  148_thumb.jpg",130,173,32);thumbnails[2557894]=new thumbnail(2557894,"244907","Dorset cove","cruickshank  149_thumb.jpg",130,61,32);thumbnails[2650906]=new thumbnail(2650906,"244906","Tree Of Life","_DSC4928 - 2008-08-11 at 18-23-44 (1)_thumb.jpg",130,72,32);thumbnails[2650918]=new thumbnail(2650918,"244906","Grosnez Castle At Sunset","DSC_2848 - 2008-06-23 at 20-54-55 (1)_thumb.jpg",130,47,32);thumbnails[2917154]=new thumbnail(2917154,"244907","Swanage rocks","_LND5088_thumb.jpg",130,76,32);thumbnails[2917173]=new thumbnail(2917173,"244906","Archirondel tower","_LND3037_thumb.jpg",130,86,32);thumbnails[2917180]=new thumbnail(2917180,"244906","Invisible steps","_DSC2802_thumb.jpg",130,45,32);thumbnails[2917197]=new thumbnail(2917197,"244906","Rocco tower ","_LND3031_thumb.jpg",130,195,32);thumbnails[3082479]=new thumbnail(3082479,"244905","St Michael's Mount","_LND6412_thumb.jpg",130,86,32);thumbnails[3315685]=new thumbnail(3315685,"244906","Corbiere Lighthouse 1","_LND6663_thumb.jpg",130,87,32);thumbnails[3315693]=new thumbnail(3315693,"244906","Corbiere Lighthouse 2","_LND6671_thumb.jpg",130,85,32);thumbnails[4073417]=new thumbnail(4073417,"244906","Rocco Tower","20090411-_LND7894_thumb.jpg",130,54,32);thumbnails[4073419]=new thumbnail(4073419,"244910","Red Arrows","_ACT4227_-_2007-09-13_at_16-31-02_thumb.jpg",130,179,32);thumbnails[4073420]=new thumbnail(4073420,"244910","Red Arrows 2","_ACT4263_thumb.jpg",130,72,32);thumbnails[4073423]=new thumbnail(4073423,"244910","Red One","_ACT4497_thumb.jpg",130,87,32);thumbnails[4073425]=new thumbnail(4073425,"244906",'Barge Aground "Seagull"',"_LND7037_thumb.jpg",130,41,32);thumbnails[4073426]=new thumbnail(4073426,"244906","Railings","_LND7326_thumb.jpg",130,178,32);thumbnails[4073428]=new thumbnail(4073428,"244906","Old Groynes","CC_20090430_8076_thumb.jpg",130,89,32);thumbnails[4073430]=new thumbnail(4073430,"244906","Le Don Hilton ","CC_20090430_8088_thumb.jpg",130,53,32);thumbnails[4073431]=new thumbnail(4073431,"244906","Plemont Bay ","CC_20090601_8470_thumb.jpg",130,54,32);thumbnails[4073432]=new thumbnail(4073432,"244906","Plemont Bay 2","CC_20090605_8534_thumb.jpg",130,76,32);thumbnails[4073435]=new thumbnail(4073435,"244906","St Catherines Breakwater","CC_20090607_0013_thumb.jpg",130,130,32);thumbnails[4073447]=new thumbnail(4073447,"244909","Straws","Straws_thumb.jpg",130,87,32);thumbnails[4073449]=new thumbnail(4073449,"244909","Smoke","11_thumb.jpg",130,196,32);thumbnails[4073455]=new thumbnail(4073455,"244905","Porth Nanven","_LND6502_thumb.jpg",130,86,32);thumbnails[4073459]=new thumbnail(4073459,"244905","Cornwall Rocks<br>\r\n","_DSC6289_thumb.jpg",130,86,32);thumbnails[4073464]=new thumbnail(4073464,"244905","Mullion Cove","_DSC6319_thumb.jpg",130,107,32);thumbnails[4073466]=new thumbnail(4073466,"244905","Sennen Cove Breakwater","_DSC6373_thumb.jpg",130,50,32);thumbnails[4073467]=new thumbnail(4073467,"244909","Bud..","_DSC4444_thumb.jpg",130,179,32);thumbnails[4073557]=new thumbnail(4073557,"244905","Tin Mine","_LND6489_thumb.jpg",130,86,32);thumbnails[4073560]=new thumbnail(4073560,"244909","Hard Disk","_LND70691_thumb.jpg",130,86,32);thumbnails[4073567]=new thumbnail(4073567,"244910","Arrows III","Legoland_122_of_403_thumb.jpg",130,118,32);thumbnails[4073568]=new thumbnail(4073568,"244907","Mudeford","_PAS2905_-_2007-08-16_at_15-06-44_thumb.jpg",130,194,32);thumbnails[4073570]=new thumbnail(4073570,"244907","Chapman's Pool","_LND4915_thumb.jpg",130,74,32);thumbnails[4073571]=new thumbnail(4073571,"244910","","Air_Display_370_of_654_thumb.jpg",130,79,32);thumbnails[4073572]=new thumbnail(4073572,"244910","Red and Blue","60th_Liberation_Day__115_thumb.jpg",130,160,32);thumbnails[4073574]=new thumbnail(4073574,"244906","Havre des Pas","_DSC2830_thumb.jpg",130,63,32);thumbnails[5343460]=new thumbnail(5343460,"244910","Red Arrows out of the sun","Redarrows_thumb.jpg",130,114,32);thumbnails[5343482]=new thumbnail(5343482,"244910","","Redarrows1_thumb.jpg",130,89,32);thumbnails[5343483]=new thumbnail(5343483,"244910","","Redarrows3_thumb.jpg",130,160,32);thumbnails[5343487]=new thumbnail(5343487,"244907","Washed up","Water_drop-3_thumb.jpg",130,196,32);thumbnails[5343544]=new thumbnail(5343544,"244909","","Water_drop-2_thumb.jpg",130,87,32);thumbnails[5361344]=new thumbnail(5361344,"302050","Isolation","Egypt-2_thumb.jpg",130,86,32);thumbnails[5361356]=new thumbnail(5361356,"302050","Sunset in the desert","Egypt-3_thumb.jpg",130,72,32);thumbnails[5361358]=new thumbnail(5361358,"302050","Spices 1","Egypt-4_thumb.jpg",130,86,32);thumbnails[5361360]=new thumbnail(5361360,"302050","Spices 2","Egypt-5_thumb.jpg",130,86,32);thumbnails[5361361]=new thumbnail(5361361,"302050","Pigments","Egypt-6_thumb.jpg",130,196,32);thumbnails[5361366]=new thumbnail(5361366,"302050","","Egypt-7_thumb.jpg",130,196,32);thumbnails[5361370]=new thumbnail(5361370,"302050","","Egypt-8_thumb.jpg",130,86,32);thumbnails[5361377]=new thumbnail(5361377,"302050","","Egypt-9_thumb.jpg",130,86,32);thumbnails[5361380]=new thumbnail(5361380,"302050","Pigments 2","Egypt-10_thumb.jpg",130,58,32);thumbnails[5361386]=new thumbnail(5361386,"302050","Belly dancer","Egypt_thumb.jpg",130,196,32);thumbnails[5362267]=new thumbnail(5362267,"244909","","Cross_Polarized_forks_thumb.jpg",130,86,32);thumbnails[5362270]=new thumbnail(5362270,"244909","Sun flower","Sun_Flower_thumb.jpg",130,108,32);thumbnails[5404370]=new thumbnail(5404370,"305163","","Emma_thumb.jpg",130,130,32);thumbnails[5404422]=new thumbnail(5404422,"305163","","model1_thumb.jpg",130,173,32);thumbnails[5404424]=new thumbnail(5404424,"305163","","model2_thumb.jpg",130,245,32);thumbnails[5404428]=new thumbnail(5404428,"305163","","model3_thumb.jpg",130,235,32);thumbnails[5404433]=new thumbnail(5404433,"244906","","StCatherines2_thumb.jpg",130,76,32);thumbnails[5406165]=new thumbnail(5406165,"305163","","model4_thumb.jpg",130,196,32);thumbnails[5407403]=new thumbnail(5407403,"305163","","model4_5D0440BA-1D09-001F-99DD6977D2C47DDC_thumb.jpg",130,198,32);thumbnails[5407458]=new thumbnail(5407458,"244909","","h20_thumb.jpg",130,91,32);thumbnails[5421856]=new thumbnail(5421856,"305163","","fandt_thumb.jpg",130,182,32);thumbnails[5421858]=new thumbnail(5421858,"305163","","fin_thumb.jpg",130,164,32);thumbnails[5421859]=new thumbnail(5421859,"305163","","tyl_thumb.jpg",130,86,32);thumbnails[5421919]=new thumbnail(5421919,"305163","","pol_thumb.jpg",130,298,32);thumbnails[5430002]=new thumbnail(5430002,"306818","","event1_thumb.jpg",130,196,32);thumbnails[5430003]=new thumbnail(5430003,"306818","","event2_thumb.jpg",130,196,32);thumbnails[5430005]=new thumbnail(5430005,"306818","","event3_thumb.jpg",130,196,32);thumbnails[5436517]=new thumbnail(5436517,"244906","Slipway","slip_thumb.jpg",130,130,32);thumbnails[5438845]=new thumbnail(5438845,"244906","","corblight_thumb.jpg",130,57,32);thumbnails[5438846]=new thumbnail(5438846,"244906","","corblight1_thumb.jpg",130,143,32);thumbnails[5438848]=new thumbnail(5438848,"244906","","roco1_thumb.jpg",130,54,32);thumbnails[5642213]=new thumbnail(5642213,"319797","","Ronnie-2_thumb.jpg",130,87,32);thumbnails[5642214]=new thumbnail(5642214,"319797","","Ronnie-4_thumb.jpg",130,215,32);thumbnails[6165613]=new thumbnail(6165613,"244904","Tidal Pool","CC_20100612_5888_thumb.jpg",130,87,32);thumbnails[6165642]=new thumbnail(6165642,"244904","Vazon Groynes","CC_20100612_5973_thumb.jpg",130,69,32);thumbnails[6165679]=new thumbnail(6165679,"244904","Tidal Pool II","CC_20100612_5918_-_Version_2_thumb.jpg",130,87,32);thumbnails[6255204]=new thumbnail(6255204,"306818","","IMG_20100426_2468_1_thumb.jpg",130,74,32);thumbnails[6255312]=new thumbnail(6255312,"306818","","IMG_20100426_2270_thumb.jpg",130,75,32);thumbnails[6255360]=new thumbnail(6255360,"306818","","IMG_20100426_2134_thumb.jpg",130,91,32);thumbnails[6255373]=new thumbnail(6255373,"306818","","CC_20100604_3941_thumb.jpg",130,87,32);thumbnails[6255374]=new thumbnail(6255374,"306818","","CC_20100604_3955_thumb.jpg",130,66,32);thumbnails[6255375]=new thumbnail(6255375,"244904","","CC_20100612_5940_thumb.jpg",130,51,32);thumbnails[6286937]=new thumbnail(6286937,"305163","","IMG_20100702_6419_thumb.jpg",130,87,32);thumbnails[6286990]=new thumbnail(6286990,"305163","","IMG_20100702_6436_thumb.jpg",130,87,32);var galleries=new Object();galleries[244910]=new gallery(244910,"5343483,5343482,5343460,4073572,4073571,4073567,4073423,4073420,4073419","Air Displays","gallery",[4073419,4073420,4073423,4073567,4073571,4073572,5343460,5343482,5343483]);galleries[244905]=new gallery(244905,"3082479","Cornwall","gallery",[3082479,4073455,4073459,4073464,4073466,4073557]);galleries[244907]=new gallery(244907,"2917154,2557223,2557105,2557092","Dorset","gallery",[2557092,2557105,2557223,2557227,2557894,2917154,4073568,4073570,5343487]);galleries[302050]=new gallery(302050,"5361386,5361380,5361377,5361370,5361366,5361361,5361360,5361358,5361356,5361344","Egypt","gallery",[5361344,5361356,5361358,5361360,5361361,5361366,5361370,5361377,5361380,5361386]);galleries[306818]=new gallery(306818,"6255374,6255373,6255360,6255312,6255204,5430005,5430003,5430002","Events...","gallery",[5430002,5430003,5430005,6255204,6255312,6255360,6255373,6255374]);galleries[244906]=new gallery(244906,"4073435,4073426,4073425,3315685","Jersey","gallery",[2557891,2650906,2650918,2917173,2917180,2917197,3315685,3315693,4073417,4073425,4073426,4073428,4073430,4073431,4073432,4073435,4073574,5404433,5436517,5438845,5438846,5438848]);galleries[244904]=new gallery(244904,"6255375,6165679,6165642,6165613","Latest work...","gallery",[6165613,6165642,6165679,6255375]);galleries[244909]=new gallery(244909,"5407458,5362270,5362267,5343544,4073560,4073467,4073449,4073447","Macro","gallery",[4073447,4073449,4073467,4073560,5343544,5362267,5362270,5407458]);galleries[319797]=new gallery(319797,"5642214,5642213","Pets","gallery",[5642213,5642214]);galleries[305163]=new gallery(305163,"6286990,6286937,5421919,5421859,5421858,5421856,5407403,5406165,5404428,5404424","Portraits...","gallery",[5404370,5404422,5404424,5404428,5406165,5407403,5421856,5421858,5421859,5421919,6286937,6286990]);var imageSets=new Object();imageSets[1]="4073435,4073426,4073425,3315693,3315685,2917180,2917173,2917154,2650906,2557894,2557891,2557227,2557092";imageSets[2]="4073435,4073426,4073425,3315685,3082479,2917154,2557223,2557105,2557092";imageSets[3]="6286990,6286937,6255375,6255374,6255373,6255360,6255312,6255204,6165679,6165642,6165613,5642214,5642213,5438848,5438846,5438845,5436517,5430005,5430003,5430002,5421919,5421859,5421858,5421856,5407458,5407403,5406165,5404433,5404428,5404424,5404422,5404370,5362270,5362267,5361386,5361380,5361377,5361370,5361366,5361361,5361360,5361358,5361356,5361344,5343544,5343487,5343483,5343482,5343460,4073574";function randomListVal(a){arrayVals=a.split(",");if(arrayVals.length){pos=Math.round(Math.random()*(arrayVals.length-1));val=arrayVals[pos]}else{val=0}return val}function getServerPath(a){var b=-1;switch(a){case 21:b="http://www6.clikpic.com/2mayfield/images";break}switch(a){case 1:b="http://www1.clikpic.com/2mayfield/images";break}switch(a){case 2:b="http://admin.clikpic.com/2mayfield/images";break}switch(a){case 24:b="http://tpc15/clikpic/2mayfield/images";break}switch(a){case 4:b="http://www.clikchurch.com/2mayfield/images";break}switch(a){case 5:b="http://www2.clikpic.com/2mayfield/images";break}switch(a){case 22:b="http://tpc5/clikpic/2mayfield/images";break}switch(a){case 23:b="http://tpc10/clikpic/2mayfield/images";break}switch(a){case 25:b="http://tpc16/clikpic/2mayfield/images";break}switch(a){case 15:b="http://www3.clikpic.com/2mayfield/images";break}switch(a){case 18:b="http://www4.clikpic.com/2mayfield/images";break}switch(a){case 19:b="http://www5.clikpic.com/2mayfield/images";break}switch(a){case 31:b="http://www7.clikpic.com/2mayfield/images";break}switch(a){case 32:b="http://admin2.clikpic.com/2mayfield/images";break}switch(a){case 33:b="http://www8.clikpic.com/2mayfield/images";break}switch(a){case 34:b="http://www9.clikpic.com/2mayfield/images";break}switch(a){case 35:b="http://admin3.clikpic.com/2mayfield/images";break}switch(a){case 37:b="http://admin4.clikpic.com/2mayfield/images";break}return b}function showHomeImage(a){imageID=randomListVal("");if(!basic){a.src=photos[imageID].src;a.width=photos[imageID].width;a.height=photos[imageID].height}else{newImage=new Image(photos[imageID].width,photos[imageID].height);newImage.src=photos[imageID].src;document.images[a.name]=newImage}}function showHomeImageInline(){html="";imageID=randomListVal(imageSets[1]);if("gallery"!=""){if(backgrounds[imageID].galleries_id!=""){html+='<a href="'+backgrounds[imageID].section_code+"_"+backgrounds[imageID].galleries_id+'.html">'}else{html+='<a href="gallery.html">'}}html+='<img src="'+backgrounds[imageID].src+'" width="'+backgrounds[imageID].width+'" height="'+backgrounds[imageID].height+'" class="mainhomepageimage photo" id="mainSample" name="mainSample" alt="'+escape(backgrounds[imageID].caption)+'" border="0">';if("gallery"!=""){html+="</a>"}$("#homepageimage").html(html)}function getNextId(b,d,a){var c=getArrayPos(d,b);if(a){if(c==0){nextImgPos=d.length-1}else{nextImgPos=c-1}}else{if(c==d.length-1){nextImgPos=0}else{nextImgPos=c+1}}nextImg=d[nextImgPos];return nextImg}function next(d,b){var c=d.value;var a=galleries[photos[c].galleries_id].photoIDs;nextImg=getNextId(c,a);if(nextImg!=-1){updateImage(nextImg,d,b)}}function updateImage(f,e,b){if(!basic){document.getElementById("imagePhoto").innerHTML='<img class="mainphoto photo" src="'+photos[f].src+' " id="mainPic" name="mainPic" width="'+photos[f].width+'" height="'+photos[f].height+'" alt="'+photos[f].caption+'">';e.value=photos[f].id;$("#imageTitle").html(photos[f].caption);document.title="Colin Cruickshank Photography: "+photos[f].caption;if(photos[f].caption==""){document.getElementById("imageTitle").style.display="none"}else{document.getElementById("imageTitle").style.display="block"}var a=fnGetImageDetails(f);if(a==""){document.getElementById("imageDetails").style.display="none";var c=document.getElementById("infoWrap");var d=document.getElementById("photoInfo");if(photos[f].caption==""){if(c!=null){c.className="empty"}if(d!=null){d.className="empty"}}else{if(c!=null){c.className="noinfo"}if(d!=null){d.className="noinfo"}}}else{document.getElementById("imageDetails").style.display="block";var c=document.getElementById("infoWrap");if(c!=null){c.className="normal"}var d=document.getElementById("photoInfo");if(d!=null){d.className="normal"}}document.getElementById("imageDetails").innerHTML=a;toggleAddToCartConfirm()}else{window.location="photo_"+photos[f].id+".html"}}function toggleAddToCartConfirm(){if($("#paymentConfirm").size()){$("#paymentConfirm").hide();$("#paymentAddButton").unbind().click(function(){form=document.getElementById("paymentForm");option_id=0;if(form.item_option.value){option_id=form.item_option.value}if(addItemToBasket(form.item_number.value,photos,form.site.value,parseInt(form.quantity.value,10),option_id)){if($.browser.msie){$("#paymentConfirm").text("Item added to cart").show()}else{$("#paymentConfirm").text("Item added to cart").fadeIn()}}else{$("#paymentConfirm").text("Item not added - check cookies are enabled in your browser.").fadeIn()}})}}function fnGetImageDetails(b){var a="";if(photos[b].description!=""){a=a+'<p id="imageDescription">'+photos[b].description+"</p>"}if(photos[b].photo_ref!=""){a=a+'<p class="imageinfo" id="imageRef"><strong>Ref: </strong>'+photos[b].photo_ref+"</p>"}if(photos[b].takendate!=""){a=a+'<p class="imageinfo" id="imageDate"><strong>Date: </strong>'+photos[b].takendate+"</p>"}if(photos[b].location!=""){a=a+'<p class="imageinfo" id="imageLocation"><strong>Location: </strong>'+photos[b].location+"</p>"}if(photos[b].photographer!=""){a=a+'<p class="imageinfo" id="imagePhotographer"><strong>Photographer: </strong>'+photos[b].photographer+"</p>"}if(a!=""){a=a+'<div class="spacer"></div>'}return a}function fnGetPaymentInfo(c){var b="";if(c.item_price!==""){b=b+"<p>Order this print:</p>";b=b+'<p class="imageinfo" id="imagePrice"><strong>'+c.purchase_instruction+"</strong> 				&pound;"+(c.item_price).toFixed(2)+"</p>";var e=c.purchase_instruction;var d=(c.item_price).toFixed(2);var a=0}else{if(c.payment_groups_id!==""){b=b+"<p>Buy this print online:</p>";b=b+'<form id="paymentOptions" style="margin:0px;border:0px;" name="paymentOptions">';b=b+'<select class="paymentlink" name="payment_options_id" onchange="updateItemValues(document.forms.paymentForm,this.form.payment_options_id.options[this.form.payment_options_id.options.selectedIndex].value);">';b=b+getPaymentOptions(c.payment_groups_id);b=b+"</select>";b=b+"</form>";var a=paymentGroups[c.payment_groups_id].options[0];if(paymentOptions[a]){var e=paymentOptions[a].payment_option;var d=paymentOptions[a].price}}else{}}if(c.item_price!==""||c.payment_groups_id!==""){b=b+'<div class="clearing">&nbsp;</div>'}return b}function previous(d,b){var c=d.value;var a=galleries[photos[c].galleries_id].photoIDs;nextImg=getNextId(c,a,1);if(nextImg!=-1){updateImage(nextImg,d,b)}}function showGalleryImage(c,b){imageID=randomListVal(galleries[c].featured_images);if(imageID!=0){b.src=thumbnails[imageID].src;b.width=thumbnails[imageID].width;b.height=thumbnails[imageID].height;if(b.width<130){var f=$("img#gallery"+c);f.parents(".thumbWrap").width(b.width);var a=f.siblings("h3").size()==1?f.siblings("h3"):f.parent(".thumbWrap").siblings("h3");var g=parseInt(a.css("padding-left"))+parseInt(a.css("padding-right"));var d=parseInt(a.css("border-left-width"))+parseInt(a.css("border-right-width"));var e=parseInt(f.parents(".thumbWrap").css("border-left-width"))+parseInt(f.parents(".thumbWrap").css("border-right-width"));a.width(f.outerWidth(true)-g-d+e)}}}function showGalleries(a){if(!basic){temp="";for(i=0;i<galleries.length;i++){if(galleries[i].id!=a){if(temp!=""){temp=temp+" | "}temp=temp+'<a href="gallery_'+galleries[i].id+'.html">'+galleries[i].title+"</a>"}}document.all.galleryLinks.innerHTML="Other galleries: "+temp}}function resizePhotoInfo(n){var b=$.extend({centre:false},n||{});var d=3;$("div#photoPanelOuter").height("auto");$("div#infoWrap").width(200);$("div#photoDetail").css("width","auto");var h=$("div#maincolContent").width();var j=$("div#photoWrap").outerWidth(true);var m=$("div#infoWrap").outerWidth(true);var k=$("div#photoWrap").outerHeight();var f=$("div#infoWrap").outerHeight();var c=$("div#infoWrap").hasClass("empty");floatDrop=0;var g=j;if(!c){if(h<(j+m)){floatDrop=1}if(!floatDrop){var a=$("div#infoWrap").innerWidth();$("div#infoWrap").width(a+(h-j-m-d));m=$("div#infoWrap").outerWidth(true);g=j+m;if(k>f){var e=$("div#photoPanelOuter").height();$("div#photoPanelOuter").height(e+(k-f));var f=$("div#infoWrap").outerHeight()}}else{var l=$("div#photoWrap").outerWidth();$("div#infoWrap").width(l)}}if(b.centre){$("div#photoDetail").width(g);$("div#photoDetail").css("margin-left","auto");$("div#photoDetail").css("margin-right","auto")}else{$("div#photoDetail").css("margin-left","0");$("div#photoDetail").css("margin-right","0")}}function getArrayPos(c,b){for(var a=0;a<c.length;a++){if(c[a]==b){return a}}return -1}function changeBgImg(a,e){var c=randomListVal(imageSets[e]);var d=backgrounds[c].src;var b=$(a);if(b.size()>0){if(/\bimg$/.test(a)){b.attr({src:d})}else{b.css({"background-image":'url("'+d+'")'})}}};