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[154466]=new thumbnail(154466,"14344","Click Office Name","comm-life-ceremonyroompic1_thumb.jpg",130,65,1);thumbnails[210908]=new thumbnail(210908,"14341","John Lewis","0137_thumb.jpg",130,65,1);thumbnails[210964]=new thumbnail(210964,"14324","The Tanning Shop","0139_thumb.jpg",130,65,1);thumbnails[1974058]=new thumbnail(1974058,"132687","","02_thumb.jpg",130,94,1);thumbnails[594233]=new thumbnail(594233,"45698","PPS Promotions Ltd","pps print_thumb.jpg",130,65,1);thumbnails[1584649]=new thumbnail(1584649,"13141","Flowerscene","0144_thumb.jpg",130,65,1);thumbnails[156847]=new thumbnail(156847,"13140","Martin Bird Photography","0254_thumb.jpg",130,65,1);thumbnails[210828]=new thumbnail(210828,"14344","Boston","blue line for buttons 0451_thumb.jpg",130,1,1);thumbnails[256196]=new thumbnail(256196,"14331","The Jeeves Company","montage5_thumb.jpg",130,65,1);thumbnails[210833]=new thumbnail(210833,"14344","Bourne","blue line for buttons 0453_thumb.jpg",130,1,1);thumbnails[256417]=new thumbnail(256417,"14340","Royal Taxis","montage6_thumb.jpg",130,65,1);thumbnails[210860]=new thumbnail(210860,"14344","Cambridge","blue line for buttons 0460_thumb.jpg",130,1,1);thumbnails[210867]=new thumbnail(210867,"14344","Ely","blue line for buttons 0461_thumb.jpg",130,1,1);thumbnails[168405]=new thumbnail(168405,"13141","Aitken Floral Designs","0251_thumb.jpg",130,65,1);thumbnails[193863]=new thumbnail(193863,"14327","Intermezzo","01 copy11_thumb.jpg",130,65,1);thumbnails[207930]=new thumbnail(207930,"13139","Sugarcaft Sensations","0128_thumb.jpg",130,65,1);thumbnails[209464]=new thumbnail(209464,"17391","Peterborough Marriott","0132_thumb.jpg",130,65,1);thumbnails[209467]=new thumbnail(209467,"13148","Peterborough Marriott","0133_thumb.jpg",130,65,1);thumbnails[210870]=new thumbnail(210870,"14344","Fenland/March","blue line for buttons 0462_thumb.jpg",130,1,1);thumbnails[210847]=new thumbnail(210847,"14344","Grantham","blue line for buttons 0454_thumb.jpg",130,1,1);thumbnails[210850]=new thumbnail(210850,"14344","Horncastle","blue line for buttons 0455_thumb.jpg",130,1,1);thumbnails[210875]=new thumbnail(210875,"14344","Huntingdon","blue line for buttons 0463_thumb.jpg",130,1,1);thumbnails[210851]=new thumbnail(210851,"14344","Lincoln","blue line for buttons 0456_thumb.jpg",130,1,1);thumbnails[245585]=new thumbnail(245585,"13135","Peter Starey Cars","rolls royces_thumb.jpg",130,65,1);thumbnails[160267]=new thumbnail(160267,"13154","Nails by Nicola","01_thumb.jpg",130,65,1);thumbnails[160477]=new thumbnail(160477,"14333","Bridal Makeup & Hair","01 copy21_thumb.jpg",130,65,1);thumbnails[161165]=new thumbnail(161165,"14338","Orchid Financial Services","orchid_thumb.jpg",130,65,1);thumbnails[166359]=new thumbnail(166359,"13147","The Main Event","main event 01_thumb.jpg",130,65,1);thumbnails[166673]=new thumbnail(166673,"13146","G.C.Videos","gc videos 01_thumb.jpg",130,65,1);thumbnails[181006]=new thumbnail(181006,"13143","PPS Promotions Limited","Untitled-13_thumb.jpg",130,65,1);thumbnails[188610]=new thumbnail(188610,"14335","Double-D.com","0114_thumb.jpg",130,65,1);thumbnails[189945]=new thumbnail(189945,"13148","The Cresset","01 copy2_thumb.jpg",130,65,1);thumbnails[189965]=new thumbnail(189965,"17391","Thorpe Hall","01 copy3_thumb.jpg",130,65,1);thumbnails[191595]=new thumbnail(191595,"13135","Calibre","01 copy5_thumb.jpg",130,65,1);thumbnails[193719]=new thumbnail(193719,"13139","Carolyn Mackenzie","0115_thumb.jpg",130,65,1);thumbnails[193755]=new thumbnail(193755,"17668","Tiaras Unveiled","01 copy8_thumb.jpg",130,65,1);thumbnails[193814]=new thumbnail(193814,"14327","Red Hot Chillies","01 copy10_thumb.jpg",130,65,1);thumbnails[193983]=new thumbnail(193983,"13155","Tie Rack","01 copy12_thumb.jpg",130,65,1);thumbnails[194001]=new thumbnail(194001,"14343","The Main Event","main event 013_thumb.jpg",130,65,1);thumbnails[194092]=new thumbnail(194092,"13158","Simpole Clarke","01 copy13_thumb.jpg",130,65,1);thumbnails[194125]=new thumbnail(194125,"14323","Chocolate Affair","01 copy14_thumb.jpg",130,65,1);thumbnails[194386]=new thumbnail(194386,"14332","Amps Fine Wines","01 copy15_thumb.jpg",130,65,1);thumbnails[196078]=new thumbnail(196078,"13144","Matchmaker of Stamford","0116_thumb.jpg",130,65,1);thumbnails[196797]=new thumbnail(196797,"14339","MCP Solicitors","01 copy16_thumb.jpg",130,65,1);thumbnails[204348]=new thumbnail(204348,"13145","The Bridal Centre","02 copy1_thumb.jpg",130,65,1);thumbnails[204819]=new thumbnail(204819,"13157","Steve Allen Entertainments","0121_thumb.jpg",130,65,1);thumbnails[204827]=new thumbnail(204827,"18650","Steve Allen Entertainments","0123_thumb.jpg",130,65,1);thumbnails[204846]=new thumbnail(204846,"14342","The Party Place","0124_thumb.jpg",130,65,1);thumbnails[205170]=new thumbnail(205170,"14345","Find A Church Search Website","Untitled-1_thumb.jpg",130,65,1);thumbnails[205171]=new thumbnail(205171,"13156","The Party Place","0126_thumb.jpg",130,65,1);thumbnails[207959]=new thumbnail(207959,"13151","Bridal Makeup & Hair","01 copy22_thumb.jpg",130,65,1);thumbnails[208289]=new thumbnail(208289,"14336","Stephen Diggle","0129_thumb.jpg",130,65,1);thumbnails[208385]=new thumbnail(208385,"13148","The Bell Inn Stilton","01 copy27_thumb.jpg",130,65,1);thumbnails[208403]=new thumbnail(208403,"14347","Richard N Marriott","01 copy32_thumb.jpg",130,65,1);thumbnails[210808]=new thumbnail(210808,"14322","Simons & Calvert","0136_thumb.jpg",130,65,1);thumbnails[210823]=new thumbnail(210823,"14344","Peterborough","blue line for buttons 0452_thumb.jpg",130,1,1);thumbnails[240312]=new thumbnail(240312,"13141","Fleur","MONTAGE_thumb.jpg",130,65,1);thumbnails[210852]=new thumbnail(210852,"14344","Sleaford","blue line for buttons 0457_thumb.jpg",130,1,1);thumbnails[210853]=new thumbnail(210853,"14344","Spalding","blue line for buttons 0458_thumb.jpg",130,1,1);thumbnails[210855]=new thumbnail(210855,"14344","Stamford","blue line for buttons 0459_thumb.jpg",130,1,1);thumbnails[184631]=new thumbnail(184631,"13140","The Studio Whittlesey","0113_thumb.jpg",130,65,1);thumbnails[189973]=new thumbnail(189973,"17391","The Cresset","01 copy4_thumb.jpg",130,65,1);thumbnails[191600]=new thumbnail(191600,"13135","Blackwater","01 copy6_thumb.jpg",130,65,1);thumbnails[193727]=new thumbnail(193727,"13139","Deesigns for loving","01 copy7_thumb.jpg",130,65,1);thumbnails[204703]=new thumbnail(204703,"14329","Wedding Boutique","0120_thumb.jpg",130,65,1);thumbnails[204857]=new thumbnail(204857,"14343","The Party Place","0125_thumb.jpg",130,65,1);thumbnails[205172]=new thumbnail(205172,"13156","The Main Event","main event 014_thumb.jpg",130,65,1);thumbnails[205173]=new thumbnail(205173,"14328","Steve Allen Entertainments","0127_thumb.jpg",130,65,1);thumbnails[207794]=new thumbnail(207794,"13157","Intermezzo","IMG_2334_thumb.JPG",130,65,1);thumbnails[207871]=new thumbnail(207871,"14328","Music in Motion","01 copy18_thumb.jpg",130,65,1);thumbnails[207934]=new thumbnail(207934,"14323","Sugarcraft Sensations","0255_thumb.jpg",130,65,1);thumbnails[208096]=new thumbnail(208096,"","Lasting Impresssion","Untitled-11_thumb.jpg",130,65,1);thumbnails[208368]=new thumbnail(208368,"14336","G. Gaynor","01 copy26_thumb.jpg",130,65,1);thumbnails[210915]=new thumbnail(210915,"13150","John Lewis","0138_thumb.jpg",130,65,1);thumbnails[245625]=new thumbnail(245625,"13141","Fiori Flowers","montage1_thumb.jpg",130,65,1);thumbnails[359169]=new thumbnail(359169,"13143","Looks Inviting","0142_thumb.jpg",130,65,1);thumbnails[594237]=new thumbnail(594237,"45698","Looks Inviting","looks inviting_thumb.jpg",130,65,1);thumbnails[245654]=new thumbnail(245654,"13141","The Daisy Chain Florist","montage2_thumb.jpg",130,65,1);thumbnails[193791]=new thumbnail(193791,"13135","Marriage Carriage","01 copy9_thumb.jpg",130,65,1);thumbnails[204700]=new thumbnail(204700,"13155","Wedding Boutique","0118_thumb.jpg",130,65,1);thumbnails[204702]=new thumbnail(204702,"13144","Wedding Boutique","0119_thumb.jpg",130,65,1);thumbnails[204821]=new thumbnail(204821,"14327","Steve Allen Entertainments","0122_thumb.jpg",130,65,1);thumbnails[207816]=new thumbnail(207816,"13157","Red Hot Chillies","01%20copy10_thumb.jpg",130,65,1);thumbnails[207952]=new thumbnail(207952,"14343","Absolutely Fabulous","01 copy20_thumb.jpg",130,65,1);thumbnails[208386]=new thumbnail(208386,"17391","The Bell Inn Stilton","01 copy28_thumb.jpg",130,65,1);thumbnails[208388]=new thumbnail(208388,"13148","Holmewood Hall","01 copy29_thumb.jpg",130,65,1);thumbnails[245701]=new thumbnail(245701,"13141","Milestones Florists","montage3_thumb.jpg",130,65,1);thumbnails[725268]=new thumbnail(725268,"13143","baa design","0143_thumb.jpg",130,65,1);thumbnails[728899]=new thumbnail(728899,"45698","baa design","01431_thumb.jpg",130,65,1);thumbnails[248952]=new thumbnail(248952,"13141","Stamford Designer Florist","montage4_thumb.jpg",130,65,1);thumbnails[256424]=new thumbnail(256424,"13135","Royal Taxis","montage - car hire_thumb.jpg",130,65,1);thumbnails[186414]=new thumbnail(186414,"13140","St Ives Photographic","01 copy1_thumb.jpg",130,65,1);thumbnails[208390]=new thumbnail(208390,"13148","Hinchingbrooke","01 copy30_thumb.jpg",130,65,1);thumbnails[208391]=new thumbnail(208391,"17391","Hinchingbrooke","01 copy31_thumb.jpg",130,65,1);thumbnails[232088]=new thumbnail(232088,"14323","Chocolate Fountains Hire","advert2_thumb.jpg",130,65,1);thumbnails[207880]=new thumbnail(207880,"13157","Music in Motion","01 copy19_thumb.jpg",130,65,1);var galleries=new Object();galleries[13155]=new gallery(13155,"204700,193983","Accessories","gallery",[193983,204700]);galleries[14343]=new gallery(14343,"207952,204857,194001","Balloons","gallery",[194001,204857,207952]);galleries[13154]=new gallery(13154,"160267","Beauty","gallery",[160267]);galleries[13139]=new gallery(13139,"207930,193727,193719","Cakes","gallery",[207930,193719,193727]);galleries[13135]=new gallery(13135,"256424,245585,193791,191600,191595","Car Hire","gallery",[245585,191595,191600,193791,256424]);galleries[13158]=new gallery(13158,"194092","Caterers","gallery",[194092]);galleries[14323]=new gallery(14323,"232088,207934,194125","Chocolate Fountain","gallery",[194125,207934,232088]);galleries[14345]=new gallery(14345,"205170","Churches","gallery",[205170]);galleries[13156]=new gallery(13156,"205172,205171","Decorations","gallery",[205171,205172]);galleries[14328]=new gallery(14328,"207871,205173","Discos","gallery",[205173,207871]);galleries[13144]=new gallery(13144,"204702,196078","Dresses","gallery",[196078,204702]);galleries[13157]=new gallery(13157,"207880,207816,207794,204819","Entertainment","gallery",[204819,207794,207816,207880]);galleries[14338]=new gallery(14338,"161165","Financial Advisers","gallery",[161165]);galleries[14342]=new gallery(14342,"204846","Fireworks","gallery",[204846]);galleries[13141]=new gallery(13141,"1584649,248952,245701,245654,245625,240312,168405","Florists","gallery",[1584649,168405,240312,245625,245654,245701,248952]);galleries[14331]=new gallery(14331,"256196","Food","gallery",[256196]);galleries[13150]=new gallery(13150,"210915","Gifts","gallery",[210915]);galleries[13151]=new gallery(13151,"207959","Hairdressers","gallery",[207959]);galleries[14330]=new gallery(14330,"","Hats","gallery",[]);galleries[17942]=new gallery(17942,"","Hen Night/Party","gallery",[]);galleries[15142]=new gallery(15142,"","Honeymoon/Travel","gallery",[]);galleries[45698]=new gallery(45698,"728899,594237,594233","Invitations","gallery",[594233,594237,728899]);galleries[14336]=new gallery(14336,"208368,208289","Jewellery","gallery",[208289,208368]);galleries[14335]=new gallery(14335,"188610","Lingerie","gallery",[188610]);galleries[18650]=new gallery(18650,"204827","Magician","gallery",[204827]);galleries[14333]=new gallery(14333,"160477","Make up","gallery",[160477]);galleries[14322]=new gallery(14322,"210808","Marquee Hire","gallery",[210808]);galleries[14327]=new gallery(14327,"204821,193863,193814","Musicians","gallery",[193863,193814,204821]);galleries[13140]=new gallery(13140,"186414,184631,156847","Photographers","gallery",[156847,184631,186414]);galleries[13148]=new gallery(13148,"209467,208390,208388,208385,189945","Reception Venues","gallery",[209467,189945,208385,208388,208390]);galleries[14344]=new gallery(14344,"154466","Register Offices","gallery",[154466,210828,210833,210860,210867,210870,210847,210850,210875,210851,210823,210852,210853,210855]);galleries[14329]=new gallery(14329,"204703","Shoes","gallery",[204703]);galleries[14339]=new gallery(14339,"196797","Solicitor","gallery",[196797]);galleries[14394]=new gallery(14394,"","Stag Night/Party","gallery",[]);galleries[13143]=new gallery(13143,"725268,359169,181006","Stationery","gallery",[181006,359169,725268]);galleries[13145]=new gallery(13145,"204348","Suit Hire","gallery",[204348]);galleries[14324]=new gallery(14324,"210964","Tanning Shop","gallery",[210964]);galleries[14340]=new gallery(14340,"256417","Taxi Services","gallery",[256417]);galleries[17668]=new gallery(17668,"193755","Tiaras","gallery",[193755]);galleries[14347]=new gallery(14347,"208403","Toastmaster","gallery",[208403]);galleries[13146]=new gallery(13146,"166673","Video","gallery",[166673]);galleries[14337]=new gallery(14337,"","Watches","gallery",[]);galleries[132687]=new gallery(132687,"1974058","Wedding Directory","gallery",[1974058]);galleries[14341]=new gallery(14341,"210908","Wedding List","gallery",[210908]);galleries[13147]=new gallery(13147,"166359","Wedding Organiser","gallery",[166359]);galleries[17391]=new gallery(17391,"209464,208391,208386,189973,189965","Wedding Venues","gallery",[209464,189965,189973,208386,208391]);galleries[14332]=new gallery(14332,"194386","Wine","gallery",[194386]);var imageSets=new Object();imageSets[1]="1974058";imageSets[2]="154466";imageSets[3]="1974058,1584649,728899,725268,594237,594233,359169,256424,256417,256196,248952,245701,245654,245625,245585,240312,232088,210964,210915,210908,210875,210870,210867,210860,210855,210853,210852,210851,210850,210847,210833,210828,210823,210808,209467,209464,208403,208391,208390,208388,208386,208385,208368,208289,208096,207959,207952,207934,207930,207880";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/mbird/images";break}switch(a){case 1:b="http://www1.clikpic.com/mbird/images";break}switch(a){case 2:b="http://admin.clikpic.com/mbird/images";break}switch(a){case 24:b="http://tpc15/clikpic/mbird/images";break}switch(a){case 4:b="http://www.clikchurch.com/mbird/images";break}switch(a){case 5:b="http://www2.clikpic.com/mbird/images";break}switch(a){case 22:b="http://tpc5/clikpic/mbird/images";break}switch(a){case 23:b="http://tpc10/clikpic/mbird/images";break}switch(a){case 25:b="http://tpc16/clikpic/mbird/images";break}switch(a){case 15:b="http://www3.clikpic.com/mbird/images";break}switch(a){case 18:b="http://www4.clikpic.com/mbird/images";break}switch(a){case 19:b="http://www5.clikpic.com/mbird/images";break}switch(a){case 31:b="http://www7.clikpic.com/mbird/images";break}switch(a){case 32:b="http://admin2.clikpic.com/mbird/images";break}switch(a){case 33:b="http://www8.clikpic.com/mbird/images";break}switch(a){case 34:b="http://www9.clikpic.com/mbird/images";break}switch(a){case 35:b="http://admin3.clikpic.com/mbird/images";break}switch(a){case 37:b="http://admin4.clikpic.com/mbird/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="www.Peterborough Wedding Directory.co.uk: "+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> 							"+(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(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+'")'})}}};
