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[5854282]=new thumbnail(5854282,"45266","HOE MILL BARGE","CanalBoats_thumb.jpg",130,85,1);thumbnails[5679505]=new thumbnail(5679505,"45266","ROCKS AND CLOUDS","RocksAndSky_thumb.jpg",130,82,1);thumbnails[5928537]=new thumbnail(5928537,"45266","INGATESTONE HALL","IngatestoneHall2_thumb.jpg",130,87,1);thumbnails[6489825]=new thumbnail(6489825,"45266","THE CROWSTONE","TheCrowstone_thumb.jpg",130,85,1);thumbnails[5126652]=new thumbnail(5126652,"45266","FOREST TREES","ThreeTrees1_thumb.jpg",130,87,1);thumbnails[3049641]=new thumbnail(3049641,"45266","PUDDLES AT LOW TIDE","puddlesatlowtideWEB1_thumb.jpg",130,91,1);thumbnails[5548141]=new thumbnail(5548141,"45266","CLOUDS AND HAY BALES","CloudsAndHayBales_thumb.jpg",130,87,1);thumbnails[3676371]=new thumbnail(3676371,"45266","WARM LIGHT SPLENDOUR","warmlightsplendour2web1_thumb.jpg",130,97,1);thumbnails[3049772]=new thumbnail(3049772,"45266","GATHERING STORM","gatheringstormWEB1_thumb.jpg",130,98,1);thumbnails[5548144]=new thumbnail(5548144,"45266","THE CHURCH OF ST ANDREW","GreensteadChurch_thumb.jpg",130,87,1);thumbnails[1694120]=new thumbnail(1694120,"45266","SUMMER EVENING AT AYTHORPE RODING","summereveningatayphorperodingD_1_thumb.jpg",130,87,1);thumbnails[3636944]=new thumbnail(3636944,"45266","PAPERMILL LOCK","PapermillLockweb_thumb.jpg",130,87,1);thumbnails[5250518]=new thumbnail(5250518,"45266","BLUSTERY DAY","BlusteryDay_thumb.jpg",130,86,1);thumbnails[3073817]=new thumbnail(3073817,"45266","RAINBOW OVER HADLEIGH CASTLE","rainbowoverhadleighcastleWEB_thumb.jpg",130,87,1);thumbnails[5275797]=new thumbnail(5275797,"45266","WINTER WINDMILL","WinterWindmill1_thumb.jpg",130,87,1);thumbnails[3636937]=new thumbnail(3636937,"45266","AUTUMN LEAVES","AutumLeavesweb_thumb.jpg",130,81,1);thumbnails[5460580]=new thumbnail(5460580,"45266","HIGH AND DRY","HighAndDry_thumb.jpg",130,87,1);thumbnails[3090883]=new thumbnail(3090883,"45266","EVENING SKY AND WOODEN JETTY","EveningskyWoodenjettyWEB_thumb.jpg",130,95,1);thumbnails[5480507]=new thumbnail(5480507,"45266","BLUE BOAT","TideOut_thumb.jpg",130,88,1);thumbnails[5480540]=new thumbnail(5480540,"45266","LOOKING BACK","LookingBack_thumb.jpg",130,89,1);thumbnails[3039381]=new thumbnail(3039381,"45266","SUNRISE AT STEEPLE","SteeplehutWEB2_thumb.jpg",130,87,1);thumbnails[3073862]=new thumbnail(3073862,"45266","DARKENING SKIES","darkeningskiesWEB1_thumb.jpg",130,88,1);thumbnails[3206953]=new thumbnail(3206953,"45266","FIRST LIGHT AT STEEPLE","SteepleSunriseWEB1_thumb.jpg",130,83,1);thumbnails[3656807]=new thumbnail(3656807,"45266","A NEW DAY","MaldonTownweb1_thumb.jpg",130,83,1);thumbnails[6543958]=new thumbnail(6543958,"45266","","Chalkwell_thumb.jpg",130,84,1);thumbnails[2792961]=new thumbnail(2792961,"45266","NORSEY WOOD","NorseyWood17thWeb1_thumb.jpg",130,87,1);thumbnails[1694088]=new thumbnail(1694088,"45266","SUNRISE AND PIER","sunriseandpierD_thumb.jpg",130,87,1);thumbnails[1694085]=new thumbnail(1694085,"45266","RESTING BOATS AT LEIGH","restingboatsatleighD_thumb.jpg",130,97,1);thumbnails[4329748]=new thumbnail(4329748,"45266","MORNING COLOUR","MorningColourWEB_thumb.jpg",130,85,1);thumbnails[5548143]=new thumbnail(5548143,"45266","RIDERS ON THE BEACH","RidersOnTheBeach_FA17156D-1EC9-D45B-1C33C7740F5A9989_thumb.jpg",130,82,1);thumbnails[4584759]=new thumbnail(4584759,"45266","RISING SUN","RettendenWEB_thumb.jpg",130,85,1);thumbnails[5480713]=new thumbnail(5480713,"45266","SNOWFALL","Snowfall_thumb.jpg",130,85,1);thumbnails[5034598]=new thumbnail(5034598,"45266","THE PIER","SouthendPier_thumb.jpg",130,87,1);thumbnails[4103747]=new thumbnail(4103747,"45266","TOLLESBURY MOORINGS","TollesburyMarina4web_thumb.jpg",130,87,1);thumbnails[4184728]=new thumbnail(4184728,"45266","TOLLESBURY WATERS","TollesburyMarina1web_thumb.jpg",130,87,1);thumbnails[2859036]=new thumbnail(2859036,"45266","LOUGHTON BROOK","TheBrookWeb1_thumb.jpg",129,78,1);thumbnails[3663561]=new thumbnail(3663561,"45266","STATUE OF BRYTHNOTH","StatueOfBrythnothweb_thumb.jpg",130,84,1);thumbnails[3829938]=new thumbnail(3829938,"45266","CONNAUGHT WATER","ConnaghtWaterSunriseWEB_thumb.jpg",130,87,1);thumbnails[3877020]=new thumbnail(3877020,"45266","AFTER THE RAIN","ThaxtedWindmillWEB1_thumb.jpg",130,86,1);thumbnails[1694092]=new thumbnail(1694092,"45266","SUN RAYS","sunraysD_thumb.jpg",98,130,1);thumbnails[6051559]=new thumbnail(6051559,"45266","CANEWDON","Canewdon_thumb.jpg",87,130,1);thumbnails[1694139]=new thumbnail(1694139,"45266","THE JETTY","thejettyD_thumb.jpg",97,130,1);thumbnails[6415414]=new thumbnail(6415414,"45266","MORNING OUTLOOK","Outlook3_thumb.jpg",87,130,1);thumbnails[1694141]=new thumbnail(1694141,"45266","WHITE SAILS","whitesailsD1_thumb.jpg",89,130,1);thumbnails[2025027]=new thumbnail(2025027,"45266","THE OLD MILL","_MG_5125Battlesbridgemill1_thumb.jpg",92,130,1);thumbnails[3508207]=new thumbnail(3508207,"45266","GREENSTEAD CHURCH","GreensteadChurchWEB_thumb.jpg",88,130,1);thumbnails[4750553]=new thumbnail(4750553,"45266","WILD FLOWERS AT HYDE HALL","WildFlowersweb_thumb.jpg",90,130,1);thumbnails[4865482]=new thumbnail(4865482,"45266","SHOEBURY SHORELINE","ShoeburyPortraitweb1_thumb.jpg",86,130,1);thumbnails[5357910]=new thumbnail(5357910,"45266","TREE FEET","TreeFeet_thumb.jpg",91,130,1);thumbnails[6484871]=new thumbnail(6484871,"45266","ROCKY OUTLOOK","RockyOutlook_479060F1-24E8-5EC4-4F50A2A543E500DD_thumb.jpg",87,130,1);thumbnails[6533339]=new thumbnail(6533339,"45586","THE OLD BOATHOUSE","pro1_thumb.jpg",130,87,1);thumbnails[4955875]=new thumbnail(4955875,"45586","HAZY STEPS","HazySteps2_thumb.jpg",130,87,1);thumbnails[1858575]=new thumbnail(1858575,"45586","SHOEBURYNESS","shoeburystructure2_thumb.jpg",130,89,1);thumbnails[5061004]=new thumbnail(5061004,"45586","DAYBREAK","DayBreak_thumb.jpg",130,86,1);thumbnails[1708305]=new thumbnail(1708305,"45586","SOUTHWEALD","southwealdD_thumb.jpg",130,92,1);thumbnails[5780879]=new thumbnail(5780879,"45586","BEELEIGH FALLS","BeeleighFalls2_thumb.jpg",130,87,1);thumbnails[1708291]=new thumbnail(1708291,"45586","CLOUDY SKIES","cloudyskiesD_thumb.jpg",130,97,1);thumbnails[1708320]=new thumbnail(1708320,"45586","THE HUTS","thehutsD_thumb.jpg",130,89,1);thumbnails[5034807]=new thumbnail(5034807,"45586","HYLANDS HOUSE","HylandsHouse_thumb.jpg",130,82,1);thumbnails[5999790]=new thumbnail(5999790,"45586","HYLANDS PARK","HylandsPark_BA504C0E-1EC9-D45B-1C15325FAF2CA7C0_thumb.jpg",130,87,1);thumbnails[1708322]=new thumbnail(1708322,"45586","THREE BOATS","threeboatsD_thumb.jpg",130,92,1);thumbnails[1708334]=new thumbnail(1708334,"45586","HADLEIGH CASTLE","hadleighcastleD_thumb.jpg",130,85,1);thumbnails[1708336]=new thumbnail(1708336,"45586","THE HORNET","thehornetD_thumb.jpg",130,81,1);thumbnails[4073856]=new thumbnail(4073856,"45586","GENTAL WAVES","GentalWavesweb_thumb.jpg",130,98,1);thumbnails[5357834]=new thumbnail(5357834,"45586","THE WATERING HOLE","TheWateringHole_thumb.jpg",130,83,1);thumbnails[1708295]=new thumbnail(1708295,"45586","CHURCH ON THE GREEN","churchonthegreenD_thumb.jpg",130,87,1);thumbnails[3120995]=new thumbnail(3120995,"45586","TIMBER GATE","GateWEB_thumb.jpg",130,88,1);thumbnails[3352525]=new thumbnail(3352525,"45586","DAWN AT TWO TREE ISLAND","TwoTreeBoatWEB_thumb.jpg",130,86,1);thumbnails[3436143]=new thumbnail(3436143,"45586","NEGLECTED<br>\r\n<br>\r\n","WreckTwoTreeIslandweb2_thumb.jpg",130,87,1);thumbnails[3508190]=new thumbnail(3508190,"45586","THE BRIDGE","AbridgeWEB_thumb.jpg",130,87,1);thumbnails[4340348]=new thumbnail(4340348,"45586","SUMMER DAYS","SUMMERDAYSweb2_thumb.jpg",130,82,1);thumbnails[4688203]=new thumbnail(4688203,"45586","NOUNSLEY ","Nounsleyweb_thumb.jpg",130,91,1);thumbnails[5195345]=new thumbnail(5195345,"45586","LITTLE DINGY","MaldonDingy_thumb.jpg",130,85,1);thumbnails[3176592]=new thumbnail(3176592,"45586","WHEATFIELD AT AYTHORPE RODING","WheatfieldAlyphorpeRodingWEB_thumb.jpg",87,130,1);thumbnails[2572397]=new thumbnail(2572397,"45586","EARLY WATERS","EARLYWATERS_thumb.jpg",93,130,1);thumbnails[3172987]=new thumbnail(3172987,"45586","SEAGULL AND JETTY","JettyandSeagullWEB1_thumb.jpg",95,130,1);thumbnails[1708366]=new thumbnail(1708366,"45586","ULTING CHURCH","ultingchurch_thumb.jpg",85,130,1);thumbnails[4750637]=new thumbnail(4750637,"45586","HAY BALE","BaleOfHayWEB1_thumb.jpg",87,130,1);var galleries=new Object();galleries[45266]=new gallery(45266,"6543958,6489825,6484871,6415414,6051559,5928537,5854282,5679505,5548144,5548143","essex in colour","gallery",[5854282,5679505,5928537,6489825,5126652,3049641,5548141,3676371,3049772,5548144,1694120,3636944,5250518,3073817,5275797,3636937,5460580,3090883,5480507,5480540,3039381,3073862,3206953,3656807,6543958,2792961,1694088,1694085,4329748,5548143,4584759,5480713,5034598,4103747,4184728,2859036,3663561,3829938,3877020,1694092,6051559,1694139,6415414,1694141,2025027,3508207,4750553,4865482,5357910,6484871]);galleries[45586]=new gallery(45586,"6533339,5999790,5780879,5357834,5195345,5061004,5034807,4955875,4750637,4688203","essex monochrome","gallery",[6533339,4955875,1858575,5061004,1708305,5780879,1708291,1708320,5034807,5999790,1708322,1708334,1708336,4073856,5357834,1708295,3120995,3352525,3436143,3508190,4340348,4688203,5195345,3176592,2572397,3172987,1708366,4750637]);var imageSets=new Object();imageSets[1]="6543958,6533339,6489825,6484871,6415414,6051559,5999790,5928537,5854282,5780879,5679505,5548144,5548143,5548141,5480713,5480540,5480507,5460580,5357910,5357834,5275797,5250518,5195345,5126652,5061004,5034807,5034598,4955875,4865482,4750637,4750553,4688203,4584759,4340348,4329748,4184728,4103747,4073856,3877020,3829938,3676371,3663561,3656807,3636944,3636937,3508207,3508190,3436143,3352525,3206953";imageSets[3]="6543958,6533339,6489825,6484871,6415414,6051559,5999790,5928537,5854282,5780879,5679505,5548144,5548143,5548141,5480713,5480540,5480507,5460580,5357910,5357834,5275797,5250518,5195345,5126652,5061004,5034807,5034598,4955875,4865482,4750637,4750553,4688203,4584759,4340348,4329748,4184728,4103747,4073856,3877020,3829938,3676371,3663561,3656807,3636944,3636937,3508207,3508190,3436143,3352525,3206953";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/ianlipscomb/images";break}switch(a){case 1:b="http://www1.clikpic.com/ianlipscomb/images";break}switch(a){case 2:b="http://admin.clikpic.com/ianlipscomb/images";break}switch(a){case 24:b="http://tpc15/clikpic/ianlipscomb/images";break}switch(a){case 4:b="http://www.clikchurch.com/ianlipscomb/images";break}switch(a){case 5:b="http://www2.clikpic.com/ianlipscomb/images";break}switch(a){case 22:b="http://tpc5/clikpic/ianlipscomb/images";break}switch(a){case 23:b="http://tpc10/clikpic/ianlipscomb/images";break}switch(a){case 25:b="http://tpc16/clikpic/ianlipscomb/images";break}switch(a){case 15:b="http://www3.clikpic.com/ianlipscomb/images";break}switch(a){case 18:b="http://www4.clikpic.com/ianlipscomb/images";break}switch(a){case 19:b="http://www5.clikpic.com/ianlipscomb/images";break}switch(a){case 31:b="http://www7.clikpic.com/ianlipscomb/images";break}switch(a){case 32:b="http://admin2.clikpic.com/ianlipscomb/images";break}switch(a){case 33:b="http://www8.clikpic.com/ianlipscomb/images";break}switch(a){case 34:b="http://www9.clikpic.com/ianlipscomb/images";break}switch(a){case 35:b="http://admin3.clikpic.com/ianlipscomb/images";break}switch(a){case 37:b="http://admin4.clikpic.com/ianlipscomb/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="P H O T O E S S E X: "+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="IANLIPSCOMB">';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+'")'})}}};