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[3339898]=new thumbnail(3339898,"","","P10205903_thumb.JPG",130,194,15);thumbnails[3485449]=new thumbnail(3485449,"","","P1020882_thumb.JPG",130,94,15);thumbnails[3522575]=new thumbnail(3522575,"","","P1030124_thumb.JPG",130,92,15);thumbnails[3522655]=new thumbnail(3522655,"","","P1030232_thumb.JPG",130,94,15);thumbnails[3522685]=new thumbnail(3522685,"","","P1030237_thumb.JPG",130,93,15);thumbnails[3522691]=new thumbnail(3522691,"","","P1030239_thumb.JPG",130,91,15);thumbnails[3522809]=new thumbnail(3522809,"","","P10302721_thumb.JPG",130,95,15);thumbnails[3523371]=new thumbnail(3523371,"","","P1030087_thumb.JPG",130,86,15);thumbnails[3523430]=new thumbnail(3523430,"","","P1030268_thumb.JPG",130,96,15);thumbnails[3570121]=new thumbnail(3570121,"","","P1000275_thumb.JPG",130,83,15);thumbnails[3607625]=new thumbnail(3607625,"","","P1000086_thumb.JPG",130,82,15);thumbnails[3638766]=new thumbnail(3638766,"","","P1000269_thumb.JPG",130,94,15);thumbnails[3643183]=new thumbnail(3643183,"","","P1000257_thumb.JPG",130,93,15);thumbnails[3702106]=new thumbnail(3702106,"","","P1000107_thumb.JPG",130,84,15);thumbnails[3730266]=new thumbnail(3730266,"","","P1030952_thumb.JPG",130,87,15);thumbnails[3744202]=new thumbnail(3744202,"","","P1030962_thumb.JPG",130,81,15);thumbnails[3769468]=new thumbnail(3769468,"","","P1030100_thumb.JPG",130,93,15);thumbnails[4299096]=new thumbnail(4299096,"","","P10504592_thumb.JPG",130,90,15);thumbnails[4306979]=new thumbnail(4306979,"","","P1050900_thumb.JPG",130,183,15);thumbnails[4339774]=new thumbnail(4339774,"","","P10509471_thumb.JPG",130,95,15);thumbnails[5062648]=new thumbnail(5062648,"","","P1070794_D0634E6D-1D09-001F-99E1C26E460F7C6E_thumb.JPG",130,85,15);thumbnails[5148020]=new thumbnail(5148020,"","","P1070947_thumb.JPG",130,185,15);thumbnails[5152517]=new thumbnail(5152517,"","","P1070956_thumb.JPG",130,180,15);thumbnails[5174006]=new thumbnail(5174006,"","","P1070972_thumb.JPG",130,156,15);thumbnails[5174053]=new thumbnail(5174053,"","","P1070971_thumb.JPG",130,153,15);thumbnails[5179507]=new thumbnail(5179507,"","","P1070972_414EC576-2219-B5B5-4C8133E21CAD4D31_thumb.JPG",130,156,15);thumbnails[5342826]=new thumbnail(5342826,"","","img161_thumb.jpg",130,196,15);thumbnails[5342852]=new thumbnail(5342852,"","","img1611_thumb.jpg",130,196,15);thumbnails[5351526]=new thumbnail(5351526,"","","img161_188485DB-2219-B5B5-4C47E562F1B59890_thumb.jpg",130,196,15);thumbnails[5390844]=new thumbnail(5390844,"","","P1080581_thumb.JPG",130,179,15);thumbnails[5597890]=new thumbnail(5597890,"",'Pastel Portrait<br>\r\nOf "Rocky"<br>\r\nStaffy X',"P1000967_thumb.JPG",130,183,15);thumbnails[6135228]=new thumbnail(6135228,"","","P1040083_thumb.JPG",130,179,15);thumbnails[6184117]=new thumbnail(6184117,"345407","","P10400221_thumb.JPG",130,185,15);thumbnails[6184118]=new thumbnail(6184118,"345407","","P1040028_thumb.JPG",130,187,15);thumbnails[6184122]=new thumbnail(6184122,"345407","","P1040034_thumb.JPG",130,182,15);thumbnails[6184124]=new thumbnail(6184124,"345407","","P1040044_thumb.JPG",130,186,15);thumbnails[6184126]=new thumbnail(6184126,"345407","","P1040048_thumb.JPG",130,178,15);thumbnails[6184127]=new thumbnail(6184127,"345407","","P1040083_51CA7C2D-1D09-001F-9966973AB2B36A87_thumb.JPG",130,179,15);thumbnails[6184145]=new thumbnail(6184145,"345413","","P1050795_thumb.JPG",130,173,15);thumbnails[6184147]=new thumbnail(6184147,"345413","","P1050797_thumb.JPG",130,185,15);thumbnails[6184149]=new thumbnail(6184149,"345413","","P1050884_thumb.JPG",130,184,15);thumbnails[6184150]=new thumbnail(6184150,"345413","","P1050886_thumb.JPG",130,182,15);thumbnails[6184151]=new thumbnail(6184151,"345413","","P1050896_thumb.JPG",130,188,15);thumbnails[6184154]=new thumbnail(6184154,"345413","","P1010137_thumb.JPG",130,182,15);thumbnails[6297964]=new thumbnail(6297964,"","","P1040480_thumb.JPG",130,177,15);thumbnails[6372529]=new thumbnail(6372529,"","","P1040703_thumb.JPG",130,173,15);thumbnails[6421065]=new thumbnail(6421065,"","","P1040794_thumb.JPG",130,173,15);thumbnails[6623202]=new thumbnail(6623202,"","Pastel Portrait<br>\r\nOf Russ<br>\r\nJack Russell Terrier","P1050101_thumb.JPG",130,166,15);thumbnails[4313317]=new thumbnail(4313317,"",'Portrait of "Duke",German Shepherd',"P1050930_thumb.JPG",130,183,15);thumbnails[6421062]=new thumbnail(6421062,"203493","Pastel Portrait<br>\r\nOf Dylan","P1040790_thumb.JPG",130,179,15);thumbnails[4310200]=new thumbnail(4310200,"",'Portrait of "Duke,German Shepherd.',"P1050913_thumb.JPG",130,187,15);thumbnails[6297966]=new thumbnail(6297966,"203493","Pastel Portrait<br>\r\nOf Stan","P1040479_thumb.JPG",130,175,15);thumbnails[6135318]=new thumbnail(6135318,"203493","Pastel Portrait Of Millie<br>\r\nJack Russell Terrier","P1040078_thumb.JPG",130,178,15);thumbnails[6372527]=new thumbnail(6372527,"203493","Pastel Portrait<br>\r\nOf Charly<br>\r\nStaffordshire Bull Terrier","P1040715_thumb.JPG",130,171,15);thumbnails[6665206]=new thumbnail(6665206,"203493","Pastel Portrait <br>\r\nOf Russ<br>\r\nJack Russell Terrier","P1050137_thumb.JPG",130,167,15);thumbnails[5175831]=new thumbnail(5175831,"203493","Pastel Portrait of Chloe","P1070977_thumb.JPG",130,155,15);thumbnails[3522367]=new thumbnail(3522367,"203493","Pastel Portrait of Max","P1030272_thumb.JPG",130,95,15);thumbnails[6665231]=new thumbnail(6665231,"203493","Pastel Portrait<br>\r\nOf Two Boxers<br>\r\nConnor & Kacy","P1050150_thumb.JPG",130,87,15);thumbnails[4313472]=new thumbnail(4313472,"203493","Pastel Portrait of Duke<br>\r\nGerman Shepherd","P1050929_thumb.JPG",130,185,15);thumbnails[3636943]=new thumbnail(3636943,"203493","Pastel Portrait of Gem<br>\r\nStaffordshire Bull Terrier","P10306401_thumb.JPG",130,178,15);thumbnails[5152515]=new thumbnail(5152515,"","Pastel Portrait of Sian<br>\r\nSheepdog","P1070947_147654_thumb.jpg",130,186,15);thumbnails[3338118]=new thumbnail(3338118,"","Pet Portrait of Kassie, German Shepherd","P10206771_thumb.JPG",130,179,15);thumbnails[4361187]=new thumbnail(4361187,"203493","Pastel Portrait of Kassie<br>\r\nGerman Shepherd","P1020683_thumb.JPG",130,183,15);thumbnails[5597888]=new thumbnail(5597888,"203493","Pastel Portrait Of Rocky<br>\r\nStaffy X Breed<br>\r\n<br>\r\n","P1010117_thumb.JPG",130,183,15);thumbnails[5455616]=new thumbnail(5455616,"203493","Pastel Portrait of <br>\r\nGus<br>\r\nYellow Labrador<br>\r\n","P10306571_thumb.JPG",130,174,15);thumbnails[3502146]=new thumbnail(3502146,"","Pet Portrait of Megan","P1020706_thumb.JPG",130,169,15);thumbnails[4347537]=new thumbnail(4347537,"",'Pastel Portrait of "Megan"',"img051_thumb.jpg",130,168,15);thumbnails[4351670]=new thumbnail(4351670,"203493","Pastel Portrait of Megan","P1020711_64526_thumb.jpg",130,168,15);thumbnails[3338038]=new thumbnail(3338038,"","Pet Portrait of Max","P1000112_thumb.JPG",130,183,15);thumbnails[4348279]=new thumbnail(4348279,"203493","Pastel Pet Portrait of Max","img056_thumb.jpg",130,173,15);thumbnails[3338139]=new thumbnail(3338139,"","Pet Portrait of Rascal, Black Labrador","DSC011crop_thumb.jpg",130,187,15);thumbnails[4327895]=new thumbnail(4327895,"203493","Pastel Portrait of Rascal<br>\r\nBlack Labrador","img034_thumb.jpg",130,182,15);thumbnails[5175804]=new thumbnail(5175804,"203493","Pastel Portrait <br>\r\nOf Sian","P1070953_3CA0EA9C-2219-B5B5-4CD2523FAF680558_thumb.JPG",130,179,15);thumbnails[5152519]=new thumbnail(5152519,"203493","Pastel Portrait of Molly<br>\r\nGolden Retreiver<br>\r\n","P1080045_thumb.JPG",130,85,15);thumbnails[3598642]=new thumbnail(3598642,"203493","Labrador Retrievers Portrait","P1030563_thumb.JPG",130,85,15);thumbnails[3338063]=new thumbnail(3338063,"","Pet Portrait of Henry, Golden Retriever","DSC009crop2_thumb.jpg",130,178,15);thumbnails[4327927]=new thumbnail(4327927,"",'Portrait of "Henry",Golden Retreiver',"img036_thumb.jpg",130,184,15);thumbnails[4357287]=new thumbnail(4357287,"203493","Pastel Portrait of Henry<br>\r\nGolden Retreiver","img135_thumb.jpg",130,183,15);thumbnails[4327953]=new thumbnail(4327953,"203493","Pastel Portrait of Sirius<br>\r\nGolden Retreiver","img0371_thumb.jpg",130,177,15);thumbnails[4328006]=new thumbnail(4328006,"","Pastel Portrait of Springer Spaniel","img045_thumb.jpg",130,177,15);thumbnails[4357309]=new thumbnail(4357309,"203493","Pastel Portrait of Springer Spaniel","img091_thumb.jpg",130,174,15);thumbnails[4328003]=new thumbnail(4328003,"203493","Pastel Portrait of Rascal<br>\r\nBlack Labrador","img040_thumb.jpg",130,187,15);thumbnails[4357301]=new thumbnail(4357301,"203493","Pastel Portrait of King Charles Spaniel.","img134_thumb.jpg",130,183,15);thumbnails[3338053]=new thumbnail(3338053,"","Golden Retreiver Pet Portrait","DSC013crop1_thumb.jpeg",130,177,15);thumbnails[3338086]=new thumbnail(3338086,"","Springer Spaniel Portrait","DSC014crop_thumb.jpg",130,179,15);thumbnails[3338072]=new thumbnail(3338072,"","Pet Portrait of Rascal, Black Labrador","DSC010crop1_thumb.jpeg",130,186,15);thumbnails[3338080]=new thumbnail(3338080,"","Cavalier King Charles Spaniel Portrait","DSC002crop_thumb.jpeg",130,176,15);thumbnails[3338079]=new thumbnail(3338079,"","Black Labrador Portrait","DSC007crop2_thumb.jpeg",130,157,15);thumbnails[4328010]=new thumbnail(4328010,"203493","Pastel Portrait of Black Labrador","img047_thumb.jpg",130,161,15);thumbnails[3340170]=new thumbnail(3340170,"","Portrait of Golden Retrievers","DSC001crop_thumb.jpeg",130,185,15);thumbnails[4328005]=new thumbnail(4328005,"203493","Pastel Portrait of Golden Retreivers","img132_thumb.jpg",130,187,15);thumbnails[3341517]=new thumbnail(3341517,"203493","Labrador Retrievers Pet Portrait","P10209341_thumb.JPG",130,159,15);thumbnails[3347239]=new thumbnail(3347239,"203493","Springer Spaniels Portrait","P1020941_thumb.JPG",130,131,15);thumbnails[3331603]=new thumbnail(3331603,"203493","Pastel Portrait Of<br>\r\nJet & Tyson<br>\r\nGerman Shepherds","DSC005crop_thumb.jpeg",130,114,15);thumbnails[3732496]=new thumbnail(3732496,"203493","Pastel Portrait of Pointers.","P10309521_thumb.JPG",130,87,15);thumbnails[3534016]=new thumbnail(3534016,"","Labrador Retreivers Portrait","P1030305_thumb.JPG",130,128,15);thumbnails[4357330]=new thumbnail(4357330,"203493","Pastel Portrait of 3 Labradors","img140_thumb.jpg",130,129,15);var galleries=new Object();galleries[345407]=new gallery(345407,"6184127,6184126,6184124,6184122,6184118,6184117","Pastel Demonstration","section412691",[6184117,6184118,6184122,6184124,6184126,6184127]);galleries[345413]=new gallery(345413,"6184154,6184151,6184150,6184149,6184147,6184145","Pastel Demonstration 2","section412698",[6184145,6184147,6184149,6184150,6184151,6184154]);galleries[203493]=new gallery(203493,"6665231,6665206,6421062,6372527,6297966,6135318,5597888,5455616,5175831,5175804","Pet Portraits","section250424",[6421062,6297966,6135318,6372527,6665206,5175831,3522367,6665231,4313472,3636943,4361187,5597888,5455616,4351670,4348279,4327895,5175804,5152519,3598642,4357287,4327953,4357309,4328003,4357301,4328010,4328005,3341517,3347239,3331603,3732496,4357330]);var imageSets=new Object();imageSets[1]="6665231,6421062,6372527,6297966,6135318,5175831,4313472,3522367,3331603";imageSets[3]="6665231,6665206,6623202,6421065,6421062,6372529,6372527,6297966,6297964,6184154,6184151,6184150,6184149,6184147,6184145,6184127,6184126,6184124,6184122,6184118,6184117,6135318,6135228,5597890,5597888,5455616,5390844,5351526,5342852,5342826,5179507,5175831,5175804,5174053,5174006,5152519,5152517,5152515,5148020,5062648,4361187,4357330,4357309,4357301,4357287,4351670,4348279,4347537,4339774,4328010";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/markwhittaker/images";break}switch(a){case 1:b="http://www1.clikpic.com/markwhittaker/images";break}switch(a){case 2:b="http://admin.clikpic.com/markwhittaker/images";break}switch(a){case 24:b="http://tpc15/clikpic/markwhittaker/images";break}switch(a){case 4:b="http://www.clikchurch.com/markwhittaker/images";break}switch(a){case 5:b="http://www2.clikpic.com/markwhittaker/images";break}switch(a){case 22:b="http://tpc5/clikpic/markwhittaker/images";break}switch(a){case 23:b="http://tpc10/clikpic/markwhittaker/images";break}switch(a){case 25:b="http://tpc16/clikpic/markwhittaker/images";break}switch(a){case 15:b="http://www3.clikpic.com/markwhittaker/images";break}switch(a){case 18:b="http://www4.clikpic.com/markwhittaker/images";break}switch(a){case 19:b="http://www5.clikpic.com/markwhittaker/images";break}switch(a){case 31:b="http://www7.clikpic.com/markwhittaker/images";break}switch(a){case 32:b="http://admin2.clikpic.com/markwhittaker/images";break}switch(a){case 33:b="http://www8.clikpic.com/markwhittaker/images";break}switch(a){case 34:b="http://www9.clikpic.com/markwhittaker/images";break}switch(a){case 35:b="http://admin3.clikpic.com/markwhittaker/images";break}switch(a){case 37:b="http://admin4.clikpic.com/markwhittaker/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("section250424"!=""){if(backgrounds[imageID].galleries_id!=""){html+='<a href="'+backgrounds[imageID].section_code+"_"+backgrounds[imageID].galleries_id+'.html">'}else{html+='<a href="section250424.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("section250424"!=""){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="Mark Whittaker Pet Portrait Artist: "+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;resizePhotoInfo();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> 							"+(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+'")'})}}};