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[5939060]=new thumbnail(5939060,"229249","","avian_thumb.jpg",130,86,32);thumbnails[4039314]=new thumbnail(4039314,"229249","Flight of Fancy","Flight_of_Fancy_small_thumb.jpg",130,86,32);thumbnails[4039320]=new thumbnail(4039320,"229249","Skokholm Seagull","Skokholm_Seagull_thumb.jpg",130,69,32);thumbnails[5926567]=new thumbnail(5926567,"229249","Five in a Bed","5_in_a_Bed_79FE7D80-24E8-5EC4-4F8E35C804BDEBAC_thumb.jpg",130,86,32);thumbnails[5926568]=new thumbnail(5926568,"229249","The Wait","DSC_3581-2_79FF20B6-24E8-5EC4-4F5518764F2DC079_thumb.jpg",130,182,32);thumbnails[5926571]=new thumbnail(5926571,"229249","","Skokholm_Puffin_79FF8B86-24E8-5EC4-4FAD08949BCBFD58_thumb.jpg",130,74,32);thumbnails[4039256]=new thumbnail(4039256,"229249","","DSC_9927_copuy_thumb.jpg",130,96,32);thumbnails[4039263]=new thumbnail(4039263,"229249","","DSC_9946_copy_thumb.jpg",130,87,32);thumbnails[4039258]=new thumbnail(4039258,"229249","","DSC_9929_copy_thumb.jpg",130,95,32);thumbnails[4039260]=new thumbnail(4039260,"229249","","DSC_9942_copy_thumb.jpg",130,88,32);thumbnails[4039323]=new thumbnail(4039323,"229249","Wave of Gulls","Wave_of_Gulls_thumb.jpg",130,18,32);thumbnails[5939066]=new thumbnail(5939066,"243280","","equestrian_thumb.jpg",130,93,32);thumbnails[5068764]=new thumbnail(5068764,"243280","","DSC_8011-2_thumb.jpg",130,93,32);thumbnails[5068759]=new thumbnail(5068759,"243280","","DSC_5227-2_thumb.jpg",130,93,32);thumbnails[5068741]=new thumbnail(5068741,"243280","","DSC_1829-2_thumb.jpg",130,182,32);thumbnails[4035832]=new thumbnail(4035832,"243280","","DSC_1649_thumb.jpg",130,86,32);thumbnails[5926603]=new thumbnail(5926603,"243280","Blushing","Blushing_7A0823E2-24E8-5EC4-4F945D63A5FCB277_thumb.jpg",130,82,32);thumbnails[5926604]=new thumbnail(5926604,"243280","Blushing Portrait","Blushing_Portrait_7A08BEDB-24E8-5EC4-4F72514B4616816F_thumb.jpg",130,85,32);thumbnails[5926607]=new thumbnail(5926607,"243280","Phantom","PhantomPortrait_thumb.jpg",130,203,32);thumbnails[5926602]=new thumbnail(5926602,"243280","Stirrup","blush_stirrup_thumb.jpg",130,375,32);thumbnails[5926601]=new thumbnail(5926601,"243280","Ponies on the Moor","a_thumb.jpg",130,47,32);thumbnails[4035835]=new thumbnail(4035835,"243280","","DSC_1691-2_thumb.jpg",130,25,32);thumbnails[5939069]=new thumbnail(5939069,"334457","","pets_thumb.jpg",130,191,32);thumbnails[5937190]=new thumbnail(5937190,"334457","Fern","DSC_8232_thumb.jpg",130,191,32);thumbnails[5937196]=new thumbnail(5937196,"334457","Cats Life","DSC_8123_thumb.jpg",130,86,32);thumbnails[5943395]=new thumbnail(5943395,"334457","Hani 2","DSC_8240_thumb.jpg",130,84,32);thumbnails[5943389]=new thumbnail(5943389,"334457","Hani","DSC_8316_thumb.jpg",130,75,32);thumbnails[5943402]=new thumbnail(5943402,"334457","Hani 3","DSC_8258-2_thumb.jpg",130,87,32);thumbnails[5937198]=new thumbnail(5937198,"334457","Fern 2","DSC_8234-2_thumb.jpg",130,195,32);thumbnails[5937164]=new thumbnail(5937164,"334457","Silas","DSC_8226-2_thumb.jpg",130,179,32);thumbnails[5926574]=new thumbnail(5926574,"334457","The Chase","DSC_7643-2_thumb.jpg",130,91,32);thumbnails[5926588]=new thumbnail(5926588,"334457","","DSC_7706-2_thumb.jpg",130,84,32);thumbnails[5926585]=new thumbnail(5926585,"334457","","DSC_7679-2_thumb.jpg",130,207,32);thumbnails[5926587]=new thumbnail(5926587,"334457","Bliss","DSC_7697_thumb.jpg",130,76,32);thumbnails[5926578]=new thumbnail(5926578,"334457","Hounds","DSC_7662_thumb.jpg",130,176,32);thumbnails[5926591]=new thumbnail(5926591,"334457","","DSC_8046_thumb.jpg",130,86,32);thumbnails[5926589]=new thumbnail(5926589,"334457","","DSC_8031_thumb.jpg",130,195,32);thumbnails[5926592]=new thumbnail(5926592,"334457","","DSC_8049_thumb.jpg",130,138,32);thumbnails[5926596]=new thumbnail(5926596,"334457","","DSC_8087_thumb.jpg",130,89,32);thumbnails[5926590]=new thumbnail(5926590,"334457","","DSC_8035_thumb.jpg",130,93,32);thumbnails[5926598]=new thumbnail(5926598,"334457","","DSC_8093_thumb.jpg",130,139,32);thumbnails[5926599]=new thumbnail(5926599,"334457","","DSC_8106_thumb.jpg",130,55,32);thumbnails[5939071]=new thumbnail(5939071,"203411","","wildlife_thumb.jpg",130,86,32);thumbnails[5937149]=new thumbnail(5937149,"203411","Blossoming","DSC_8127_thumb.jpg",130,86,32);thumbnails[5939049]=new thumbnail(5939049,"203411","","DSC_8147_thumb.jpg",130,86,32);thumbnails[5939051]=new thumbnail(5939051,"203411","Floating Flowers","DSC_8185_thumb.jpg",130,83,32);thumbnails[4035903]=new thumbnail(4035903,"203411","Cows on Haroldston","Cows_on_Haroldston_thumb.jpg",130,79,32);thumbnails[4035845]=new thumbnail(4035845,"203411","Bee on Haroldston","Bee_on_Haroldston_thumb.jpg",130,78,32);thumbnails[4036107]=new thumbnail(4036107,"203411","Piggy Pillow","Piggy_Pillow_thumb.jpg",130,56,32);thumbnails[4035955]=new thumbnail(4035955,"203411","Spot the Difference","DSC_0594_thumb.jpg",130,84,32);thumbnails[4036004]=new thumbnail(4036004,"203411","Leemur","DSC_0656_thumb.jpg",130,105,32);thumbnails[5939067]=new thumbnail(5939067,"203412","","human_thumb.jpg",130,89,32);thumbnails[4035836]=new thumbnail(4035836,"203412","Dance at Dusk","Dance_at_Dusk_thumb.jpg",130,89,32);thumbnails[5544986]=new thumbnail(5544986,"203412","","DSC_7566_small_small_thumb.jpg",130,142,32);thumbnails[5544963]=new thumbnail(5544963,"203412","","DSC_7562-2_small_small_thumb.jpg",130,166,32);thumbnails[5926612]=new thumbnail(5926612,"203412","Babyfaced","DSC_7550_thumb.jpg",130,86,32);thumbnails[4035839]=new thumbnail(4035839,"203412","Smelling the Roses","Profile_7_thumb.jpg",130,86,32);thumbnails[5544953]=new thumbnail(5544953,"203412","","DSC_7582_small_small_thumb.jpg",130,86,32);thumbnails[4035840]=new thumbnail(4035840,"203412","Cherub","Profile_8_thumb.jpg",130,86,32);thumbnails[4035841]=new thumbnail(4035841,"203412","Modelled by Gareth Ogden","Profile_9_thumb.jpg",130,86,32);thumbnails[5068763]=new thumbnail(5068763,"203412","Danni Monroe - The Dirty Youth","DSC_7856-2_thumb.jpg",130,86,32);thumbnails[5926616]=new thumbnail(5926616,"203412","Danni - The Dirty Youth","DSC_8004_thumb.jpg",130,97,32);thumbnails[5926614]=new thumbnail(5926614,"203412","Danni - The Dirty Youth","DSC_7817_thumb.jpg",130,194,32);thumbnails[5939061]=new thumbnail(5939061,"286745","","dance_thumb.jpg",130,84,32);thumbnails[5068325]=new thumbnail(5068325,"286745","","DSC_8505-2_thumb.jpg",130,84,32);thumbnails[5068324]=new thumbnail(5068324,"286745","","DSC_8492-2_thumb.jpg",130,81,32);thumbnails[5068321]=new thumbnail(5068321,"286745","","DSC_8477-2_thumb.jpg",130,86,32);thumbnails[5068320]=new thumbnail(5068320,"286745","","DSC_8423-2_thumb.jpg",130,91,32);thumbnails[5068319]=new thumbnail(5068319,"286745","","DSC_8419-2-2_thumb.jpg",130,95,32);thumbnails[5068318]=new thumbnail(5068318,"286745","","DSC_8418-2-2_thumb.jpg",130,102,32);thumbnails[5068322]=new thumbnail(5068322,"286745","","DSC_8480-2-2_thumb.jpg",130,86,32);thumbnails[5068337]=new thumbnail(5068337,"286745","","DSC_8740-2-2_thumb.jpg",130,82,32);thumbnails[5068136]=new thumbnail(5068136,"286745","","DSC_8716-2_thumb.jpg",130,58,32);thumbnails[5068332]=new thumbnail(5068332,"286745","","DSC_8666-2_thumb.jpg",130,153,32);thumbnails[5068331]=new thumbnail(5068331,"286745","","DSC_8664-2_thumb.jpg",130,99,32);thumbnails[5068326]=new thumbnail(5068326,"286745","","DSC_8600-2_thumb.jpg",130,86,32);thumbnails[5939068]=new thumbnail(5939068,"203409","","landscape_thumb.jpg",130,86,32);thumbnails[5937120]=new thumbnail(5937120,"203409","Hilton Court","DSC_8168_thumb.jpg",130,86,32);thumbnails[5937206]=new thumbnail(5937206,"203409","Hilton Lake 3","DSC_8177_thumb.jpg",130,86,32);thumbnails[5937152]=new thumbnail(5937152,"203409","Hilton Court 2","DSC_8171_thumb.jpg",130,86,32);thumbnails[5937203]=new thumbnail(5937203,"203409","Hilton Lake 2","DSC_8179_thumb.jpg",130,200,32);thumbnails[5937161]=new thumbnail(5937161,"203409","Hilton Lake","DSC_8186_thumb.jpg",130,195,32);thumbnails[5937194]=new thumbnail(5937194,"203409","Haroldston Chins","DSC_8208_thumb.jpg",130,86,32);thumbnails[4035724]=new thumbnail(4035724,"203409","View from Haroldston","View_from_Haroldston_thumb.jpg",130,195,32);thumbnails[4035707]=new thumbnail(4035707,"203409","Overlooking Druidstone","Overlooking_Druidston_thumb.jpg",130,78,32);thumbnails[4035704]=new thumbnail(4035704,"203409","From Wooltack Point","From_Wooltack_Point_thumb.jpg",130,86,32);thumbnails[4035705]=new thumbnail(4035705,"203409","A Portrait of Wooltack Point","From_Wooltack_Point_-_a_Portrait_thumb.jpg",130,195,32);thumbnails[4035682]=new thumbnail(4035682,"203409","From Broad Haven","From_Broad_Haven_thumb.jpg",130,86,32);thumbnails[4035702]=new thumbnail(4035702,"203409","From Druidstone","From_Druidstone_thumb.jpg",130,74,32);thumbnails[4035715]=new thumbnail(4035715,"203409","Sunlit Waves","Sunlit_Waves_thumb.jpg",130,49,32);thumbnails[4035670]=new thumbnail(4035670,"203409","Druidstone Stones","Druidstone_Stones_thumb.jpg",130,86,32);thumbnails[4035732]=new thumbnail(4035732,"203409","Waves at Nolton Haven","Waves_on_Nolton_Haven_thumb.jpg",130,72,32);thumbnails[4035668]=new thumbnail(4035668,"203409","Broad Haven Waves","Broad_Haven_Waves_thumb.jpg",130,69,32);thumbnails[4035727]=new thumbnail(4035727,"203409","Waves at Whitesands","Waves_at_Whitesands_thumb.jpg",130,80,32);thumbnails[4035672]=new thumbnail(4035672,"203409","A Broad Haven View","A_Broad_Haven_View_thumb.jpg",130,86,32);thumbnails[4035717]=new thumbnail(4035717,"203409","Sunsky","Sunsky_thumb.jpg",130,84,32);thumbnails[4035714]=new thumbnail(4035714,"203409","Sundown on Broad Haven","Sundown_thumb.jpg",130,56,32);thumbnails[4035843]=new thumbnail(4035843,"203409","A Rocky Road","A_Rocky_Road_thumb.jpg",130,287,32);thumbnails[4035706]=new thumbnail(4035706,"203409","Houses of Skokholm","Houses_of_Skokholm_thumb.jpg",130,65,32);var galleries=new Object();galleries[229249]=new gallery(229249,"5939060","Avian","gallery",[5939060,4039314,4039320,5926567,5926568,5926571,4039256,4039263,4039258,4039260,4039323]);galleries[243280]=new gallery(243280,"5939066","Equestrian","gallery",[5939066,5068764,5068759,5068741,4035832,5926603,5926604,5926607,5926602,5926601,4035835]);galleries[334457]=new gallery(334457,"5939069","Pets","gallery",[5939069,5937190,5937196,5943395,5943389,5943402,5937198,5937164,5926574,5926588,5926585,5926587,5926578,5926591,5926589,5926592,5926596,5926590,5926598,5926599]);galleries[203411]=new gallery(203411,"5939071","Wildlife","gallery",[5939071,5937149,5939049,5939051,4035903,4035845,4036107,4035955,4036004]);galleries[203412]=new gallery(203412,"5939067","Human","gallery",[5939067,4035836,5544986,5544963,5926612,4035839,5544953,4035840,4035841,5068763,5926616,5926614]);galleries[286745]=new gallery(286745,"5939061","Dance","gallery",[5939061,5068325,5068324,5068321,5068320,5068319,5068318,5068322,5068337,5068136,5068332,5068331,5068326]);galleries[203409]=new gallery(203409,"5939068","Landscape","gallery",[5939068,5937120,5937206,5937152,5937203,5937161,5937194,4035724,4035707,4035704,4035705,4035682,4035702,4035715,4035670,4035732,4035668,4035727,4035672,4035717,4035714,4035843,4035706]);var imageSets=new Object();imageSets[1]="5937190,5937149,5937120,5068764,5068325,4039314,4035836";imageSets[2]="5939071,5939069,5939068,5939067,5939066,5939061,5939060";imageSets[3]="5943389,5937190,5937149,5937120,5068764,5068325,5068324,4039314,4035839,4035836,4035702";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/abbiejebsonphotography/images";break}switch(a){case 1:b="http://www1.clikpic.com/abbiejebsonphotography/images";break}switch(a){case 2:b="http://admin.clikpic.com/abbiejebsonphotography/images";break}switch(a){case 24:b="http://tpc15/clikpic/abbiejebsonphotography/images";break}switch(a){case 4:b="http://www.clikchurch.com/abbiejebsonphotography/images";break}switch(a){case 5:b="http://www2.clikpic.com/abbiejebsonphotography/images";break}switch(a){case 22:b="http://tpc5/clikpic/abbiejebsonphotography/images";break}switch(a){case 23:b="http://tpc10/clikpic/abbiejebsonphotography/images";break}switch(a){case 25:b="http://tpc16/clikpic/abbiejebsonphotography/images";break}switch(a){case 15:b="http://www3.clikpic.com/abbiejebsonphotography/images";break}switch(a){case 18:b="http://www4.clikpic.com/abbiejebsonphotography/images";break}switch(a){case 19:b="http://www5.clikpic.com/abbiejebsonphotography/images";break}switch(a){case 31:b="http://www7.clikpic.com/abbiejebsonphotography/images";break}switch(a){case 32:b="http://admin2.clikpic.com/abbiejebsonphotography/images";break}switch(a){case 33:b="http://www8.clikpic.com/abbiejebsonphotography/images";break}switch(a){case 34:b="http://www9.clikpic.com/abbiejebsonphotography/images";break}switch(a){case 35:b="http://admin3.clikpic.com/abbiejebsonphotography/images";break}switch(a){case 37:b="http://admin4.clikpic.com/abbiejebsonphotography/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="Abbie Jebson 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;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>"}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="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+'<form id="paymentForm" style="margin:0px;border:0px;" name="paymentForm" target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">';b=b+'<input type="hidden" name="item_name" value="'+e+'">';ref="";if(c.photo_ref!=""){ref=c.photo_ref+" - "+c.caption}else{ref=c.id+" - "+c.caption}price=d;b=b+'<input type="hidden" name="cmd" value="_cart">';b=b+'<input type="hidden" name="business" value="minijebo@hotmail.com">';b=b+'<input type="hidden" name="currency_code" value="GBP">';b=b+'<input type="hidden" name="add" value="1">';b=b+'<input type="hidden" name="amount" value="'+d+'">';b=b+'<input type="hidden" name="item_number" value="'+ref+'">';b=b+'<input type="Submit" value="Add to cart" id="paymentAddButton" class="button" onmouseover="this.className=\'buttonHi\';" onmouseout="this.className=\'button\';">';b=b+"</form>";b=b+'<form id="paymentCartForm" style="margin:0px;" name="paymentCartForm" target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">';b=b+'<input type="hidden" name="cmd" value="_cart">';b=b+'<input type="hidden" name="business" value="minijebo@hotmail.com">';b=b+'<input type="hidden" name="display" value="1">';b=b+'<input type="Submit" value="View cart" id="paymentViewButton" class="button" onmouseover="this.className=\'buttonHi\';" onmouseout="this.className=\'button\';">';b=b+"</form>";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 e=$("img#gallery"+c);e.parents(".thumbWrap").width(b.width);var a=e.siblings("h3").size()==1?e.siblings("h3"):e.parent(".thumbWrap").siblings("h3");var f=parseInt(a.css("padding-left"))+parseInt(a.css("padding-right"));var d=parseInt(a.css("border-left-width"))+parseInt(a.css("border-right-width"));a.width(e.outerWidth(true)-f-d)}}}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+'")'})}}};