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[2766032]=new thumbnail(2766032,"173645","Victorian arcade","arcade11_thumb.jpg",130,183,32);thumbnails[2771954]=new thumbnail(2771954,"173645","Whitelocks in Leeds","whitelocks_thumb.jpg",130,195,32);thumbnails[2771961]=new thumbnail(2771961,"173645","Bourse in Leeds","Bourse3_thumb.jpg",130,86,32);thumbnails[2771754]=new thumbnail(2771754,"173645","Knowle gateway","Knowle5_thumb.jpg",130,95,32);thumbnails[2771780]=new thumbnail(2771780,"173645","Townesley Hall","TownesleyHall_thumb.jpg",130,86,32);thumbnails[2761495]=new thumbnail(2761495,"172948","Blue wonder","bluewonder_thumb.jpg",130,101,32);thumbnails[2771725]=new thumbnail(2771725,"172948","Butterfly on waterlily","butterflywaterlily1_thumb.jpg",130,108,32);thumbnails[2771767]=new thumbnail(2771767,"172948","Ragged butterfly","Raggedbutterfly2_thumb.jpg",130,110,32);thumbnails[2771772]=new thumbnail(2771772,"172948","Australian butterfly","Stratford3_thumb.jpg",130,133,32);thumbnails[2771720]=new thumbnail(2771720,"172948","Butterfly on daisy","butterflydaisy_thumb.jpg",130,123,32);thumbnails[2771726]=new thumbnail(2771726,"172948","Camouflage","camouflage_thumb.jpg",130,118,32);thumbnails[2771734]=new thumbnail(2771734,"172948","We're watching you !","earnley4_thumb.jpg",130,109,32);thumbnails[2771773]=new thumbnail(2771773,"172948","Framed butterfly","Stratford8_thumb.jpg",130,109,32);thumbnails[2771735]=new thumbnail(2771735,"172948","Shades of grey","earnley6_thumb.jpg",130,98,32);thumbnails[2771962]=new thumbnail(2771962,"172948","Ornate butterfly","butterflyleaf1_thumb.jpg",130,138,32);thumbnails[2771721]=new thumbnail(2771721,"172948","Butterflyleaf2","butterflyleaf2_thumb.jpg",130,139,32);thumbnails[2771728]=new thumbnail(2771728,"172948","Detailed butterfly","earnley1_thumb.jpg",130,122,32);thumbnails[2771736]=new thumbnail(2771736,"172948","Orange wonder","earnley7_thumb.jpg",130,96,32);thumbnails[2771956]=new thumbnail(2771956,"172948","Large yellow and white","yellowwhite_thumb.jpg",130,111,32);thumbnails[2771722]=new thumbnail(2771722,"172948","Butterfly pair","butterflypair_thumb.jpg",130,88,32);thumbnails[2761551]=new thumbnail(2761551,"172949","Cheetah","cheetahWHF3_thumb.jpg",130,103,32);thumbnails[2766034]=new thumbnail(2766034,"172949","Leopard profile","Leopard profile_thumb.jpg",130,135,32);thumbnails[2766035]=new thumbnail(2766035,"172949","Lion's eye","LionWHF9_thumb.jpg",130,112,32);thumbnails[2771953]=new thumbnail(2771953,"172949","WHF Tiger","WHFtiger_thumb.jpg",130,87,32);thumbnails[2771762]=new thumbnail(2771762,"172949","Lion 11","LionWHF11_thumb.jpg",130,99,32);thumbnails[2771779]=new thumbnail(2771779,"172949","Tiger 2","TigerWHF2_thumb.jpg",130,137,32);thumbnails[2771955]=new thumbnail(2771955,"172949","Yah boo !","Yahboo_thumb.jpg",130,157,32);thumbnails[2771755]=new thumbnail(2771755,"172949","Amur Leopard","Leopard - thirds_thumb.jpg",130,181,32);thumbnails[2771883]=new thumbnail(2771883,"172949","Lion eyes","WHFlioneyes_thumb.jpg",130,67,32);thumbnails[2771777]=new thumbnail(2771777,"173643","Thistle","thistle_thumb.jpg",130,121,32);thumbnails[2913243]=new thumbnail(2913243,"173643","Green and blue","Green and blue_thumb.jpg",130,86,32);thumbnails[2771978]=new thumbnail(2771978,"173643","Flower 3","flower31_thumb.jpg",130,96,32);thumbnails[2771778]=new thumbnail(2771778,"173643","Through a glass darkly","throughglassdarkly_thumb.jpg",130,103,32);thumbnails[2771882]=new thumbnail(2771882,"173643","Water drop","waterdrop_thumb.jpg",130,125,32);thumbnails[2771770]=new thumbnail(2771770,"173643","Rose 6","Rose6_thumb.jpg",130,160,32);thumbnails[2771766]=new thumbnail(2771766,"173643","Orange nude","Orangenude_thumb.jpg",130,161,32);thumbnails[2771771]=new thumbnail(2771771,"173643","Metallic rose","Rosea_thumb.jpg",130,122,32);thumbnails[2771964]=new thumbnail(2771964,"173643","Tranquility","tranquility_thumb.jpg",130,103,32);thumbnails[2771746]=new thumbnail(2771746,"173643","Forks 2","forks2_thumb.jpg",130,93,32);thumbnails[2771739]=new thumbnail(2771739,"173646","Flower 9","earnley9a_thumb.jpg",130,121,32);thumbnails[2771760]=new thumbnail(2771760,"173646","Lily 7","Lily7_thumb.jpg",130,123,32);thumbnails[2771740]=new thumbnail(2771740,"173646","Flower 9b","earnley9b_thumb.jpg",130,97,32);thumbnails[2771761]=new thumbnail(2771761,"173646","Lily 8","Lily8_thumb.jpg",130,141,32);thumbnails[2771741]=new thumbnail(2771741,"173646","Flower 2","flower2_thumb.jpg",130,115,32);thumbnails[2771757]=new thumbnail(2771757,"173646","Lily","Lily_thumb.jpg",130,111,32);thumbnails[2771769]=new thumbnail(2771769,"173646","Rose 1","Rose1_thumb.jpg",130,122,32);thumbnails[2771758]=new thumbnail(2771758,"173646","Lily 2","Lily1_thumb.jpg",130,118,32);thumbnails[2771775]=new thumbnail(2771775,"173646","Texas poppy","texaspoppy_thumb.jpg",130,101,32);thumbnails[2771743]=new thumbnail(2771743,"173646","Flower 5","flower5_thumb.jpg",130,128,32);thumbnails[2771759]=new thumbnail(2771759,"173646","Lily 6","Lily6_thumb.jpg",130,89,32);thumbnails[2771776]=new thumbnail(2771776,"173646","Texas rose","texasrose_thumb.jpg",130,121,32);thumbnails[2771744]=new thumbnail(2771744,"173646","Flower 7","flower7_thumb.jpg",130,125,32);thumbnails[2771745]=new thumbnail(2771745,"173646","Flower 8","flower8_thumb.jpg",130,124,32);thumbnails[2771747]=new thumbnail(2771747,"173646","Iris 6","iris6_thumb.jpg",130,114,32);thumbnails[2766030]=new thumbnail(2766030,"173644","Parakeet","earnley9_thumb.jpg",130,136,32);thumbnails[2771752]=new thumbnail(2771752,"173644","Deer in shade","Knowle2_thumb.jpg",130,78,32);thumbnails[2771753]=new thumbnail(2771753,"173644","Deer silhouette","Knowle3_thumb.jpg",130,108,32);thumbnails[2771881]=new thumbnail(2771881,"173644","Wakehurstbee","Wakehurstbee_thumb.jpg",130,124,32);thumbnails[2771737]=new thumbnail(2771737,"173644","Parakeet 2","earnley8_thumb.jpg",130,78,32);thumbnails[2771748]=new thumbnail(2771748,"173644","Deer 1","Knowle1_thumb.jpg",130,166,32);thumbnails[2766037]=new thumbnail(2766037,"173233","Rodeo Queen","RodeoQueen_thumb.jpg",130,126,32);thumbnails[3952101]=new thumbnail(3952101,"173233","Family Portrait","SQ2_2050912_thumb.jpg",130,94,32);thumbnails[3955839]=new thumbnail(3955839,"173233","","Butcher_3_thumb.jpg",130,97,32);thumbnails[4004412]=new thumbnail(4004412,"173233","","Jade_portrait_BW_thumb.jpg",130,154,32);thumbnails[4004418]=new thumbnail(4004418,"173233","","IJS_3485A_thumb.jpg",130,138,32);thumbnails[2771763]=new thumbnail(2771763,"173233","Market 2","Market2_thumb.jpg",130,94,32);thumbnails[3955840]=new thumbnail(3955840,"173233","","FishChipVan_thumb.jpg",130,86,32);thumbnails[2771764]=new thumbnail(2771764,"173233","Market 3","Market3_thumb.jpg",130,100,32);thumbnails[3955841]=new thumbnail(3955841,"173233","","Shoubridge-Phil_thumb.jpg",130,86,32);thumbnails[3955842]=new thumbnail(3955842,"173233","","Whiteheads-twoshot_thumb.jpg",130,98,32);thumbnails[2761554]=new thumbnail(2761554,"173234","Bull rider","bullrider_thumb.jpg",130,133,32);thumbnails[2766024]=new thumbnail(2766024,"173234","Autumn forest","autumnforest1_thumb.jpg",130,93,32);thumbnails[2766036]=new thumbnail(2766036,"173234","Rodeo rider","Rodeorider_thumb.jpg",130,111,32);thumbnails[2771768]=new thumbnail(2771768,"173234","River run","Riverrun_thumb.jpg",130,86,32);thumbnails[2771774]=new thumbnail(2771774,"173234","Sunset","Sunset_thumb.jpg",130,94,32);thumbnails[2771765]=new thumbnail(2771765,"173234","Morning mist 2","Morningmist 2_thumb.jpg",130,92,32);thumbnails[2771963]=new thumbnail(2771963,"173234","London Eye","LondonEye2_thumb.jpg",130,131,32);thumbnails[3920784]=new thumbnail(3920784,"237918","Signing the Register","IJS_3238_thumb.jpg",130,89,32);thumbnails[3920863]=new thumbnail(3920863,"237918","Very much in love","IJS_3250_thumb.jpg",130,89,32);thumbnails[3920923]=new thumbnail(3920923,"237918","If you could stand there...","IJS_3328_thumb.jpg",130,90,32);thumbnails[3920864]=new thumbnail(3920864,"237918","My new husband","IJS_3254_thumb.jpg",130,180,32);thumbnails[3920924]=new thumbnail(3920924,"237918","The happy couple","IJS_3358_thumb.jpg",130,140,32);thumbnails[3920865]=new thumbnail(3920865,"237918","...and the sun shone.","IJS_3255_thumb.jpg",130,95,32);thumbnails[3920925]=new thumbnail(3920925,"237918","Love and laughter","IJS_3363_thumb.jpg",130,115,32);thumbnails[3920785]=new thumbnail(3920785,"237918","The ring","IJS_3385_thumb.jpg",130,86,32);thumbnails[3920866]=new thumbnail(3920866,"237918","Bridesmaid","IJS_3336_thumb.jpg",130,142,32);thumbnails[3920926]=new thumbnail(3920926,"237918","A poignant moment","IJS_3387_thumb.jpg",130,98,32);thumbnails[3920786]=new thumbnail(3920786,"237918","Bride and father","IJS_3390_thumb.jpg",130,88,32);thumbnails[3920787]=new thumbnail(3920787,"237918","Cutting the cake","IJS_3408_thumb.jpg",130,91,32);thumbnails[3920867]=new thumbnail(3920867,"237918","Supporting my new wife","IJS_3373_thumb.jpg",130,86,32);var galleries=new Object();galleries[173645]=new gallery(173645,"2771961,2771954,2771780,2771754,2766032","Architecture","gallery",[2766032,2771954,2771961,2771754,2771780]);galleries[172948]=new gallery(172948,"2771962,2771956,2771773,2771772,2771767,2771736,2771735,2771734,2771728,2771726","Butterflies","gallery",[2761495,2771725,2771767,2771772,2771720,2771726,2771734,2771773,2771735,2771962,2771721,2771728,2771736,2771956,2771722]);galleries[172949]=new gallery(172949,"2771955,2771953,2771883,2771779,2771762,2771755,2766035,2766034,2761551","Big Cats","gallery",[2761551,2766034,2766035,2771953,2771762,2771779,2771955,2771755,2771883]);galleries[173643]=new gallery(173643,"2913243,2771978,2771964,2771882,2771778,2771777,2771771,2771770,2771766,2771746","Fine art","gallery",[2771777,2913243,2771978,2771778,2771882,2771770,2771766,2771771,2771964,2771746]);galleries[173646]=new gallery(173646,"2771776,2771775,2771769,2771761,2771760,2771759,2771758,2771757,2771747,2771745","Flowers","gallery",[2771739,2771760,2771740,2771761,2771741,2771757,2771769,2771758,2771775,2771743,2771759,2771776,2771744,2771745,2771747]);galleries[173644]=new gallery(173644,"2771881,2771753,2771752,2771748,2771737,2766030","Nature","gallery",[2766030,2771752,2771753,2771881,2771737,2771748]);galleries[173233]=new gallery(173233,"3952101","People","gallery",[2766037,3952101,3955839,4004412,4004418,2771763,3955840,2771764,3955841,3955842]);galleries[173234]=new gallery(173234,"2771963,2771774,2771768,2771765,2766036,2766024,2761554","Travel","gallery",[2761554,2766024,2766036,2771768,2771774,2771765,2771963]);galleries[237918]=new gallery(237918,"3920787,3920786,3920785,3920784","Weddings","gallery",[3920784,3920863,3920923,3920864,3920924,3920865,3920925,3920785,3920866,3920926,3920786,3920787,3920867]);var imageSets=new Object();imageSets[1]="2771881";imageSets[2]="3952101,3920787,3920786,3920785,3920784";imageSets[3]="4004418,4004412,3955842,3955841,3955840,3955839,3952101,3920926,3920925,3920924,3920923,3920867,3920866,3920865,3920864,3920863,3920787,3920786,3920785,3920784,2913243,2771978,2771964,2771963,2771962,2771961,2771956,2771955,2771954,2771953,2771883,2771882,2771881,2771780,2771779,2771778,2771777,2771776,2771775,2771774,2771773,2771772,2771771,2771770,2771769,2771768,2771767,2771766,2771765,2771764";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/IanScotland/images";break}switch(a){case 1:b="http://www1.clikpic.com/IanScotland/images";break}switch(a){case 2:b="http://admin.clikpic.com/IanScotland/images";break}switch(a){case 24:b="http://tpc15/clikpic/IanScotland/images";break}switch(a){case 4:b="http://www.clikchurch.com/IanScotland/images";break}switch(a){case 5:b="http://www2.clikpic.com/IanScotland/images";break}switch(a){case 22:b="http://tpc5/clikpic/IanScotland/images";break}switch(a){case 23:b="http://tpc10/clikpic/IanScotland/images";break}switch(a){case 25:b="http://tpc16/clikpic/IanScotland/images";break}switch(a){case 15:b="http://www3.clikpic.com/IanScotland/images";break}switch(a){case 18:b="http://www4.clikpic.com/IanScotland/images";break}switch(a){case 19:b="http://www5.clikpic.com/IanScotland/images";break}switch(a){case 31:b="http://www7.clikpic.com/IanScotland/images";break}switch(a){case 32:b="http://admin2.clikpic.com/IanScotland/images";break}switch(a){case 33:b="http://www8.clikpic.com/IanScotland/images";break}switch(a){case 34:b="http://www9.clikpic.com/IanScotland/images";break}switch(a){case 35:b="http://admin3.clikpic.com/IanScotland/images";break}switch(a){case 37:b="http://admin4.clikpic.com/IanScotland/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="Ian Scotland LRPS: "+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://checkout.google.com/api/checkout/v2/checkoutForm/Merchant/training.man@virgin.net" 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="item_name_1" value="'+e+'">';b=b+'<input type="hidden" name="item_description_1" value="'+ref+'">';b=b+'<input type="hidden" name="item_quantity_1" value="1">';b=b+'<input type="hidden" name="item_price_1" value="'+d+'">';b=b+'<input type="hidden" name="item_currency_1" value="GBP">';b=b+'<input type="Image" src="https://checkout.google.com/buttons/checkout.gif?merchant_id=training.man@virgin.net&w=160&h=43&style=trans&variant=text&loc=en_GB" onclick="this.submit" style="margin-left:-6px;">';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 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+'")'})}}};