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[4879740]=new thumbnail(4879740,"61278","Freshly joined hands","060506-300b5793tiny_thumb.jpg",130,195,15);thumbnails[4879742]=new thumbnail(4879742,"61278","Showered in confetti","060506-300b5806tiny_thumb.jpg",130,195,15);thumbnails[4879749]=new thumbnail(4879749,"61278","The Wedding Car","060596-a15768tiny_thumb.jpg",130,195,15);thumbnails[4879751]=new thumbnail(4879751,"61278","In love.","090801-52a3778tiny_thumb.jpg",130,195,15);thumbnails[5701716]=new thumbnail(5701716,"61278","Martin and Hannah's period wedding","cvccCrop5a5756-8_thumb.jpg",130,104,15);thumbnails[4879757]=new thumbnail(4879757,"61278","The dress","090801-52a3839tiny_thumb.jpg",130,195,15);thumbnails[4879877]=new thumbnail(4879877,"61278","Speech time","060506-300a5896tiny_thumb.jpg",130,87,15);thumbnails[4879881]=new thumbnail(4879881,"61278","The little ones matter too.","090801-52a3848tiny_thumb.jpg",130,87,15);thumbnails[4879890]=new thumbnail(4879890,"61278","The kiss","a090912-4a4369tiny_thumb.jpg",130,87,15);thumbnails[4804685]=new thumbnail(4804685,"274827","Fun fun fun","b090919-52a5255tiny_thumb.jpg",130,81,15);thumbnails[4804677]=new thumbnail(4804677,"47755","Out of the pureness of white she came.","a090915-52a5029_thumb.jpg",130,173,15);thumbnails[4818866]=new thumbnail(4818866,"47755","The retro Anita Debauch ","091020-3a1225tiny_thumb.jpg",130,163,15);thumbnails[5063317]=new thumbnail(5063317,"47755","The beautiful Helen","091103-4a5241tiny_thumb.jpg",130,195,15);thumbnails[5016000]=new thumbnail(5016000,"47755","Jasmin Jade - Faux Country Music Star","090915-52a4902e_thumb.jpg",130,195,15);thumbnails[2556600]=new thumbnail(2556600,"47755","Extreme wedding","5a3385web_thumb.jpg",130,185,15);thumbnails[4819217]=new thumbnail(4819217,"47755","Naddy got married","c090525-52a0520_thumb.jpg",130,195,15);thumbnails[1889172]=new thumbnail(1889172,"47755","Dan from Ravage Raven","5a0724bWeb_thumb.jpg",130,207,15);thumbnails[635292]=new thumbnail(635292,"47755","Wanderlust the Androgynous goth","a7559Wsmall_thumb.jpg",130,195,15);thumbnails[648181]=new thumbnail(648181,"47755","Michelle","a6968MichellebwSmall_thumb.jpg",130,195,15);thumbnails[4804678]=new thumbnail(4804678,"47755","Biker Jasmin","a090915-52a4953_thumb.jpg",130,195,15);thumbnails[1889183]=new thumbnail(1889183,"47755","Ravage Raven","5a0767Web_thumb.jpg",130,125,15);thumbnails[2556587]=new thumbnail(2556587,"47755","Dead doll in a Barn","5a4895web_thumb.jpg",130,106,15);thumbnails[5016003]=new thumbnail(5016003,"47755","Teen biker eyes","a090915-52a4988_thumb.jpg",130,87,15);thumbnails[2556606]=new thumbnail(2556606,"47755","Wasted","5a3591Web_thumb.jpg",130,90,15);thumbnails[1889164]=new thumbnail(1889164,"47755","Ravage Raven","5a0705web2_thumb.jpg",130,95,15);thumbnails[648203]=new thumbnail(648203,"47755","Michelle - Albert Dock, Liverpool.","a7070Msmall_thumb.jpg",130,87,15);thumbnails[635411]=new thumbnail(635411,"47755","Helen","a8248HLsmall_thumb.jpg",130,87,15);thumbnails[635294]=new thumbnail(635294,"47755","Helen","a8197HLsmall_thumb.jpg",130,87,15);thumbnails[4966895]=new thumbnail(4966895,"94861","A real Bugatti - Tour Britannia 2009","090907-52a4392tiny_thumb.jpg",130,87,15);thumbnails[4966896]=new thumbnail(4966896,"94861","Classic Bentley driven hard - Tour Britannia 2009","090907-52a4520tiny_thumb.jpg",130,104,15);thumbnails[4966897]=new thumbnail(4966897,"94861","Ford Escort twin cam sliding - Tour Britannia 2009","090907-52a4529tiny_thumb.jpg",130,87,15);thumbnails[1356289]=new thumbnail(1356289,"94861","Trimuph TR5 on the 2007 Motul Tour Britannia at Weston Park","at0756Thumb_thumb.jpg",130,87,15);thumbnails[1356292]=new thumbnail(1356292,"94861","Bristol at Weston Park on 2007 Motul Tour Britannia","at0765BristolThumb_thumb.jpg",130,80,15);thumbnails[1356307]=new thumbnail(1356307,"94861","Fraser Nash at speed on Motul Tour Britannia 2007","at0796FNthumb_thumb.jpg",130,87,15);thumbnails[1356311]=new thumbnail(1356311,"94861","Frazer Nash at speed on Motul Tour Britannia 2007","at0795FNthumb_thumb.jpg",130,96,15);thumbnails[1355413]=new thumbnail(1355413,"94861","Tour Britannia 1","at0420TACPthumb_thumb.jpg",130,87,15);thumbnails[1355452]=new thumbnail(1355452,"94861","Tour Britannia 2007 - The Long Walk","at0492TACPthmub_thumb.jpg",130,96,15);thumbnails[1355458]=new thumbnail(1355458,"94861","Tour Britannia 2007 Jaguar XK120","at0496TACPthumb_thumb.jpg",130,84,15);thumbnails[1355465]=new thumbnail(1355465,"94861","Porsche at the start of The Long Walk in Windsor on the Tour Britannia 2007","at0536TACPthumb_thumb.jpg",130,87,15);thumbnails[353901]=new thumbnail(353901,"29024","Residential apartment geometry","s6406FlatsSmall_thumb.jpg",130,92,15);thumbnails[5063303]=new thumbnail(5063303,"29021","The beautiful village of Cheddar....","091101-4a5200art2tiny_thumb.jpg",130,195,15);thumbnails[635278]=new thumbnail(635278,"28791","Old lifeboat station","a9048LifeBoatStnSmall_thumb.jpg",130,86,15);thumbnails[635283]=new thumbnail(635283,"28791","Old pier at dusk","a9124OldPierSmall_thumb.jpg",130,87,15);thumbnails[624360]=new thumbnail(624360,"29021","Lone tree","a5744LoneTreeSmall_thumb.jpg",130,87,15);thumbnails[648284]=new thumbnail(648284,"48473","British Fire Engine","a5633FireEngineSmall_thumb.jpg",130,87,15);thumbnails[624387]=new thumbnail(624387,"29022","Three reflected boats","a4025ThreeBoatsReflectedSmall_thumb.jpg",130,87,15);thumbnails[624378]=new thumbnail(624378,"29024","Window in red","a3764BlackRedWindowSmall_thumb.jpg",130,87,15);thumbnails[421222]=new thumbnail(421222,"29022","Old jetty","a3709JettyBoat_thumb.jpg",130,87,15);thumbnails[624363]=new thumbnail(624363,"29024","Colourful homes","a3489QuaysideHomesSmall_thumb.jpg",130,87,15);thumbnails[353916]=new thumbnail(353916,"28791","Sunset at Weston super Mare","s6678SunsetWsMcropSmall_thumb.jpg",130,39,15);thumbnails[353797]=new thumbnail(353797,"29023","South Africian BMX Racer","a1476BMXracerSmall_thumb.jpg",130,87,15);thumbnails[353804]=new thumbnail(353804,"29023","South Africian BMX racer","a1254SouthAfricanSmall_thumb.jpg",130,87,15);thumbnails[349710]=new thumbnail(349710,"28791","Deck chairs on an English Seafront","a6571BeachChairsThumbnail_thumb.jpg",130,77,15);thumbnails[629951]=new thumbnail(629951,"48473","Ship hatch detail","aa3146ShipHatchSmall_thumb.jpg",130,87,15);thumbnails[353917]=new thumbnail(353917,"29024","Red and green doors","a2857DoorsSmall_thumb.jpg",130,87,15);thumbnails[353700]=new thumbnail(353700,"29020","Mosque of St Sofhia in Istanbul, Turkey.","a2472MosqueOfSofhiaSmall_thumb.jpg",130,86,15);thumbnails[353711]=new thumbnail(353711,"29020","A misty day on the Bosphorus.","a2392MistyDayOnTheBosphorusSmall_thumb.jpg",130,87,15);thumbnails[606099]=new thumbnail(606099,"28791","Steepholme behine a line of beach posts, at Weston super Mare","04-10-13WsM19beachPostsSmall_thumb.jpg",130,54,15);thumbnails[353825]=new thumbnail(353825,"29023","Paragliding in the Italian Mountains","a0278ParaglidingSmall_thumb.jpg",130,86,15);thumbnails[5063340]=new thumbnail(5063340,"29021","Storm clouds gather over Cheddar","091103-4a5192tiny_thumb.jpg",130,87,15);thumbnails[635269]=new thumbnail(635269,"29024","Old sea front apartments","a9054OldApartmentSmall_thumb.jpg",130,195,15);thumbnails[624350]=new thumbnail(624350,"29021","Rainbow","a8953RainbowSmall_thumb.jpg",130,181,15);thumbnails[624367]=new thumbnail(624367,"29022","Still waters ","a3793StillHarbourSmall_thumb.jpg",130,195,15);thumbnails[629958]=new thumbnail(629958,"29021","Old Liverpool","aa3227OldLiverpoolSmall_thumb.jpg",130,195,15);thumbnails[349679]=new thumbnail(349679,"29024","Bright Red door ","a0936RedDoor_thumb.jpg",130,195,15);thumbnails[606121]=new thumbnail(606121,"48473","Hanging Lobster pots ","a0378LobsterPotSmall_thumb.jpg",130,195,15);thumbnails[349702]=new thumbnail(349702,"29021","Gloucestershire","a0360LongBarrow_thumb.jpg",130,195,15);thumbnails[349721]=new thumbnail(349721,"29024","Riverside apartments","a13753AppartmentsSmall_thumb.jpg",130,195,15);thumbnails[353927]=new thumbnail(353927,"29024","Terraced","aP0354TerraceSmall_thumb.jpg",130,173,15);thumbnails[648250]=new thumbnail(648250,"29026","Woodland toadstool","a6844ToadstoolSmall_thumb.jpg",130,195,15);thumbnails[349715]=new thumbnail(349715,"29026","Donkey Face","a0450DonkeyFaceSmall_thumb.jpg",130,195,15);thumbnails[349726]=new thumbnail(349726,"29026","Solo Sheep","a13868CroppedSheepSmall_thumb.jpg",130,182,15);thumbnails[5016009]=new thumbnail(5016009,"29026","Effy the cat tries tree climbing","091025-d60a7816tiny_thumb.jpg",130,87,15);var galleries=new Object();galleries[61278]=new gallery(61278,"5701716,4879890,4879881,4879877,4879757,4879751,4879749,4879742,4879740","Weddings and ...","gallery",[4879740,4879742,4879749,4879751,5701716,4879757,4879877,4879881,4879890]);galleries[47755]=new gallery(47755,"5063317,5016003,5016000,4819217,4818866,4804678,4804677,2556606,2556600,2556587","Models and characters","gallery",[4804677,4818866,5063317,5016000,2556600,4819217,1889172,635292,648181,4804678,1889183,2556587,5016003,2556606,1889164,648203,635411,635294]);galleries[274827]=new gallery(274827,"4804685","MotorSport","gallery",[4804685]);galleries[94861]=new gallery(94861,"1356307","Tour Britannia","gallery",[4966895,4966896,4966897,1356289,1356292,1356307,1356311,1355413,1355452,1355458,1355465]);galleries[29024]=new gallery(29024,"349679","Architecture","gallery",[353901,624378,624363,353917,635269,349679,349721,353927]);galleries[29021]=new gallery(29021,"5063340,5063303,629958,624360,624350,349702","England","gallery",[5063303,624360,5063340,624350,629958,349702]);galleries[29022]=new gallery(29022,"624387,624367,421222","Scotland","gallery",[624387,421222,624367]);galleries[29023]=new gallery(29023,"353825,353804,353797","Sports","gallery",[353797,353804,353825]);galleries[48473]=new gallery(48473,"648284,629951,606121","Still life and detail","gallery",[648284,629951,606121]);galleries[28791]=new gallery(28791,"635283,635278,606099,353916,349710","The English Seaside","gallery",[635278,635283,353916,349710,606099]);galleries[29020]=new gallery(29020,"353711,353700","Travels","gallery",[353700,353711]);galleries[29026]=new gallery(29026,"5016009,648250,349726,349715","Nature","gallery",[648250,349715,349726,5016009]);var imageSets=new Object();imageSets[1]="5701716,5063340,5063317,5063303,5016009,5016003,5016000,4966897,4966896,4966895,4879890,4879881,4879877,4879757,4879751,4879749,4879742,4879740,4819217,4818866,4804685,4804678,4804677,2556606,2556600,2556587,1889183,1889172,1889164,1356311,1356307,1356292,1356289,1355465,1355458,1355452,1355413,648284,648250,648203,648181,635411,635294,635292,635283,635278,635269,629958,629951,624387";imageSets[2]="4804685,1356307,349679";imageSets[3]="5701716,5063340,5063317,5063303,5016009,5016003,5016000,4966897,4966896,4966895,4879890,4879881,4879877,4879757,4879751,4879749,4879742,4879740,4819217,4818866,4804685,4804678,4804677,2556606,2556600,2556587,1889183,1889172,1889164,1356311,1356307,1356292,1356289,1355465,1355458,1355452,1355413,648284,648250,648203,648181,635411,635294,635292,635283,635278,635269,629958,629951,624387";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/tacrafts/images";break}switch(a){case 1:b="http://www1.clikpic.com/tacrafts/images";break}switch(a){case 2:b="http://admin.clikpic.com/tacrafts/images";break}switch(a){case 24:b="http://tpc15/clikpic/tacrafts/images";break}switch(a){case 4:b="http://www.clikchurch.com/tacrafts/images";break}switch(a){case 5:b="http://www2.clikpic.com/tacrafts/images";break}switch(a){case 22:b="http://tpc5/clikpic/tacrafts/images";break}switch(a){case 23:b="http://tpc10/clikpic/tacrafts/images";break}switch(a){case 25:b="http://tpc16/clikpic/tacrafts/images";break}switch(a){case 15:b="http://www3.clikpic.com/tacrafts/images";break}switch(a){case 18:b="http://www4.clikpic.com/tacrafts/images";break}switch(a){case 19:b="http://www5.clikpic.com/tacrafts/images";break}switch(a){case 31:b="http://www7.clikpic.com/tacrafts/images";break}switch(a){case 32:b="http://admin2.clikpic.com/tacrafts/images";break}switch(a){case 33:b="http://www8.clikpic.com/tacrafts/images";break}switch(a){case 34:b="http://www9.clikpic.com/tacrafts/images";break}switch(a){case 35:b="http://admin3.clikpic.com/tacrafts/images";break}switch(a){case 37:b="http://admin4.clikpic.com/tacrafts/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="TA Craft 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>"}a=a+fnGetPaymentInfo(photos[b]);if(a!=""){a=a+'<div class="spacer"></div>'}return a}function fnGetPaymentInfo(c){var b="";if(c.item_price!==""){b=b+"<p>Buy now using PayPal:</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="twlarge@hotmail.com">';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="twlarge@hotmail.com">';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 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+'")'})}}};