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[5097356]=new thumbnail(5097356,"265481","","IMG_0681-edit_thumb.jpg",100,150,18);thumbnails[5097354]=new thumbnail(5097354,"265481","","IMG_0680-edit_thumb.jpg",100,150,18);thumbnails[5106377]=new thumbnail(5106377,"265481","","IMG_0688-edit_thumb.jpg",130,87,18);thumbnails[5106396]=new thumbnail(5106396,"265481","","IMG_0692-edit_thumb.jpg",100,150,18);thumbnails[5097615]=new thumbnail(5097615,"265481","","IMG_0721-edit1_thumb.jpg",100,150,18);thumbnails[5097575]=new thumbnail(5097575,"265481","","ES-008_thumb.jpg",100,150,18);thumbnails[5107651]=new thumbnail(5107651,"265481","","IMG_0624_thumb.jpg",100,150,18);thumbnails[4584392]=new thumbnail(4584392,"265481","","ES-01712_thumb.jpg",130,87,18);thumbnails[4584395]=new thumbnail(4584395,"265481","","ES-0201_thumb.jpg",100,150,18);thumbnails[4584397]=new thumbnail(4584397,"265481","","ES-0221_thumb.jpg",100,150,18);thumbnails[4584399]=new thumbnail(4584399,"265481","","ES-0381_thumb.jpg",100,150,18);thumbnails[5097636]=new thumbnail(5097636,"265481","","_B242965-J_thumb.jpg",130,87,18);thumbnails[4583506]=new thumbnail(4583506,"265481","","_B242886-web1_thumb.jpg",100,150,18);thumbnails[4584355]=new thumbnail(4584355,"265481","","_B242836-web_thumb.jpg",130,87,18);thumbnails[5097633]=new thumbnail(5097633,"265481","","_B242959colour_thumb.jpg",100,150,18);thumbnails[5106401]=new thumbnail(5106401,"288161","","IMG_0809-edit_thumb.jpg",100,150,18);thumbnails[4584389]=new thumbnail(4584389,"265538","","_E249316_thumb.jpg",130,87,18);thumbnails[5097627]=new thumbnail(5097627,"288161","","IMG_0768-edit_thumb.jpg",100,150,18);thumbnails[5097621]=new thumbnail(5097621,"288161","","IMG_0769-edit1_thumb.jpg",100,150,18);thumbnails[5097774]=new thumbnail(5097774,"265538","","_C1234571_thumb.jpg",130,87,18);thumbnails[4584379]=new thumbnail(4584379,"265538","","_E218518_thumb.jpg",130,87,18);thumbnails[5097452]=new thumbnail(5097452,"288161","","IMG_0783-editbw_thumb.jpg",100,150,18);thumbnails[4584370]=new thumbnail(4584370,"265538","","_E198042_thumb.jpg",130,87,18);thumbnails[5097623]=new thumbnail(5097623,"288161","","IMG_0786-edit1_thumb.jpg",100,150,18);thumbnails[5097457]=new thumbnail(5097457,"288161","","IMG_0864-edit_thumb.jpg",100,150,18);thumbnails[4584380]=new thumbnail(4584380,"265538","","_E218521_thumb.jpg",130,87,18);thumbnails[5097459]=new thumbnail(5097459,"288161","","IMG_0890-edit_thumb.jpg",100,150,18);thumbnails[4584381]=new thumbnail(4584381,"265538","","_E228917_thumb.jpg",130,87,18);thumbnails[5097624]=new thumbnail(5097624,"288161","","IMG_0843-edit1_thumb.jpg",100,150,18);thumbnails[4584452]=new thumbnail(4584452,"265538","","IMG_5090_thumb.jpg",100,150,18);thumbnails[5097460]=new thumbnail(5097460,"288161","","IMG_0931-edit_thumb.jpg",100,150,18);thumbnails[4584418]=new thumbnail(4584418,"288161","","ES-163_thumb.jpg",100,150,18);thumbnails[4584450]=new thumbnail(4584450,"265538","","IMG_4776_thumb.jpg",130,87,18);thumbnails[4584421]=new thumbnail(4584421,"288161","","ES-165_thumb.jpg",130,88,18);thumbnails[4584422]=new thumbnail(4584422,"288161","","ES-169_thumb.jpg",130,87,18);thumbnails[4587351]=new thumbnail(4587351,"265538","","Plane_thumb.jpg",130,87,18);thumbnails[4584402]=new thumbnail(4584402,"288161","","ES-07412_thumb.jpg",130,87,18);thumbnails[4587352]=new thumbnail(4587352,"265538","","PA291426_thumb.jpg",130,87,18);thumbnails[4584403]=new thumbnail(4584403,"288161","","ES-0841_thumb.jpg",130,87,18);thumbnails[4587355]=new thumbnail(4587355,"265538","","PA291453_thumb.jpg",130,87,18);thumbnails[4584406]=new thumbnail(4584406,"288161","","ES-0891_thumb.jpg",100,150,18);thumbnails[4587356]=new thumbnail(4587356,"265538","","PA301534_thumb.jpg",130,87,18);thumbnails[5104267]=new thumbnail(5104267,"288161","","ES-092_thumb.jpg",100,150,18);thumbnails[4584409]=new thumbnail(4584409,"288161","","ES-095_thumb.jpg",100,150,18);thumbnails[4587509]=new thumbnail(4587509,"265538","","PB122162_thumb.jpg",130,87,18);thumbnails[4584411]=new thumbnail(4584411,"288161","","ES-138_thumb.jpg",100,150,18);thumbnails[5097656]=new thumbnail(5097656,"288161","","ES-148_thumb.jpg",100,150,18);thumbnails[5104486]=new thumbnail(5104486,"265538","","IMG_4717-edit_thumb.jpg",130,87,18);thumbnails[4584415]=new thumbnail(4584415,"288161","","ES-152_thumb.jpg",100,150,18);thumbnails[5104503]=new thumbnail(5104503,"265538","","IMG_1886-editcrop_thumb.jpg",100,150,18);thumbnails[4584417]=new thumbnail(4584417,"288161","","ES-159_thumb.jpg",100,150,18);thumbnails[5097565]=new thumbnail(5097565,"288161","","_B232590_thumb.jpg",130,87,18);thumbnails[5097566]=new thumbnail(5097566,"288161","","_B232620_thumb.jpg",100,150,18);thumbnails[5097569]=new thumbnail(5097569,"288161","","_B243044_thumb.jpg",130,87,18);thumbnails[4584461]=new thumbnail(4584461,"288161","","IMG_7177_thumb.jpg",130,87,18);thumbnails[4584464]=new thumbnail(4584464,"288161","","IMG_7340_thumb.jpg",100,150,18);thumbnails[4584469]=new thumbnail(4584469,"265483","","Traffic-Peppers_thumb.jpg",63,150,18);thumbnails[5097584]=new thumbnail(5097584,"288162","","ES-219_thumb.jpg",100,150,18);thumbnails[4583515]=new thumbnail(4583515,"265483","","_8016561_thumb.jpg",130,87,18);thumbnails[5097587]=new thumbnail(5097587,"288162","","ES-204_thumb.jpg",100,150,18);thumbnails[4584307]=new thumbnail(4584307,"265483","","_4225572-comp_thumb.jpg",130,87,18);thumbnails[4584896]=new thumbnail(4584896,"288162","","Cake-9_thumb.jpg",100,150,18);thumbnails[4584303]=new thumbnail(4584303,"265483","","_2254977_thumb.jpg",130,87,18);thumbnails[4584304]=new thumbnail(4584304,"265483","","_4215548_thumb.jpg",130,87,18);thumbnails[4584424]=new thumbnail(4584424,"288162","","ES-172_thumb.jpg",100,150,18);thumbnails[4584425]=new thumbnail(4584425,"288162","","ES-233_thumb.jpg",100,150,18);thumbnails[4584435]=new thumbnail(4584435,"265483","","Edward-Jenkins---Water_thumb.jpg",100,150,18);thumbnails[4584428]=new thumbnail(4584428,"288162","","ES-242_thumb.jpg",100,150,18);thumbnails[4584893]=new thumbnail(4584893,"288162","","Cake-6_thumb.jpg",100,150,18);thumbnails[4587344]=new thumbnail(4587344,"265483","","_2154656_thumb.jpg",100,150,18);thumbnails[5097586]=new thumbnail(5097586,"288162","","ES-236_thumb.jpg",100,150,18);thumbnails[4584429]=new thumbnail(4584429,"288162","","ES-250_thumb.jpg",100,150,18);thumbnails[4584431]=new thumbnail(4584431,"288162","","ES-260_thumb.jpg",100,150,18);thumbnails[4584434]=new thumbnail(4584434,"288162","","ES-270_thumb.jpg",100,150,18);thumbnails[5097462]=new thumbnail(5097462,"288162","","IMG_0997-edit_thumb.jpg",100,150,18);thumbnails[5097463]=new thumbnail(5097463,"288162","","IMG_0998-edit_thumb.jpg",100,150,18);thumbnails[5097466]=new thumbnail(5097466,"288162","","IMG_1196-editnoise_thumb.jpg",100,150,18);thumbnails[5097467]=new thumbnail(5097467,"288162","","IMG_1531-edit2_thumb.jpg",100,150,18);thumbnails[5097610]=new thumbnail(5097610,"288162","","_B243100_thumb.jpg",130,87,18);thumbnails[4583507]=new thumbnail(4583507,"288162","","_B232670-web1_thumb.jpg",130,87,18);thumbnails[5097574]=new thumbnail(5097574,"288162","","_B243132_thumb.jpg",100,150,18);thumbnails[4584506]=new thumbnail(4584506,"265537","","IMG_0366-edited_thumb.jpg",100,150,18);thumbnails[4584436]=new thumbnail(4584436,"265537","","IMG_0139-edited_thumb.jpg",100,150,18);thumbnails[4584349]=new thumbnail(4584349,"265537","","_62260861_thumb.jpg",130,87,18);thumbnails[4584353]=new thumbnail(4584353,"265537","","_7166468_thumb.jpg",130,87,18);thumbnails[5104508]=new thumbnail(5104508,"265537","","IMG_4256-edit_thumb.jpg",130,87,18);thumbnails[4584342]=new thumbnail(4584342,"265537","","_6155810-edit_thumb.jpg",100,150,18);thumbnails[4584344]=new thumbnail(4584344,"265537","","_62259261_thumb.jpg",130,87,18);thumbnails[4584346]=new thumbnail(4584346,"265537","","_62259811_thumb.jpg",130,87,18);thumbnails[5104490]=new thumbnail(5104490,"265537","","IMG_3229-edit_thumb.jpg",100,150,18);thumbnails[4584454]=new thumbnail(4584454,"265537","","IMG_5316_thumb.jpg",100,150,18);thumbnails[4584512]=new thumbnail(4584512,"265537","","IMG_3406_thumb.jpg",130,87,18);thumbnails[5104489]=new thumbnail(5104489,"265537","","IMG_2989-edit_thumb.jpg",130,87,18);thumbnails[4584456]=new thumbnail(4584456,"265537","","IMG_5330_thumb.jpg",100,150,18);thumbnails[5104496]=new thumbnail(5104496,"265537","","IMG_4088_thumb.jpg",130,87,18);thumbnails[4584467]=new thumbnail(4584467,"265537","","IMG_9814-edited_thumb.jpg",100,150,18);thumbnails[4584514]=new thumbnail(4584514,"265537","","IMG_3891-crop_thumb.jpg",100,150,18);thumbnails[5104504]=new thumbnail(5104504,"265537","","IMG_2041_thumb.jpg",100,150,18);thumbnails[4584453]=new thumbnail(4584453,"265537","","IMG_5157_thumb.jpg",130,87,18);thumbnails[4584385]=new thumbnail(4584385,"265537","","_E239023_thumb.jpg",130,87,18);var galleries=new Object();galleries[288160]=new gallery(288160,"5097574,5097452,4584397","Wedding","gallery",[]);galleries[265481]=new gallery(265481,"4584397","Preparation","gallery",[5097356,5097354,5106377,5106396,5097615,5097575,5107651,4584392,4584395,4584397,4584399,5097636,4583506,4584355,5097633]);galleries[288161]=new gallery(288161,"5097452","Ceremony","gallery",[5106401,5097627,5097621,5097452,5097623,5097457,5097459,5097624,5097460,4584418,4584421,4584422,4584402,4584403,4584406,5104267,4584409,4584411,5097656,4584415,4584417,5097565,5097566,5097569,4584461,4584464]);galleries[265538]=new gallery(265538,"4584379","Landscape","gallery",[4584389,5097774,4584379,4584370,4584380,4584381,4584452,4584450,4587351,4587352,4587355,4587356,4587509,5104486,5104503]);galleries[265483]=new gallery(265483,"4584307","Abstract","gallery",[4584469,4583515,4584307,4584303,4584304,4584435,4587344]);galleries[288162]=new gallery(288162,"5097574","Reception","gallery",[5097584,5097587,4584896,4584424,4584425,4584428,4584893,5097586,4584429,4584431,4584434,5097462,5097463,5097466,5097467,5097610,4583507,5097574]);galleries[265537]=new gallery(265537,"4584344","Nature","gallery",[4584506,4584436,4584349,4584353,5104508,4584342,4584344,4584346,5104490,4584454,4584512,5104489,4584456,5104496,4584467,4584514,5104504,4584453,4584385]);var imageSets=new Object();imageSets[1]="4584402";imageSets[2]="5097574,5097452,4584397,4584379,4584344,4584307";imageSets[3]="4584406,4584403,4584402";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 34:b="http://www9.clikpic.com/ehpjenkins/images";break}switch(a){case 1:b="http://www1.clikpic.com/ehpjenkins/images";break}switch(a){case 2:b="http://admin.clikpic.com/ehpjenkins/images";break}switch(a){case 4:b="http://www.clikchurch.com/ehpjenkins/images";break}switch(a){case 5:b="http://www2.clikpic.com/ehpjenkins/images";break}switch(a){case 15:b="http://www3.clikpic.com/ehpjenkins/images";break}switch(a){case 21:b="http://www6.clikpic.com/ehpjenkins/images";break}switch(a){case 18:b="http://www4.clikpic.com/ehpjenkins/images";break}switch(a){case 19:b="http://www5.clikpic.com/ehpjenkins/images";break}switch(a){case 22:b="http://tpc5/clikpic/ehpjenkins/images";break}switch(a){case 23:b="http://tpc10/clikpic/ehpjenkins/images";break}switch(a){case 24:b="http://tpc15/clikpic/ehpjenkins/images";break}switch(a){case 25:b="http://tpc16/clikpic/ehpjenkins/images";break}switch(a){case 31:b="http://www7.clikpic.com/ehpjenkins/images";break}switch(a){case 32:b="http://admin2.clikpic.com/ehpjenkins/images";break}switch(a){case 33:b="http://www8.clikpic.com/ehpjenkins/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="'+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="Ed Jenkins 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+'<form id="paymentForm" style="margin:0px;border:0px;" name="paymentForm" target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">';b=b+'<input type="hidden" name="item_name" value="'+e+'">';ref="";if(c.photo_ref!=""){ref=c.photo_ref+" - "+c.caption}else{ref=c.id+" - "+c.caption}price=d;b=b+'<input type="hidden" name="cmd" value="_cart">';b=b+'<input type="hidden" name="business" value="ehpjenkins@yahoo.co.uk">';b=b+'<input type="hidden" name="currency_code" value="GBP">';b=b+'<input type="hidden" name="add" value="1">';b=b+'<input type="hidden" name="amount" value="'+d+'">';b=b+'<input type="hidden" name="item_number" value="'+ref+'">';b=b+'<input type="Submit" value="Add to cart" id="paymentAddButton" class="button" onmouseover="this.className=\'buttonHi\';" onmouseout="this.className=\'button\';">';b=b+"</form>";b=b+'<form id="paymentCartForm" style="margin:0px;" name="paymentCartForm" target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">';b=b+'<input type="hidden" name="cmd" value="_cart">';b=b+'<input type="hidden" name="business" value="ehpjenkins@yahoo.co.uk">';b=b+'<input type="hidden" name="display" value="1">';b=b+'<input type="Submit" value="View cart" id="paymentViewButton" class="button" onmouseover="this.className=\'buttonHi\';" onmouseout="this.className=\'button\';">';b=b+"</form>";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 e=$("img#gallery"+c);e.parents(".thumbWrap").width(b.width);var a=e.siblings("h3").size()==1?e.siblings("h3"):e.parent(".thumbWrap").siblings("h3");var f=parseInt(a.css("padding-left"))+parseInt(a.css("padding-right"));var d=parseInt(a.css("border-left-width"))+parseInt(a.css("border-right-width"));a.width(e.outerWidth(true)-f-d)}}}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+'")'})}}};