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[1397614]=new thumbnail(1397614,"103122","Orca New Zealand, Kaikoura","Whale watching NZ_thumb.jpg",130,67,18);thumbnails[1506426]=new thumbnail(1506426,"103122","Deer in the woods","IMG_2801-2_thumb.jpg",130,87,18);thumbnails[1507069]=new thumbnail(1507069,"103122","Stag 1","IMG_4932_thumb.jpg",130,109,18);thumbnails[1514500]=new thumbnail(1514500,"103122","Dog","IMG_0182_thumb.jpg",130,117,18);thumbnails[1581062]=new thumbnail(1581062,"103122","Young Deer","IMG_2513_thumb.jpg",130,109,18);thumbnails[1592027]=new thumbnail(1592027,"103122","Robin","IMG_0483_thumb.jpg",130,93,18);thumbnails[1705243]=new thumbnail(1705243,"103122","Robin II","IMG_3352_thumb.jpg",130,101,18);thumbnails[2299539]=new thumbnail(2299539,"103122","Proud Beast","IMG_4670_thumb.jpg",130,123,18);thumbnails[2299544]=new thumbnail(2299544,"103122","The old men of the hills","IMG_4706_thumb.jpg",130,87,18);thumbnails[2299687]=new thumbnail(2299687,"103122","Adoration","IMG_4585_thumb.jpg",130,111,18);thumbnails[2299692]=new thumbnail(2299692,"103122","Hairy Monster","IMG_4650_thumb.jpg",130,118,18);thumbnails[3097713]=new thumbnail(3097713,"103122","Day Gecko","IMG_7298_thumb.jpg",130,106,18);thumbnails[3097722]=new thumbnail(3097722,"103122","Mauritian Fody","IMG_7366_thumb.jpg",130,119,18);thumbnails[3097724]=new thumbnail(3097724,"103122","Olive White Eye","_MG_7433-Edit-2_thumb.jpg",130,112,18);thumbnails[3975384]=new thumbnail(3975384,"103122","Swans","_MG_9183_thumb.jpg",130,163,18);thumbnails[3975438]=new thumbnail(3975438,"103122","Fox Cub I","_MG_9338_thumb.jpg",130,115,18);thumbnails[3975441]=new thumbnail(3975441,"103122","Fox Cub II","_MG_9345_thumb.jpg",130,88,18);thumbnails[3975446]=new thumbnail(3975446,"103122","Fox Cub III","_MG_9613_thumb.jpg",130,91,18);thumbnails[3975448]=new thumbnail(3975448,"103122","Badger","_MG_9685_thumb.jpg",130,96,18);thumbnails[4670527]=new thumbnail(4670527,"103122","The Proud Lion","_MG_0369_thumb.jpg",130,87,18);thumbnails[4670529]=new thumbnail(4670529,"103122","Badger ","_MG_9621_thumb.jpg",130,87,18);thumbnails[4670530]=new thumbnail(4670530,"103122","Fox Cub IIII","_MG_9322_thumb.jpg",130,61,18);thumbnails[4670531]=new thumbnail(4670531,"103122","Heron","_MG_9835_thumb.jpg",130,195,18);thumbnails[4672318]=new thumbnail(4672318,"103122","Buzzard","_MG_9525_thumb.jpg",130,99,18);thumbnails[2925238]=new thumbnail(2925238,"103122","Eagle","IMG_6813_thumb.jpg",130,86,18);thumbnails[2925504]=new thumbnail(2925504,"103122","Free as a Bird","IMG_6849_thumb.jpg",130,86,18);thumbnails[2925581]=new thumbnail(2925581,"103122","Owl","IMG_6711_thumb.jpg",130,195,18);thumbnails[2925679]=new thumbnail(2925679,"103122","Rare but not lost","_MG_6577_thumb.jpg",130,195,18);thumbnails[2925920]=new thumbnail(2925920,"103122","Behind bars","_MG_6534_thumb.jpg",130,76,18);thumbnails[2927459]=new thumbnail(2927459,"103122","Wild Cat","IMG_6604_thumb.jpg",130,112,18);thumbnails[2927460]=new thumbnail(2927460,"103122","The cunning fox","IMG_6592_thumb.jpg",130,192,18);thumbnails[2927467]=new thumbnail(2927467,"103122","Free as a bird II","IMG_6648_thumb.jpg",130,108,18);thumbnails[2931087]=new thumbnail(2931087,"103122","The Bird and the Bee","IMG_6796_thumb.jpg",130,153,18);thumbnails[1502496]=new thumbnail(1502496,"103242","Iceland from above","IMG_2076-22_thumb.jpg",130,155,18);thumbnails[1515699]=new thumbnail(1515699,"103242","A walk in the woods","IMG_2549_thumb.jpg",130,87,18);thumbnails[1555452]=new thumbnail(1555452,"103242","Castle in the Mist","IMG_0741_thumb.jpg",130,95,18);thumbnails[1556360]=new thumbnail(1556360,"103242","Tree I","IMG_2561_thumb.jpg",130,74,18);thumbnails[1580339]=new thumbnail(1580339,"103242","Contemplation","IMG_2983_thumb.jpg",130,63,18);thumbnails[1580391]=new thumbnail(1580391,"103242","Brighton beach huts","IMG_2930_thumb.jpg",130,65,18);thumbnails[1582803]=new thumbnail(1582803,"103242","The Jungle at Night","IMG_0471_thumb.jpg",130,90,18);thumbnails[1583029]=new thumbnail(1583029,"103242","HK at Night","IMG_0926_thumb.jpg",130,76,18);thumbnails[1583741]=new thumbnail(1583741,"103242","The Beach","IMG_1550_thumb.jpg",130,152,18);thumbnails[1585246]=new thumbnail(1585246,"103242","The Bridge","264_thumb.jpg",130,65,18);thumbnails[1585290]=new thumbnail(1585290,"103242","Light House","DSCF0072_thumb.jpg",130,187,18);thumbnails[1592017]=new thumbnail(1592017,"103242","Tree III","IMG_0460-Edit-2_thumb.jpg",130,173,18);thumbnails[1592037]=new thumbnail(1592037,"103242","The mystery of the loch","IMG_0495_thumb.jpg",130,91,18);thumbnails[1694065]=new thumbnail(1694065,"103242","The Rock","DSCF0264_thumb.jpg",130,98,18);thumbnails[1740120]=new thumbnail(1740120,"103242","Loch Lomond","IMG_3834_thumb.jpg",130,66,18);thumbnails[1740128]=new thumbnail(1740128,"103242","Swan Lake","IMG_3846_thumb.jpg",130,79,18);thumbnails[1740177]=new thumbnail(1740177,"103242","Dark Clouds","IMG_3013_thumb.jpg",130,61,18);thumbnails[2287141]=new thumbnail(2287141,"103242","Moody Seas","IMG_1546-Edit-2_thumb.jpg",130,60,18);thumbnails[2651230]=new thumbnail(2651230,"103242","The Kasbah","_MG_6342-Edit-2_thumb.jpg",130,62,18);thumbnails[1397583]=new thumbnail(1397583,"103120","Dartmoor Trees","IMG_0015altered_thumb.jpg",130,66,18);thumbnails[1397590]=new thumbnail(1397590,"103120","Dartmoor Landscape","IMG_0235 copy_filtered_thumb.jpg",130,79,18);thumbnails[1397591]=new thumbnail(1397591,"103120","Dartmoor Church","petes_church copy_thumb.jpg",130,189,18);thumbnails[1514514]=new thumbnail(1514514,"103120","The Old Mill","IMG_0071_thumb.jpg",130,195,18);thumbnails[1555918]=new thumbnail(1555918,"103120","Grave Stones","IMG_0231_thumb.jpg",130,87,18);thumbnails[1583637]=new thumbnail(1583637,"108363","Pink","IMG_3067_thumb.jpg",130,195,18);thumbnails[1583839]=new thumbnail(1583839,"108363","Crushed","IMG_3050_thumb.jpg",130,74,18);thumbnails[1694070]=new thumbnail(1694070,"108363","Glass 1","IMG_3151_thumb.jpg",130,157,18);thumbnails[1694074]=new thumbnail(1694074,"108363","Glass 2","IMG_3154_thumb.jpg",130,147,18);thumbnails[1694079]=new thumbnail(1694079,"108363","Sparkle","IMG_3182_thumb.jpg",130,93,18);thumbnails[1740094]=new thumbnail(1740094,"108363","Waterfall","DPP_0029_thumb.jpg",130,77,18);thumbnails[1740110]=new thumbnail(1740110,"108363","Fair Ground I","IMG_3812_thumb.jpg",130,81,18);thumbnails[1740115]=new thumbnail(1740115,"108363","Fun Fair II","IMG_3823_thumb.jpg",130,87,18);thumbnails[1981057]=new thumbnail(1981057,"108363","Statue","IMG_3669_thumb.jpg",130,131,18);thumbnails[3975371]=new thumbnail(3975371,"108363","Piano","_MG_9019_thumb.jpg",130,204,18);thumbnails[1514427]=new thumbnail(1514427,"103125","Peace","Show me the way to Compostela (81)_thumb.jpg",130,174,18);thumbnails[1514433]=new thumbnail(1514433,"103125","Angel","Show me the way to Compostela (144)_thumb.jpg",130,183,18);thumbnails[1514577]=new thumbnail(1514577,"103125","The Photographer in B&W","IMG_4539_thumb.jpg",130,103,18);thumbnails[1981051]=new thumbnail(1981051,"103125","Cheeky","IMG_3496-Edit-2_thumb.jpg",130,95,18);thumbnails[2253391]=new thumbnail(2253391,"103125","Cheeky 2","IMG_4170-4_thumb.jpg",130,98,18);thumbnails[2258028]=new thumbnail(2258028,"103125","Actress","IMG_4331_thumb.jpg",130,132,18);thumbnails[2258044]=new thumbnail(2258044,"103125","Soft Focus","IMG_4435_thumb.jpg",130,91,18);thumbnails[2355951]=new thumbnail(2355951,"103125","Man in the Shade","Show me the way to Compostela (36)_thumb.jpg",130,152,18);thumbnails[1397586]=new thumbnail(1397586,"103123","Water","IMG_0175 copy_thumb.jpg",130,100,18);thumbnails[1514420]=new thumbnail(1514420,"103123","The Angry Door","Show me the way to Compostela (242)_thumb.jpg",130,145,18);thumbnails[1514571]=new thumbnail(1514571,"103123","Roses in Bloom","IMG_0358-Edit_thumb.jpg",130,87,18);thumbnails[1539713]=new thumbnail(1539713,"103123","Water II","IMG_0175_thumb.jpg",130,195,18);thumbnails[1585291]=new thumbnail(1585291,"103123","Frosty Leaf","Xmas 010_thumb.jpg",130,94,18);thumbnails[1740098]=new thumbnail(1740098,"103123","Flower","IMG_3675-Edit-Edit_thumb.jpg",130,87,18);thumbnails[2514504]=new thumbnail(2514504,"103123","Flowers in Macro","DPP_0171_thumb.jpg",130,89,18);thumbnails[4670533]=new thumbnail(4670533,"103123","Daffodils","_MG_8225_thumb.jpg",130,87,18);thumbnails[4670534]=new thumbnail(4670534,"103123","Plant Life in Macro","_MG_8234_thumb.jpg",130,87,18);thumbnails[4670536]=new thumbnail(4670536,"103123","Daffodils II","_MG_8322_thumb.jpg",130,195,18);thumbnails[1397625]=new thumbnail(1397625,"103121","Parisian Sunset","2005_1121paris0018_thumb.JPG",130,98,18);thumbnails[1397666]=new thumbnail(1397666,"103121","Paris Iron Work","2005_1121paris0046 copy_thumb.jpg",130,86,18);thumbnails[1405761]=new thumbnail(1405761,"103121","Parisian gargoyles","2005_1121paris0026 copy_thumb.jpg",130,127,18);thumbnails[1515589]=new thumbnail(1515589,"103121","Iron Work I","2005_1121paris0045_thumb.jpg",130,98,18);thumbnails[1515684]=new thumbnail(1515684,"103121","Parisian Sunset II","2005_1121paris0017_thumb.jpg",130,98,18);thumbnails[1539765]=new thumbnail(1539765,"103121","Iron Work III","2005_1121paris0041_thumb.jpg",130,85,18);thumbnails[1500790]=new thumbnail(1500790,"103124","The Tour in London","IMG_2401 copy_thumb.jpg",130,87,18);thumbnails[1556316]=new thumbnail(1556316,"103124","Tour De France II","IMG_2391_thumb.jpg",130,107,18);thumbnails[2512559]=new thumbnail(2512559,"103124","Orange","IMG_4900_thumb.jpg",130,90,18);thumbnails[3803038]=new thumbnail(3803038,"231791","Bump","_MG_8654_thumb.jpg",130,135,18);thumbnails[3803041]=new thumbnail(3803041,"231791","Bump II","_MG_8717_thumb.jpg",130,89,18);thumbnails[3803044]=new thumbnail(3803044,"231791","Bump III","_MG_8729_thumb.jpg",130,205,18);thumbnails[4671010]=new thumbnail(4671010,"103124","The Helicopters","_MG_9219_thumb.jpg",130,68,18);var galleries=new Object();galleries[103122]=new gallery(103122,"2925238","Wildlife","gallery",[1397614,1506426,1507069,1514500,1581062,1592027,1705243,2299539,2299544,2299687,2299692,3097713,3097722,3097724,3975384,3975438,3975441,3975446,3975448,4670527,4670529,4670530,4670531,4672318,2925238,2925504,2925581,2925679,2925920,2927459,2927460,2927467,2931087]);galleries[103242]=new gallery(103242,"2651230,2287141,1740177,1740128,1740120,1694065,1592037,1592017,1585290,1585246","Landscapes & Sunsets","gallery",[1502496,1515699,1555452,1556360,1580339,1580391,1582803,1583029,1583741,1585246,1585290,1592017,1592037,1694065,1740120,1740128,1740177,2287141,2651230]);galleries[103120]=new gallery(103120,"1555918,1514514,1397591,1397590,1397583","Dartmoor Landscapes","gallery",[1397583,1397590,1397591,1514514,1555918]);galleries[108363]=new gallery(108363,"3975371,1981057,1740115,1740110,1740094,1694079,1694074,1694070,1583839,1583637","Abstract","gallery",[1583637,1583839,1694070,1694074,1694079,1740094,1740110,1740115,1981057,3975371]);galleries[103125]=new gallery(103125,"1981051","Portraits","gallery",[1514427,1514433,1514577,1981051,2253391,2258028,2258044,2355951]);galleries[103123]=new gallery(103123,"2514504","Macro","gallery",[1397586,1514420,1514571,1539713,1585291,1740098,2514504,4670533,4670534,4670536]);galleries[103121]=new gallery(103121,"1539765,1515684,1515589,1405761,1397666,1397625","Paris in the Autumn","gallery",[1397625,1397666,1405761,1515589,1515684,1539765]);galleries[231791]=new gallery(231791,"3803044","Pregnancy Photography","gallery",[3803038,3803041,3803044]);galleries[103124]=new gallery(103124,"2512559","Sport & Action","gallery",[1500790,1556316,2512559,4671010]);galleries[158252]=new gallery(158252,"","Weddings","gallery",[]);var imageSets=new Object();imageSets[1]="4672318,4671010,4670536,4670534,4670533,4670531,4670530,4670529,4670527,3975448,3975446,3975441,3975438,3975384,3975371,3803044,3803041,3803038,3097724,3097722,3097713,2931087,2927467,2927460,2927459,2925920,2925679,2925581,2925504,2925238,2651230,2514504,2512559,2355951,2299692,2299687,2299544,2299539,2287141,2258044,2258028,2253391,1981057,1981051,1740177,1740128,1740120,1740115,1740110,1740098";imageSets[2]="3803044,2925238,2514504,2512559,1981051";imageSets[3]="4672318,4671010,4670536,4670534,4670533,4670531,4670530,4670529,4670527,3975448,3975446,3975441,3975438,3975384,3975371,3803044,3803041,3803038,3097724,3097722,3097713,2931087,2927467,2927460,2927459,2925920,2925679,2925581,2925504,2925238,2651230,2514504,2512559,2355951,2299692,2299687,2299544,2299539,2287141,2258044,2258028,2253391,1981057,1981051,1740177,1740128,1740120,1740115,1740110,1740098";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/peterwalsh/images";break}switch(a){case 1:b="http://www1.clikpic.com/peterwalsh/images";break}switch(a){case 2:b="http://admin.clikpic.com/peterwalsh/images";break}switch(a){case 4:b="http://www.clikchurch.com/peterwalsh/images";break}switch(a){case 5:b="http://www2.clikpic.com/peterwalsh/images";break}switch(a){case 15:b="http://www3.clikpic.com/peterwalsh/images";break}switch(a){case 21:b="http://www6.clikpic.com/peterwalsh/images";break}switch(a){case 18:b="http://www4.clikpic.com/peterwalsh/images";break}switch(a){case 19:b="http://www5.clikpic.com/peterwalsh/images";break}switch(a){case 22:b="http://tpc5/clikpic/peterwalsh/images";break}switch(a){case 23:b="http://tpc10/clikpic/peterwalsh/images";break}switch(a){case 24:b="http://tpc15/clikpic/peterwalsh/images";break}switch(a){case 25:b="http://tpc16/clikpic/peterwalsh/images";break}switch(a){case 31:b="http://www7.clikpic.com/peterwalsh/images";break}switch(a){case 32:b="http://admin2.clikpic.com/peterwalsh/images";break}switch(a){case 33:b="http://www8.clikpic.com/peterwalsh/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="Peter Walsh 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 Google Checkout:</p>";b=b+'<p class="imageinfo" id="imagePrice"><strong>'+c.purchase_instruction+"</strong> 				&pound;"+c.item_price+"</p>";var e=c.purchase_instruction;var d=c.item_price;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="PETERWALSH">';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+'")'})}}};