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[4687998]=new thumbnail(4687998,"269793","","WTFC_220809_58_thumb.jpg",130,184,15);thumbnails[4688002]=new thumbnail(4688002,"269793","","WTFC_220809_76_thumb.jpg",130,87,15);thumbnails[4190131]=new thumbnail(4190131,"249124","","IMG_1019jpg_thumb.jpg",130,195,15);thumbnails[4190159]=new thumbnail(4190159,"249124","","IMG_1047jpg_thumb.jpg",130,87,15);thumbnails[4190215]=new thumbnail(4190215,"249124","","IMG_1052jpg_thumb.jpg",130,87,15);thumbnails[4190269]=new thumbnail(4190269,"249124","","IMG_1074bjpg_thumb.jpg",130,207,15);thumbnails[4190273]=new thumbnail(4190273,"249124","","IMG_1075bjpg_thumb.jpg",130,125,15);thumbnails[4190334]=new thumbnail(4190334,"249124","","IMG_1082bjpg_thumb.jpg",130,87,15);thumbnails[4190336]=new thumbnail(4190336,"249124","","IMG_1093bjpg_thumb.jpg",130,86,15);thumbnails[4190339]=new thumbnail(4190339,"249124","","IMG_1102bjpg_thumb.jpg",130,81,15);thumbnails[4050435]=new thumbnail(4050435,"243859","","IMG_0862a_thumb.jpg",130,87,15);thumbnails[4050443]=new thumbnail(4050443,"243859","","IMG_0868a_thumb.jpg",130,199,15);thumbnails[4050469]=new thumbnail(4050469,"243859","","IMG_0885a_thumb.jpg",130,195,15);thumbnails[3911127]=new thumbnail(3911127,"237518","","IMG_0767bjpg_thumb.jpg",130,84,15);thumbnails[3911341]=new thumbnail(3911341,"237518","","IMG_0770bjpg_thumb.jpg",130,106,15);thumbnails[3911360]=new thumbnail(3911360,"237518","","IMG_0795bjpg_thumb.jpg",130,92,15);thumbnails[3911366]=new thumbnail(3911366,"237518","","IMG_0819bjpg_thumb.jpg",130,90,15);thumbnails[3904435]=new thumbnail(3904435,"237144","","IMG_0622ajpg_thumb.jpg",130,87,15);thumbnails[3904404]=new thumbnail(3904404,"237174","","IMG_0202jpg_thumb.jpg",130,195,15);thumbnails[3903496]=new thumbnail(3903496,"237137","","IMG_0092bjpg_thumb.jpg",130,207,15);thumbnails[3903500]=new thumbnail(3903500,"237137","","IMG_0094bjpg_thumb.jpg",130,84,15);thumbnails[3903513]=new thumbnail(3903513,"237137","","IMG_0096jpg_thumb.jpg",130,87,15);thumbnails[3904401]=new thumbnail(3904401,"237137","","IMG_0121bjpg_thumb.jpg",130,208,15);thumbnails[3903466]=new thumbnail(3903466,"237137","","DSC00799jpg_thumb.jpg",130,98,15);thumbnails[3903349]=new thumbnail(3903349,"237137","","DSC00080bjpg_thumb.jpg",130,94,15);thumbnails[3903376]=new thumbnail(3903376,"237137","","DSC00085bjpg_thumb.jpg",130,95,15);thumbnails[3903327]=new thumbnail(3903327,"237134","","Cornwall_-_July_2007_87bjpg_thumb.jpg",130,98,15);thumbnails[3903328]=new thumbnail(3903328,"237134","","Cornwall_-_July_2007_97bjpg_thumb.jpg",130,95,15);thumbnails[3903224]=new thumbnail(3903224,"237134","","Cornwall_-_July_2007_15jpg_thumb.jpg",130,173,15);thumbnails[3904455]=new thumbnail(3904455,"237140","","Venice_Mar_07_129_1bjpg_thumb.jpg",130,98,15);thumbnails[3904463]=new thumbnail(3904463,"237140","","Venice_Mar_07_141_1jpg_thumb.jpg",130,179,15);thumbnails[4123257]=new thumbnail(4123257,"237140","","Venice_Mar_07_138jpg_thumb.jpg",130,173,15);thumbnails[3904452]=new thumbnail(3904452,"237140","","Venice_Mar_07_41bjpg_thumb.jpg",130,98,15);thumbnails[3903337]=new thumbnail(3903337,"237134","","Cornwall_July_05_67bjpg_thumb.jpg",130,97,15);thumbnails[3903345]=new thumbnail(3903345,"237134","","Cornwall_July__05_91jpg_thumb.jpg",130,98,15);thumbnails[3903334]=new thumbnail(3903334,"237134","","Cornwall_July_05_11jpg_thumb.jpg",130,68,15);thumbnails[4693433]=new thumbnail(4693433,"275176","","Rowena__Dan_014_edited-1_thumb.jpg",130,195,15);thumbnails[4693444]=new thumbnail(4693444,"275176","","Rowena__Dan_083_edited-1_thumb.jpg",130,195,15);thumbnails[4693472]=new thumbnail(4693472,"275176","","Rowena__Dan_127_edited-2_thumb.jpg",130,195,15);thumbnails[4693479]=new thumbnail(4693479,"275176","","Rowena__Dan_265_edited-1_thumb.jpg",130,195,15);thumbnails[4693482]=new thumbnail(4693482,"275176","","Rowena__Dan_163_edited-3_thumb.jpg",130,195,15);thumbnails[4693489]=new thumbnail(4693489,"275176","","Rowena__Dan_329_edited-2_thumb.jpg",130,195,15);thumbnails[4693491]=new thumbnail(4693491,"275176","","Rowena__Dan_350_edited-1_thumb.jpg",130,228,15);thumbnails[4693496]=new thumbnail(4693496,"275176","","Rowena__Dan_569_edited-1_thumb.jpg",130,195,15);thumbnails[4693508]=new thumbnail(4693508,"275176","","Rowena__Dan_484_edited-1_thumb.jpg",130,87,15);thumbnails[4693512]=new thumbnail(4693512,"275176","","Rowena__Dan_414_edited-1_thumb.jpg",130,87,15);thumbnails[4693516]=new thumbnail(4693516,"275176","","Rowena__Dan_509_edited-1_thumb.jpg",130,87,15);thumbnails[4693517]=new thumbnail(4693517,"275176","","Rowena__Dan_755_edited-2_thumb.jpg",130,195,15);thumbnails[4722152]=new thumbnail(4722152,"","","Simon_Ward_SWP_011_thumb.jpg",130,173,15);thumbnails[4790112]=new thumbnail(4790112,"237012","","IMG_1396_thumb.jpg",130,195,15);thumbnails[4790114]=new thumbnail(4790114,"237012","","IMG_1398_thumb.jpg",130,195,15);thumbnails[4790115]=new thumbnail(4790115,"237012","","IMG_1399_thumb.jpg",130,195,15);thumbnails[4790116]=new thumbnail(4790116,"237012","","IMG_1401_thumb.jpg",130,195,15);thumbnails[4790117]=new thumbnail(4790117,"237012","","IMG_1403_thumb.jpg",130,195,15);thumbnails[4790121]=new thumbnail(4790121,"237012","","IMG_1406_thumb.jpg",130,195,15);thumbnails[4815671]=new thumbnail(4815671,"270021","NEW ADVERT","A5_SWP_-_SA_advert_thumb.jpg",130,92,15);thumbnails[4908757]=new thumbnail(4908757,"279625","","P3040004_edited-1_thumb.jpg",130,93,15);thumbnails[4908761]=new thumbnail(4908761,"279625","","P3040013_edited-1_thumb.jpg",130,93,15);thumbnails[4908774]=new thumbnail(4908774,"279625","","P3280041_copy_thumb.jpg",130,104,15);thumbnails[4908780]=new thumbnail(4908780,"279625","","P3280038_edited-1_thumb.jpg",130,93,15);thumbnails[4908785]=new thumbnail(4908785,"279625","","P3040019_edited-1_thumb.jpg",130,93,15);thumbnails[4908813]=new thumbnail(4908813,"279625","","P3040024_edited-1_thumb.jpg",130,182,15);thumbnails[4908887]=new thumbnail(4908887,"279628","","IMG_1120_edited-1_thumb.jpg",130,93,15);thumbnails[4908888]=new thumbnail(4908888,"279628","","IMG_1121_edited-1_thumb.jpg",130,93,15);thumbnails[4908893]=new thumbnail(4908893,"279628","","IMG_1124_edited-1_thumb.jpg",130,182,15);thumbnails[4908895]=new thumbnail(4908895,"279628","","IMG_1138_edited-1_thumb.jpg",130,182,15);thumbnails[4908896]=new thumbnail(4908896,"279628","","IMG_1140_edited-1_thumb.jpg",130,93,15);thumbnails[4908897]=new thumbnail(4908897,"279628","","IMG_1165_edited-1_thumb.jpg",130,93,15);thumbnails[4908898]=new thumbnail(4908898,"279628","","IMG_1163_edited-1_thumb.jpg",130,93,15);thumbnails[4908920]=new thumbnail(4908920,"269793","","WTFC_03100937_edited-1_thumb.jpg",130,93,15);thumbnails[4908922]=new thumbnail(4908922,"269793","","WTFC_03100911_edited-1_thumb.jpg",130,93,15);thumbnails[4908923]=new thumbnail(4908923,"269793","","WTFC_03100946_edited-1_thumb.jpg",130,93,15);thumbnails[4908929]=new thumbnail(4908929,"283576","","3342_Stars_Appeal_Logo_No_Yellow_thumb.jpg",130,132,15);thumbnails[4997289]=new thumbnail(4997289,"237012","","IMG_2940_copy_thumb.jpg",130,195,15);thumbnails[5275420]=new thumbnail(5275420,"269793","","WTFC_v_Chisledon_001_thumb.jpg",130,67,15);thumbnails[5275425]=new thumbnail(5275425,"269793","","IMG_3692_1_thumb.JPG",130,87,15);thumbnails[5275428]=new thumbnail(5275428,"269793","","IMG_3810_1_thumb.JPG",130,195,15);thumbnails[5275431]=new thumbnail(5275431,"269793","","IMG_3849_1_thumb.JPG",130,87,15);thumbnails[5275440]=new thumbnail(5275440,"269793","","IMG_4448_thumb.JPG",130,87,15);thumbnails[5275443]=new thumbnail(5275443,"296895","","IMG_3615_1_thumb.jpg",130,195,15);thumbnails[5275446]=new thumbnail(5275446,"296895","","IMG_3620_1_thumb.jpg",130,195,15);thumbnails[5275447]=new thumbnail(5275447,"296895","","IMG_3629_1_thumb.jpg",130,195,15);thumbnails[5416261]=new thumbnail(5416261,"","","FB_image_thumb.jpg",130,49,15);thumbnails[5416306]=new thumbnail(5416306,"","","GFB_logo_thumb.jpg",130,24,15);thumbnails[5419637]=new thumbnail(5419637,"","","images_thumb.jpg",130,59,15);thumbnails[5521001]=new thumbnail(5521001,"269793","","WTFC_V_MOREDON_CHENEY_2B_300110_SWARD_thumb.JPG",130,87,15);thumbnails[5521005]=new thumbnail(5521005,"269793","","WTFC_V_LOWER_STRATTON_SWARD_0053a_thumb.jpg",130,195,15);thumbnails[5521008]=new thumbnail(5521008,"269793","","WTFC_V_LOWER_STRATTON_SWARD_0137a_thumb.jpg",130,98,15);thumbnails[5524285]=new thumbnail(5524285,"","","sisep_thumb.gif",130,72,15);thumbnails[5582823]=new thumbnail(5582823,"","","c4klogo_strapline_thumb.gif",130,43,15);thumbnails[3904429]=new thumbnail(3904429,"237012","","IMG_0518jpg_thumb.jpg",130,87,15);thumbnails[3911092]=new thumbnail(3911092,"237012","","IMG_0588jpg_thumb.jpg",130,87,15);thumbnails[3911094]=new thumbnail(3911094,"237012","","IMG_0711jpg_thumb.jpg",130,195,15);thumbnails[3904433]=new thumbnail(3904433,"236973","","IMG_0613bjpg_thumb.jpg",130,87,15);thumbnails[3904417]=new thumbnail(3904417,"236973","","IMG_0390jpg_thumb.jpg",130,195,15);thumbnails[4048026]=new thumbnail(4048026,"305941","15th January 2009","scan0002a1_thumb.jpg",130,48,15);thumbnails[5420115]=new thumbnail(5420115,"305941","17th December 2009","scan0004_thumb.JPG",130,103,15);thumbnails[5414248]=new thumbnail(5414248,"305941","14th January 2010","scan0002_thumb.jpg",130,185,15);thumbnails[5520759]=new thumbnail(5520759,"305941","4th February 2010","SWP_Web_logo_60_thumb.JPG",130,141,15);thumbnails[5414228]=new thumbnail(5414228,"305942","13th January 2010","scan0001_thumb.jpg",130,185,15);var galleries=new Object();galleries[237134]=new gallery(237134,"3903345,3903337,3903334,3903328,3903327,3903224","CORNWALL","gallery",[3903327,3903328,3903224,3903337,3903345,3903334]);galleries[283576]=new gallery(283576,"4908929","EXAMPLE PRICES","section320891",[4908929]);galleries[237518]=new gallery(237518,"3911366,3911360,3911341,3911127","HORSE RACING","section335848",[3911127,3911341,3911360,3911366]);galleries[279625]=new gallery(279625,"4908813,4908785,4908780,4908774,4908761,4908757","IDEAL HOME SHOW 2005","section335862",[4908757,4908761,4908774,4908780,4908785,4908813]);galleries[243859]=new gallery(243859,"4050469,4050443,4050435","LONDON DOCKLANDS","gallery",[4050435,4050443,4050469]);galleries[237174]=new gallery(237174,"3904404","MISC","gallery",[3904404]);galleries[237012]=new gallery(237012,"4997289,4790121,4790117,4790116,4790115,4790114,4790112,3911094,3911092,3904429","PEOPLE","section368637",[4790112,4790114,4790115,4790116,4790117,4790121,4997289,3904429,3911092,3911094]);galleries[275176]=new gallery(275176,"4693517,4693491,4693489,4693472,4693433","ROWENA & DAN DYDE","section320891",[4693433,4693444,4693472,4693479,4693482,4693489,4693491,4693496,4693508,4693512,4693516,4693517]);galleries[237137]=new gallery(237137,"3904401,3903513,3903500,3903496,3903466,3903376,3903349","SALISBURY","gallery",[3903496,3903500,3903513,3904401,3903466,3903349,3903376]);galleries[296895]=new gallery(296895,"5275447,5275446,5275443","STARS APPEAL COCKTAIL LAUNCH","section335862",[5275443,5275446,5275447]);galleries[237144]=new gallery(237144,"3904435","STONEHENGE","gallery",[3904435]);galleries[249124]=new gallery(249124,"4190339,4190336,4190334,4190273,4190269,4190215,4190159,4190131","SUMMER SOLSTICE 2009","section368645",[4190131,4190159,4190215,4190269,4190273,4190334,4190336,4190339]);galleries[237140]=new gallery(237140,"4123257,3904463,3904455,3904452","VENICE","gallery",[3904455,3904463,4123257,3904452]);galleries[279628]=new gallery(279628,"4908898,4908897,4908896,4908895,4908893,4908888,4908887","WALK FOR WARDS 2009","section335862",[4908887,4908888,4908893,4908895,4908896,4908897,4908898]);galleries[270021]=new gallery(270021,"4815671","WHAT'S INCLUDED?","section320891",[4815671]);galleries[269793]=new gallery(269793,"4688002,4687998","WILTON TOWN FC","section335848",[4687998,4688002,4908920,4908922,4908923,5275420,5275425,5275428,5275431,5275440,5521001,5521005,5521008]);galleries[236973]=new gallery(236973,"3904433,3904417","NATURE","gallery",[3904433,3904417]);galleries[305941]=new gallery(305941,"5520759,5420115,5414248,4048026","Salisbury Journal","section366115",[4048026,5420115,5414248,5520759]);galleries[305942]=new gallery(305942,"5414228","Avon Advertiser","section366115",[5414228]);galleries[236974]=new gallery(236974,"4123257,4050469,4050443,4050435,3904463,3904455,3904452,3904435,3904404,3904401","LANDSCAPES","gallery",[]);var imageSets=new Object();imageSets[1]="5275431,5275425,5275420,4997289,4908923,4908920,4908888,4908785,4908761,4815671,4790115,4693516,4693489,4693444,4190215,3911127,3904435,3904429,3903513,3903349,3903345";imageSets[2]="4908929,4815671,4693517,4693491,4693489,4693472,4693433,4688002,4687998";imageSets[3]="5275420";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/simonward79/images";break}switch(a){case 1:b="http://www1.clikpic.com/simonward79/images";break}switch(a){case 2:b="http://admin.clikpic.com/simonward79/images";break}switch(a){case 24:b="http://tpc15/clikpic/simonward79/images";break}switch(a){case 4:b="http://www.clikchurch.com/simonward79/images";break}switch(a){case 5:b="http://www2.clikpic.com/simonward79/images";break}switch(a){case 22:b="http://tpc5/clikpic/simonward79/images";break}switch(a){case 23:b="http://tpc10/clikpic/simonward79/images";break}switch(a){case 25:b="http://tpc16/clikpic/simonward79/images";break}switch(a){case 15:b="http://www3.clikpic.com/simonward79/images";break}switch(a){case 18:b="http://www4.clikpic.com/simonward79/images";break}switch(a){case 19:b="http://www5.clikpic.com/simonward79/images";break}switch(a){case 31:b="http://www7.clikpic.com/simonward79/images";break}switch(a){case 32:b="http://admin2.clikpic.com/simonward79/images";break}switch(a){case 33:b="http://www8.clikpic.com/simonward79/images";break}switch(a){case 34:b="http://www9.clikpic.com/simonward79/images";break}switch(a){case 35:b="http://admin3.clikpic.com/simonward79/images";break}switch(a){case 37:b="http://admin4.clikpic.com/simonward79/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("section320891"!=""){if(backgrounds[imageID].galleries_id!=""){html+='<a href="'+backgrounds[imageID].section_code+"_"+backgrounds[imageID].galleries_id+'.html">'}else{html+='<a href="section320891.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("section320891"!=""){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="Weddings, Events, Portraits: Amesbury & Salisbury: "+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;resizePhotoInfo();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(b,a){imageID=randomListVal(galleries[b].featured_images);if(imageID!=0){a.src=thumbnails[imageID].src;a.width=thumbnails[imageID].width;a.height=thumbnails[imageID].height}}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+'")'})}}};