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[5327745]=new thumbnail(5327745,"299880","Arthur Pendragon I","Arthur_Pendragon_I_thumb.JPG",130,122,5);thumbnails[5327752]=new thumbnail(5327752,"299880","Arthur Pendragon II","Arthur_Pendragon_II_thumb.JPG",130,150,5);thumbnails[5327753]=new thumbnail(5327753,"299880","Arthur Pendragon IV","Arthur_Pendragon_IV_thumb.JPG",130,102,5);thumbnails[5327755]=new thumbnail(5327755,"299880","Baby Arthur","Baby_Arthur_thumb.JPG",130,111,5);thumbnails[5327758]=new thumbnail(5327758,"299880","Chinese Dragon","Chinese_Dragon_thumb.JPG",130,183,5);thumbnails[5327760]=new thumbnail(5327760,"299880","Cycling Schools","Cycling_School_thumb.JPG",130,70,5);thumbnails[5327761]=new thumbnail(5327761,"299880","Fish on a Bicycle 1","Fish_on_Bike_1_thumb.JPG",130,147,5);thumbnails[5327767]=new thumbnail(5327767,"299880","Fish on a Mountain Bike","Fish_on_Mountain_Bike_thumb.JPG",130,107,5);thumbnails[5327770]=new thumbnail(5327770,"299880","Fish on a Racing Bicycle","Fish_on_Racing_Bike_thumb.JPG",130,153,5);thumbnails[5327772]=new thumbnail(5327772,"299880","Pike on a Trike","Pike_on_Trike_2_thumb.JPG",130,124,5);thumbnails[5327780]=new thumbnail(5327780,"299880","Fish on a Scooter","Scooter_thumb.JPG",130,158,5);thumbnails[5327784]=new thumbnail(5327784,"299880","Pike on a Trike","Pike_on_Trike_11_thumb.JPG",130,139,5);thumbnails[6535159]=new thumbnail(6535159,"299880","Chinese Dragon 2","stainless_dragon_thumb.JPG",130,217,5);thumbnails[5327930]=new thumbnail(5327930,"299870","Veló-ciraptor","Velo-ciraptor_1_thumb.JPG",130,95,5);thumbnails[5327942]=new thumbnail(5327942,"299870","Veló-ciraptor 2","velo-ciraptor_3_thumb.JPG",130,100,5);thumbnails[5327952]=new thumbnail(5327952,"299870","Velociraptor 3","Velo-ciraptor_4_thumb.JPG",130,160,5);thumbnails[5327955]=new thumbnail(5327955,"299870","Giant Bicycle Chain Lizard","Giant_Lizard_thumb.JPG",130,180,5);thumbnails[5327963]=new thumbnail(5327963,"299870","Bicycle Chain Lizard","Large_Lizard_thumb.JPG",130,201,5);thumbnails[5327968]=new thumbnail(5327968,"299870","Bicycle Chain Lizard 2","Large_Lizard_2_thumb.JPG",130,120,5);thumbnails[5327972]=new thumbnail(5327972,"299870","Pig","pig_1_thumb.JPG",130,88,5);thumbnails[5327975]=new thumbnail(5327975,"299870","Pig 2","pig_2_thumb.JPG",130,99,5);thumbnails[5327978]=new thumbnail(5327978,"299870","Seated Frog","Seated_Frog_thumb.JPG",130,134,5);thumbnails[5327979]=new thumbnail(5327979,"299870","Wall Frog","Wall_Frog_thumb.JPG",130,137,5);thumbnails[5327980]=new thumbnail(5327980,"299870","Small Wall Lizard","Small_Wall_Lizard_thumb.JPG",130,247,5);thumbnails[5327991]=new thumbnail(5327991,"299870","Tortoise","Tortoise_1_thumb.JPG",130,95,5);thumbnails[5327993]=new thumbnail(5327993,"299870","Tortoise 2","Tortoise_2_thumb.JPG",130,97,5);thumbnails[5327994]=new thumbnail(5327994,"299870","Tortoise 3","Tortoise_3_thumb.JPG",130,88,5);thumbnails[5327999]=new thumbnail(5327999,"299871","Trout","Brown_Trout_thumb.JPG",130,86,5);thumbnails[5328014]=new thumbnail(5328014,"299871","Crab 1","Crab_1_thumb.JPG",130,85,5);thumbnails[5328023]=new thumbnail(5328023,"299871","Cranford crab","Crab_2_thumb.JPG",130,141,5);thumbnails[5328034]=new thumbnail(5328034,"299871","Cranford trout","Cranford_Trout_thumb.JPG",130,98,5);thumbnails[5328036]=new thumbnail(5328036,"299871","Octopus","Octopus_thumb.JPG",130,106,5);thumbnails[5328043]=new thumbnail(5328043,"299871","Sea Horse","Sea_Horse_thumb.JPG",130,209,5);thumbnails[5328048]=new thumbnail(5328048,"299871","Barbel","barbel_thumb.JPG",130,92,5);thumbnails[5328080]=new thumbnail(5328080,"299911","Sprocket Spheres","Silver_Spheres_thumb.JPG",130,95,5);thumbnails[5328097]=new thumbnail(5328097,"299911","White Stork","White_Stork_thumb.JPG",130,225,5);thumbnails[5328099]=new thumbnail(5328099,"299911","Taking Flight","Taking_Flight_1_thumb.JPG",130,92,5);thumbnails[5328120]=new thumbnail(5328120,"299911","Taking flight 2","Taking_Flight_3_thumb.JPG",130,92,5);thumbnails[5328136]=new thumbnail(5328136,"299911","Primary Commission","Primary_thumb.JPG",130,233,5);thumbnails[5328144]=new thumbnail(5328144,"299911","Cranford College Fountain","Cranford_College_thumb.JPG",130,176,5);thumbnails[5328148]=new thumbnail(5328148,"299911","Grey Heron","Grey_Heron_thumb.JPG",130,411,5);thumbnails[5446061]=new thumbnail(5446061,"299911","Hole in Time","Hole_in_Time_thumb.JPG",130,136,5);thumbnails[5328154]=new thumbnail(5328154,"299917","Winged Crane","Winged_Crane_1_thumb.JPG",130,315,5);thumbnails[5328162]=new thumbnail(5328162,"299917","Winged Crane 2","Winged_Crane_3_thumb.JPG",130,303,5);thumbnails[5328164]=new thumbnail(5328164,"299917","Winged Duck","Winged_Duck_thumb.JPG",130,121,5);thumbnails[5328167]=new thumbnail(5328167,"299917","Winged Duck 2","Winged_Duck_2_thumb.JPG",130,107,5);thumbnails[5328188]=new thumbnail(5328188,"299917","Brown owls","Brown_Owls_thumb.JPG",130,92,5);thumbnails[5328191]=new thumbnail(5328191,"299917","Cockerel","Cockerel_thumb.JPG",130,180,5);thumbnails[5328193]=new thumbnail(5328193,"299917","Fishing Heron","fishing_heron_thumb.JPG",130,224,5);thumbnails[5328199]=new thumbnail(5328199,"299917","Fluffy Flamingo","Fluffy_Flamingo_thumb.JPG",130,199,5);thumbnails[5328203]=new thumbnail(5328203,"299917","Funky Flamingo","Funky_flamingo_thumb.JPG",130,233,5);thumbnails[5328227]=new thumbnail(5328227,"299917","Painted Owl Pair","Painted_Owls_thumb.JPG",130,102,5);thumbnails[5328239]=new thumbnail(5328239,"299917","Owl Pair","Owl_Pair1_thumb.JPG",130,149,5);thumbnails[5328244]=new thumbnail(5328244,"299917","Peacock","peacock_2_thumb.JPG",130,146,5);thumbnails[5328250]=new thumbnail(5328250,"299917","Standing Crane","standing_crane_thumb.JPG",130,263,5);thumbnails[6535148]=new thumbnail(6535148,"299917","Eagle","eagle_front_thumb.JPG",130,98,5);thumbnails[6535153]=new thumbnail(6535153,"299917","Eagle II","eagle_side_thumb.JPG",130,143,5);thumbnails[5328269]=new thumbnail(5328269,"299932","Batman","Batman_thumb.JPG",130,173,5);thumbnails[5328279]=new thumbnail(5328279,"299932","Female Form","Female_Wall_Form_thumb.JPG",130,223,5);thumbnails[5328297]=new thumbnail(5328297,"299932","Female Body","Full_Female_1_thumb.JPG",130,207,5);thumbnails[5328303]=new thumbnail(5328303,"299932","Iron Man","Iron_Man_thumb.JPG",130,206,5);thumbnails[5328314]=new thumbnail(5328314,"299932","Scarecrow","Scarecrow_thumb.JPG",130,172,5);thumbnails[5328343]=new thumbnail(5328343,"299932","Time Trial","Time_Trial_thumb.JPG",130,146,5);thumbnails[5328394]=new thumbnail(5328394,"299937","Bumble Bee","Bumble_Bee_thumb.JPG",130,96,5);thumbnails[5328403]=new thumbnail(5328403,"299937","Butterfly","Butterfly_thumb.JPG",130,104,5);thumbnails[5328415]=new thumbnail(5328415,"299937","Large Honey Bee","Honeybee_Large_thumb.JPG",130,118,5);thumbnails[5328416]=new thumbnail(5328416,"299937","London Wasp","London_Wasp_thumb.JPG",130,144,5);thumbnails[5328419]=new thumbnail(5328419,"299937","Painted Dragonflies","Painted_Dragonflies_thumb.JPG",130,86,5);thumbnails[5328423]=new thumbnail(5328423,"299937","Scorpion","scorpion_thumb.JPG",130,104,5);thumbnails[5328425]=new thumbnail(5328425,"299937","Small Wasp","Small_Wasp_2_thumb.JPG",130,108,5);thumbnails[5328443]=new thumbnail(5328443,"299937","Sprocket Spider","Sprocket_Spider_thumb.JPG",130,87,5);thumbnails[5363174]=new thumbnail(5363174,"299937","Dragonfly","dragon1_thumb.JPG",130,123,5);thumbnails[5363193]=new thumbnail(5363193,"299937","Dragonflies 2","dragon2_thumb.JPG",130,123,5);thumbnails[6535094]=new thumbnail(6535094,"299937","Dragonfly on Bulrush","bullrush_dragonfly_thumb.JPG",130,261,5);thumbnails[6535141]=new thumbnail(6535141,"299937","dragonfly on Stainless Steel Bulrush","stainless_bullrush_thumb.JPG",130,297,5);thumbnails[5328477]=new thumbnail(5328477,"299942","big flamingo","big_flamingo_thumb.JPG",130,170,5);thumbnails[5328492]=new thumbnail(5328492,"299942","Goliath Heron","Goliath_Heron_2_thumb.JPG",130,259,5);thumbnails[5328504]=new thumbnail(5328504,"299942","Marle Place Sphere","Marle_Place_Sphere_thumb.JPG",130,179,5);thumbnails[5328507]=new thumbnail(5328507,"299942","Winged Goliath Heron","Winged_Goliath_Heron_thumb.JPG",130,205,5);thumbnails[5328538]=new thumbnail(5328538,"299956","Geodesic Tree","Geodesic_Tree_thumb.JPG",130,229,5);thumbnails[5328555]=new thumbnail(5328555,"299959","Candle Stick","Candle_Stick_thumb.JPG",130,320,5);thumbnails[5328559]=new thumbnail(5328559,"299959","Christmas Tree","Christmas_Tree_thumb.JPG",130,180,5);thumbnails[5328562]=new thumbnail(5328562,"299959","Chain Ring Clock","Clock_thumb.JPG",130,136,5);thumbnails[5328568]=new thumbnail(5328568,"299959","Mike Galpin Trophy","Mike_Galpin_thumb.JPG",130,238,5);thumbnails[5328570]=new thumbnail(5328570,"299959","Monsterman","Monsterman_Gold_thumb.JPG",130,160,5);thumbnails[5328578]=new thumbnail(5328578,"299959","Rod Meyers Memorial Trophy","Rod_Meyers_thumb.JPG",130,173,5);thumbnails[5328582]=new thumbnail(5328582,"299959","Shock Absorber Trophy","Shock_absorber_thumb.JPG",130,303,5);thumbnails[5328588]=new thumbnail(5328588,"299959","Sprocket Clocks","Sprocket_Clocks_thumb.JPG",130,109,5);thumbnails[5328594]=new thumbnail(5328594,"299963","Airplane","Aircraft_thumb.JPG",130,173,5);thumbnails[5328597]=new thumbnail(5328597,"299963","Geodesic Table","Geodesic_Table_thumb.JPG",130,98,5);thumbnails[5328600]=new thumbnail(5328600,"299963","Jack Table","Jack_Table_thumb.JPG",130,98,5);thumbnails[5328611]=new thumbnail(5328611,"299963","Triquetra","Triquetra_thumb.JPG",130,132,5);thumbnails[5328613]=new thumbnail(5328613,"299963","Train","Train_1_thumb.JPG",130,108,5);var galleries=new Object();galleries[299880]=new gallery(299880,"5327767","Mythical and Humour","gallery",[5327745,5327752,5327753,5327755,5327758,5327760,5327761,5327767,5327770,5327772,5327780,5327784,6535159]);galleries[299870]=new gallery(299870,"5327930","Animals","gallery",[5327930,5327942,5327952,5327955,5327963,5327968,5327972,5327975,5327978,5327979,5327980,5327991,5327993,5327994]);galleries[299871]=new gallery(299871,"5327999","Aquatic","gallery",[5327999,5328014,5328023,5328034,5328036,5328043,5328048]);galleries[299911]=new gallery(299911,"5328080","Abstract","gallery",[5328080,5328097,5328099,5328120,5328136,5328144,5328148,5446061]);galleries[299917]=new gallery(299917,"5328164","Birds","gallery",[5328154,5328162,5328164,5328167,5328188,5328191,5328193,5328199,5328203,5328227,5328239,5328244,5328250,6535148,6535153]);galleries[299932]=new gallery(299932,"5328269","Human","gallery",[5328269,5328279,5328297,5328303,5328314,5328343]);galleries[299937]=new gallery(299937,"5328403","Insects","gallery",[5328394,5328403,5328415,5328416,5328419,5328423,5328425,5328443,5363174,5363193,6535094,6535141]);galleries[299942]=new gallery(299942,"5328507","Large Sculpture","gallery",[5328477,5328492,5328504,5328507]);galleries[299956]=new gallery(299956,"5328538","Plants","gallery",[5328538]);galleries[299959]=new gallery(299959,"5328562","Trophies","gallery",[5328555,5328559,5328562,5328568,5328570,5328578,5328582,5328588]);galleries[299963]=new gallery(299963,"5328594","Miscellaneous","gallery",[5328594,5328597,5328600,5328611,5328613]);var imageSets=new Object();imageSets[1]="5328415,5328403,5328120,5328080,5328036,5327930,5327767,5327758";imageSets[2]="5328594,5328562,5328507,5328403,5328269,5328164,5328080,5327999,5327930,5327767";imageSets[3]="6535159,6535153,6535148,6535141,6535094,5446061,5363193,5363174,5328613,5328611,5328600,5328597,5328594,5328588,5328582,5328578,5328570,5328568,5328562,5328559,5328555,5328538,5328507,5328504,5328492,5328477,5328443,5328425,5328423,5328419,5328416,5328415,5328403,5328394,5328343,5328314,5328303,5328297,5328279,5328269,5328250,5328244,5328239,5328227,5328203,5328199,5328193,5328191,5328188,5328167";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/dazwebnew/images";break}switch(a){case 1:b="http://www1.clikpic.com/dazwebnew/images";break}switch(a){case 2:b="http://admin.clikpic.com/dazwebnew/images";break}switch(a){case 24:b="http://tpc15/clikpic/dazwebnew/images";break}switch(a){case 4:b="http://www.clikchurch.com/dazwebnew/images";break}switch(a){case 5:b="http://www2.clikpic.com/dazwebnew/images";break}switch(a){case 22:b="http://tpc5/clikpic/dazwebnew/images";break}switch(a){case 23:b="http://tpc10/clikpic/dazwebnew/images";break}switch(a){case 25:b="http://tpc16/clikpic/dazwebnew/images";break}switch(a){case 15:b="http://www3.clikpic.com/dazwebnew/images";break}switch(a){case 18:b="http://www4.clikpic.com/dazwebnew/images";break}switch(a){case 19:b="http://www5.clikpic.com/dazwebnew/images";break}switch(a){case 31:b="http://www7.clikpic.com/dazwebnew/images";break}switch(a){case 32:b="http://admin2.clikpic.com/dazwebnew/images";break}switch(a){case 33:b="http://www8.clikpic.com/dazwebnew/images";break}switch(a){case 34:b="http://www9.clikpic.com/dazwebnew/images";break}switch(a){case 35:b="http://admin3.clikpic.com/dazwebnew/images";break}switch(a){case 37:b="http://admin4.clikpic.com/dazwebnew/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="Daren Greenhow Metal Sculpture: "+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> 							"+(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+'")'})}}};