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[4937282]=new thumbnail(4937282,"280949","","DSC_00441_thumb.jpg",130,86,15);thumbnails[4937283]=new thumbnail(4937283,"280949","","DSC_0050_1_thumb.jpg",130,86,15);thumbnails[4937284]=new thumbnail(4937284,"280949","","DSC_0075_thumb.jpg",130,110,15);thumbnails[4937285]=new thumbnail(4937285,"280949","","DSC_0055_thumb.jpg",130,195,15);thumbnails[5159102]=new thumbnail(5159102,"291497","","DPborder03_thumb.jpg",130,87,15);thumbnails[5384320]=new thumbnail(5384320,"227858","","DSC_0072_thumb.jpg",130,86,15);thumbnails[5384461]=new thumbnail(5384461,"","","DSC_0651_thumb.jpg",130,86,15);thumbnails[5384484]=new thumbnail(5384484,"227858","","DSC_0582_thumb.jpg",130,196,15);thumbnails[5384717]=new thumbnail(5384717,"227858","","DSC_0005_thumb.jpg",130,195,15);thumbnails[5384722]=new thumbnail(5384722,"227858","","DSC_0018_thumb.jpg",130,195,15);thumbnails[5384727]=new thumbnail(5384727,"227858","","DSC_0019_thumb.jpg",130,86,15);thumbnails[5384731]=new thumbnail(5384731,"227858","","DSC_0025_thumb.jpg",130,86,15);thumbnails[5384737]=new thumbnail(5384737,"227858","","DSC_0029_thumb.jpg",130,86,15);thumbnails[5384739]=new thumbnail(5384739,"227858","","DSC_0034_thumb.jpg",130,86,15);thumbnails[5384742]=new thumbnail(5384742,"227858","","DSC_0035_thumb.jpg",130,86,15);thumbnails[5384747]=new thumbnail(5384747,"227858","","DSC_0046_thumb.jpg",130,195,15);thumbnails[5384751]=new thumbnail(5384751,"227858","","DSC_0048_thumb.jpg",130,195,15);thumbnails[5384754]=new thumbnail(5384754,"227858","","DSC_0051_thumb.jpg",130,195,15);thumbnails[5384761]=new thumbnail(5384761,"227858","","DSC_0054_thumb.jpg",130,95,15);thumbnails[5384782]=new thumbnail(5384782,"227858","","DSC_0058_thumb.jpg",130,177,15);thumbnails[5384787]=new thumbnail(5384787,"227858","","DSC_0061_thumb.jpg",130,189,15);thumbnails[5384791]=new thumbnail(5384791,"227858","","DSC_0065_thumb.jpg",130,86,15);thumbnails[5384794]=new thumbnail(5384794,"227858","","DSC_0068_thumb.jpg",130,86,15);thumbnails[5384797]=new thumbnail(5384797,"227858","","DSC_00721_thumb.jpg",130,86,15);thumbnails[5384804]=new thumbnail(5384804,"227858","","DSC_0074_thumb.jpg",130,195,15);thumbnails[5384808]=new thumbnail(5384808,"227858","","DSC_0075_4242D39E-1D09-001F-9984D1F4E368892A_thumb.jpg",130,86,15);thumbnails[5384812]=new thumbnail(5384812,"227858","","DSC_0080_copy_thumb.jpg",130,195,15);thumbnails[5384815]=new thumbnail(5384815,"227858","","DSC_0085_thumb.jpg",130,195,15);thumbnails[5384838]=new thumbnail(5384838,"227858","","DSC_0086_thumb.jpg",130,86,15);thumbnails[5384867]=new thumbnail(5384867,"227858","","DSC_00891_thumb.jpg",130,86,15);thumbnails[5384870]=new thumbnail(5384870,"227858","","DSC_0089_thumb.jpg",130,195,15);thumbnails[5384877]=new thumbnail(5384877,"227858","","DSC_0091_2_thumb.jpg",130,85,15);thumbnails[5384878]=new thumbnail(5384878,"227858","","DSC_0091_thumb.jpg",130,195,15);thumbnails[5384883]=new thumbnail(5384883,"227858","","DSC_0095_thumb.jpg",130,184,15);thumbnails[5384886]=new thumbnail(5384886,"227858","","DSC_0097_thumb.jpg",130,86,15);thumbnails[5384897]=new thumbnail(5384897,"227858","","DSC_0101_thumb.jpg",130,195,15);thumbnails[5384905]=new thumbnail(5384905,"227858","","DSC_0107_thumb.jpg",130,195,15);thumbnails[5384908]=new thumbnail(5384908,"227858","","DSC_0134_thumb.jpg",130,86,15);thumbnails[5384911]=new thumbnail(5384911,"227858","","DSC_0135_thumb.jpg",130,167,15);thumbnails[5385142]=new thumbnail(5385142,"227858","","DSC_0140_thumb.jpg",130,195,15);thumbnails[5385143]=new thumbnail(5385143,"227858","","DSC_0151_thumb.jpg",130,86,15);thumbnails[5385146]=new thumbnail(5385146,"227858","","DSC_0163_thumb.jpg",130,132,15);thumbnails[5385148]=new thumbnail(5385148,"227858","","DSC_0170_thumb.jpg",130,195,15);thumbnails[5385149]=new thumbnail(5385149,"227858","","DSC_0180_thumb.jpg",130,195,15);thumbnails[5385150]=new thumbnail(5385150,"227858","","DSC_0185_thumb.jpg",130,86,15);thumbnails[5385153]=new thumbnail(5385153,"227858","","DSC_0539_thumb.jpg",130,86,15);thumbnails[5385156]=new thumbnail(5385156,"227858","","DSC_0541_thumb.jpg",130,86,15);thumbnails[5385158]=new thumbnail(5385158,"227858","","DSC_0556_thumb.jpg",130,196,15);thumbnails[5385160]=new thumbnail(5385160,"227858","","DSC_0574_thumb.jpg",130,196,15);thumbnails[5385162]=new thumbnail(5385162,"227858","","DSC_01051_thumb.jpg",130,86,15);thumbnails[5385192]=new thumbnail(5385192,"227858","","edit2_thumb.jpg",130,195,15);thumbnails[5385194]=new thumbnail(5385194,"227858","","edit3_thumb.jpg",130,86,15);thumbnails[5395102]=new thumbnail(5395102,"227858","","DSC_0038_thumb.jpg",130,195,15);thumbnails[5395104]=new thumbnail(5395104,"227858","","DSC_0042_thumb.jpg",130,195,15);thumbnails[5395107]=new thumbnail(5395107,"227858","","DSC_0046_4D549495-1D09-001F-990A69E13A0F3951_thumb.jpg",130,195,15);thumbnails[5395110]=new thumbnail(5395110,"227858","","DSC_0047_thumb.jpg",130,93,15);thumbnails[5395111]=new thumbnail(5395111,"227858","","DSC_0052_thumb.jpg",130,86,15);thumbnails[5395114]=new thumbnail(5395114,"227858","","DSC_0091_4D559C22-1D09-001F-9955095DF46C8E32_thumb.jpg",130,86,15);thumbnails[5395115]=new thumbnail(5395115,"227858","","DSC_0095_4D55F156-1D09-001F-99EDE88AD3DEBA5C_thumb.jpg",130,86,15);thumbnails[5395116]=new thumbnail(5395116,"227858","","DSC_0122_thumb.jpg",130,86,15);thumbnails[5395118]=new thumbnail(5395118,"227858","","DSC_0125_thumb.jpg",130,86,15);thumbnails[5395120]=new thumbnail(5395120,"227858","","DSC_0142_thumb.jpg",130,124,15);thumbnails[5395121]=new thumbnail(5395121,"227858","","DSC_0153_thumb.jpg",130,86,15);thumbnails[5395144]=new thumbnail(5395144,"227848","","1_2_thumb.jpg",130,195,15);thumbnails[5395145]=new thumbnail(5395145,"227848","","2_2_thumb.jpg",130,195,15);thumbnails[5395146]=new thumbnail(5395146,"227848","","3_2_thumb.jpg",130,195,15);thumbnails[5395633]=new thumbnail(5395633,"232057","","DSC_0048_4DB4E88E-1D09-001F-99733A6DB0CE969A_thumb.jpg",130,195,15);thumbnails[5395794]=new thumbnail(5395794,"232057","","DSC_0010_thumb.jpg",130,86,15);thumbnails[5395814]=new thumbnail(5395814,"232057","","DSC_0013_copy_thumb.jpg",130,86,15);thumbnails[5395829]=new thumbnail(5395829,"232057","","DSC_0046_4DBDF600-1D09-001F-990CEBE9D32E1303_thumb.jpg",130,195,15);thumbnails[5395831]=new thumbnail(5395831,"232057","","DSC_0050_thumb.jpg",130,195,15);thumbnails[5395833]=new thumbnail(5395833,"232057","","DSC_0054_4DBEB623-1D09-001F-9931E8E051C734C0_thumb.jpg",130,86,15);thumbnails[5395835]=new thumbnail(5395835,"232057","","DSC_0056_thumb.jpg",130,195,15);thumbnails[5395838]=new thumbnail(5395838,"232057","","DSC_0065_4DBFEE55-1D09-001F-998F5450A3E2F833_thumb.jpg",130,195,15);thumbnails[5395840]=new thumbnail(5395840,"232057","","DSC_0067_thumb.jpg",130,86,15);thumbnails[5395843]=new thumbnail(5395843,"232057","","DSC_0079_thumb.jpg",130,86,15);thumbnails[5395845]=new thumbnail(5395845,"232057","","DSC_0088_thumb.jpg",130,86,15);thumbnails[5395847]=new thumbnail(5395847,"232057","","DSC_0091_4DC1B5B7-1D09-001F-992FBCBB4513A979_thumb.jpg",130,86,15);thumbnails[5395849]=new thumbnail(5395849,"232057","","DSC_0093_thumb.jpg",130,86,15);thumbnails[5395852]=new thumbnail(5395852,"232057","","DSC_0105_thumb.jpg",130,86,15);thumbnails[5395882]=new thumbnail(5395882,"291497","","DSC_0400_2_thumb.jpg",130,172,15);thumbnails[5395883]=new thumbnail(5395883,"291497","","BORDER11_thumb.jpg",130,85,15);thumbnails[5396056]=new thumbnail(5396056,"304570","","BORDER36_thumb.jpg",130,184,15);thumbnails[5400379]=new thumbnail(5400379,"280949","","DSC_0093_538B298C-1D09-001F-999308337B1A5D48_thumb.jpg",130,86,15);thumbnails[5404188]=new thumbnail(5404188,"227846","","DSC_0066_thumb.jpg",130,95,15);thumbnails[5404195]=new thumbnail(5404195,"227846","","DSC_0078_thumb.jpg",130,195,15);thumbnails[5404253]=new thumbnail(5404253,"305182","","DSC_0078_copy_thumb.jpg",130,195,15);thumbnails[5404257]=new thumbnail(5404257,"305182","","DSC_0065_copy_2_thumb.jpg",130,195,15);thumbnails[5404261]=new thumbnail(5404261,"305182","","DSC_0069_copy_copy_thumb.jpg",130,195,15);thumbnails[5404269]=new thumbnail(5404269,"305182","","DSC_0044_copy_thumb.jpg",130,195,15);thumbnails[5404271]=new thumbnail(5404271,"305182","","DSC_0051_copy_thumb.jpg",130,198,15);thumbnails[5404272]=new thumbnail(5404272,"305182","","DSC_0021_copy_thumb.jpg",130,195,15);thumbnails[5404284]=new thumbnail(5404284,"305182","","DSC_0014_copy_thumb.jpg",130,195,15);thumbnails[5404324]=new thumbnail(5404324,"249577","","Finished_thumb.jpg",130,195,15);thumbnails[5404326]=new thumbnail(5404326,"249577","","DSC_0121_copy_2_thumb.jpg",130,195,15);thumbnails[5404327]=new thumbnail(5404327,"249577","","DSC_0106_thumb.jpg",130,86,15);thumbnails[5404330]=new thumbnail(5404330,"249577","","DSC_0008_thumb.jpg",130,86,15);var galleries=new Object();galleries[227845]=new gallery(227845,"","Alex","section265035",[]);galleries[227848]=new gallery(227848,"5395145","BigMan","section265035",[5395144,5395145,5395146]);galleries[232057]=new gallery(232057,"5395633","Bristol Old Train tracks.","section265035",[5395633,5395794,5395814,5395829,5395831,5395833,5395835,5395838,5395840,5395843,5395845,5395847,5395849,5395852]);galleries[227858]=new gallery(227858,"5385192,5384911,5384897,5384883,5384812,5384484","Club Shots","section265035",[5384320,5384484,5384717,5384722,5384727,5384731,5384737,5384739,5384742,5384747,5384751,5384754,5384761,5384782,5384787,5384791,5384794,5384797,5384804,5384808,5384812,5384815,5384838,5384867,5384870,5384877,5384878,5384883,5384886,5384897,5384905,5384908,5384911,5385142,5385143,5385146,5385148,5385149,5385150,5385153,5385156,5385158,5385160,5385162,5385192,5385194,5395102,5395104,5395107,5395110,5395111,5395114,5395115,5395116,5395118,5395120,5395121]);galleries[227846]=new gallery(227846,"5404195","Dan","section265035",[5404188,5404195]);galleries[291497]=new gallery(291497,"5395882","Dan's Army Pass Out","section265035",[5159102,5395882,5395883]);galleries[304570]=new gallery(304570,"5396056","Dan.","section265035",[5396056]);galleries[305182]=new gallery(305182,"5404253","Emma & Lizzy","section265035",[5404253,5404257,5404261,5404269,5404271,5404272,5404284]);galleries[291496]=new gallery(291496,"5395882","Events","section265035",[]);galleries[249577]=new gallery(249577,"5404326,5404324","Jess","section265035",[5404324,5404326,5404327,5404330]);galleries[227785]=new gallery(227785,"","Joe","section265035",[]);galleries[229326]=new gallery(229326,"","Joe..","section265035",[]);galleries[227784]=new gallery(227784,"","Keylee","section265035",[]);galleries[229325]=new gallery(229325,"","Keylee..","section265035",[]);galleries[227844]=new gallery(227844,"","Mike","section265035",[]);galleries[280949]=new gallery(280949,"4937285","Oxford","section265035",[4937282,4937283,4937284,4937285,5400379]);galleries[227843]=new gallery(227843,"5404195,5395145","Portraits..","section265035",[]);galleries[227837]=new gallery(227837,"","Still Life","section265035",[]);galleries[216706]=new gallery(216706,"5404326,5404324,5404253,5396056","Studio Shots","section265035",[]);galleries[232056]=new gallery(232056,"5395633,4937285","Urban Landscapes","section265035",[]);var imageSets=new Object();imageSets[1]="5384461";imageSets[2]="5404326,5404324,5404253,5404195,5396056,5395882,5395633,5395145,5385192,5384911,5384897,5384883,5384812,5384484,4937285";imageSets[3]="5384320";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/foxmattfox/images";break}switch(a){case 1:b="http://www1.clikpic.com/foxmattfox/images";break}switch(a){case 2:b="http://admin.clikpic.com/foxmattfox/images";break}switch(a){case 4:b="http://www.clikchurch.com/foxmattfox/images";break}switch(a){case 5:b="http://www2.clikpic.com/foxmattfox/images";break}switch(a){case 15:b="http://www3.clikpic.com/foxmattfox/images";break}switch(a){case 21:b="http://www6.clikpic.com/foxmattfox/images";break}switch(a){case 18:b="http://www4.clikpic.com/foxmattfox/images";break}switch(a){case 19:b="http://www5.clikpic.com/foxmattfox/images";break}switch(a){case 22:b="http://tpc5/clikpic/foxmattfox/images";break}switch(a){case 23:b="http://tpc10/clikpic/foxmattfox/images";break}switch(a){case 24:b="http://tpc15/clikpic/foxmattfox/images";break}switch(a){case 25:b="http://tpc16/clikpic/foxmattfox/images";break}switch(a){case 31:b="http://www7.clikpic.com/foxmattfox/images";break}switch(a){case 32:b="http://admin2.clikpic.com/foxmattfox/images";break}switch(a){case 33:b="http://www8.clikpic.com/foxmattfox/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("section265035"!=""){if(backgrounds[imageID].galleries_id!=""){html+='<a href="'+backgrounds[imageID].section_code+"_"+backgrounds[imageID].galleries_id+'.html">'}else{html+='<a href="section265035.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("section265035"!=""){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="Matt Fox 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="updateCartValue(document.forms.paymentForm,this.form.payment_options_id.options[this.form.payment_options_id.options.selectedIndex].value); if(divShowing(\'paymentConfirm\')){fadeOut(\'paymentConfirm\', 3)};">';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">';b=b+'	<input type="hidden" name="item_option" value="'+a+'">';b=b+'	<input type="hidden" name="site" value="FOXMATTFOX">';b=b+'	<input type="hidden" name="item_number" value="'+c.id+'">';b=b+'	<input type="hidden" name="quantity" value="1">';b=b+'	<input value="Add to cart" id="paymentAddButton" class="button" onmouseover="this.className=\'buttonHi\';" onmouseout="this.className=\'button\';" type="Button">';b=b+'	<input value="View cart" id="paymentViewButton" class="button" onmouseover="this.className=\'buttonHi\';" onmouseout="this.className=\'button\';" type="Button" onclick="javascript:window.location=\'cart.html\'">';b=b+"</form>";b=b+'<div class="clearing">&nbsp;</div>';b=b+'<div id="confirmContainer">';b=b+'<div id="paymentConfirm">Item added to cart</div>';b=b+"</div>";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+'")'})}}};