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[2049425]=new thumbnail(2049425,"","Andy Sykes Head Shot","Head low res 1_thumb.jpg",130,163,15);thumbnails[2049426]=new thumbnail(2049426,"","Rachel T Headshot","Head low res 2_thumb.jpg",130,163,15);thumbnails[2049427]=new thumbnail(2049427,"","Rachel T Head Shot No.2","Head low res 3_thumb.jpg",130,163,15);thumbnails[2049428]=new thumbnail(2049428,"","Jessica Marshall Head Shot","Head low res 4_thumb.jpg",130,163,15);thumbnails[1755412]=new thumbnail(1755412,"","Karima Francis","Performing Arts 5_thumb.jpg",130,195,15);thumbnails[2049430]=new thumbnail(2049430,"","Michelle Scally-Clarke","Head low res 6_thumb.jpg",130,163,15);thumbnails[1755415]=new thumbnail(1755415,"","Karima Francis","Performing Arts 17_thumb.jpg",130,195,15);thumbnails[2049433]=new thumbnail(2049433,"","Natalie N Head Shot","Head low res 8_thumb.jpg",130,163,15);thumbnails[2049441]=new thumbnail(2049441,"","Marqus Head Shot","LS7 Head Low 1_thumb.jpg",130,163,15);thumbnails[2049442]=new thumbnail(2049442,"","LS7 Head Shot","Head low res 5_thumb.jpg",130,163,15);thumbnails[1755419]=new thumbnail(1755419,"","Karen on the Pole, No. 1","Performing Arts 20_thumb.jpg",130,87,15);thumbnails[1755422]=new thumbnail(1755422,"","Karen on the Pole, No. 2","Performing Arts 23_thumb.jpg",130,87,15);thumbnails[1755717]=new thumbnail(1755717,"","Fairy tales from the Street No.1","Performing Arts 7_thumb.jpg",130,87,15);thumbnails[1755718]=new thumbnail(1755718,"","Fairytales from the streets, No. 2","Performing Arts 10_thumb.jpg",130,87,15);thumbnails[1755721]=new thumbnail(1755721,"","Fairy tales from the streets, No. 3","Performing Arts 11_thumb.jpg",130,87,15);thumbnails[1755722]=new thumbnail(1755722,"","Fairy tales from the streets, No.4","Performing Arts 13_thumb.jpg",130,86,15);thumbnails[2065183]=new thumbnail(2065183,"","Vicci Hamilton","Vicci Headshots3_LR_thumb.jpg",130,163,15);thumbnails[2065195]=new thumbnail(2065195,"","Yara Deserbelles","Yara Headshot_thumb.jpg",130,163,15);thumbnails[1778083]=new thumbnail(1778083,"","Sarah McCann","Sarah McCann Low Res 2_thumb.jpg",130,86,15);thumbnails[1778087]=new thumbnail(1778087,"","Sarah McCann No.2","Sarah McCann Low Res 1_thumb.jpg",130,196,15);thumbnails[3293467]=new thumbnail(3293467,"117817","","DM_1_thumb.jpg",130,195,15);thumbnails[3293471]=new thumbnail(3293471,"117817","","DM_2_thumb.jpg",130,195,15);thumbnails[3293474]=new thumbnail(3293474,"117817","","DM_3_thumb.jpg",130,195,15);thumbnails[3293479]=new thumbnail(3293479,"117817","","DM_4_thumb.jpg",130,194,15);thumbnails[3293484]=new thumbnail(3293484,"117817","","DM_5_thumb.jpg",130,87,15);thumbnails[3293746]=new thumbnail(3293746,"117817","","DM_6_thumb.jpg",130,87,15);thumbnails[3293748]=new thumbnail(3293748,"117817","","DM_7_thumb.jpg",130,195,15);thumbnails[3293751]=new thumbnail(3293751,"117817","","DM_8_thumb.jpg",130,195,15);thumbnails[3293848]=new thumbnail(3293848,"117817","","IMG_7858_EDIT_thumb.jpg",130,86,15);thumbnails[3293850]=new thumbnail(3293850,"117817","","IMG_7941_EDIT_thumb.jpg",130,83,15);thumbnails[3293854]=new thumbnail(3293854,"117817","","IMG_8021_EDIT_thumb.jpg",130,87,15);thumbnails[3293861]=new thumbnail(3293861,"117817","","IMG_8136_EDIT_thumb.jpg",130,87,15);thumbnails[3293862]=new thumbnail(3293862,"117817","","IMG_8153_EDIT_thumb.jpg",130,87,15);thumbnails[3293864]=new thumbnail(3293864,"117817","","IMG_8225_EDIT_thumb.jpg",130,87,15);thumbnails[3293881]=new thumbnail(3293881,"117817","","IMG_8267_EDIT_thumb.jpg",130,87,15);thumbnails[3293883]=new thumbnail(3293883,"117817","","IMG_8315_EDIT_thumb.jpg",130,87,15);thumbnails[3293965]=new thumbnail(3293965,"117817","","M&C Friday LOWRES 7_thumb.jpg",130,87,15);thumbnails[3293967]=new thumbnail(3293967,"117817","","M&C Friday LOWRES 3_thumb.jpg",130,195,15);thumbnails[3293971]=new thumbnail(3293971,"117817","","M&C Friday LOWRES 5_thumb.jpg",130,86,15);thumbnails[3293977]=new thumbnail(3293977,"117817","","M&C Friday LOWRES 6_thumb.jpg",130,86,15);thumbnails[3294030]=new thumbnail(3294030,"117817","","A-Z 27_thumb.jpg",130,196,15);thumbnails[3294035]=new thumbnail(3294035,"117817","","A-Z 51_thumb.jpg",130,196,15);thumbnails[3294038]=new thumbnail(3294038,"117817","","A-Z 1041_thumb.jpg",130,196,15);thumbnails[3294044]=new thumbnail(3294044,"117817","","A-Z 1441_thumb.jpg",130,196,15);thumbnails[5255810]=new thumbnail(5255810,"117817","","IMG_0296_-_Version_2_LOW_thumb.jpg",130,86,15);thumbnails[5255815]=new thumbnail(5255815,"117817","","IMG_0395_LOW_thumb.jpg",130,85,15);thumbnails[5255816]=new thumbnail(5255816,"117817","","IMG_0364_LOW_thumb.jpg",130,86,15);thumbnails[5255817]=new thumbnail(5255817,"117817","","IMG_0387_LOW_thumb.jpg",130,86,15);thumbnails[5255818]=new thumbnail(5255818,"117817","","Bridge__2_LR_thumb.jpg",130,195,15);thumbnails[5255819]=new thumbnail(5255819,"117817","","IMG_7072_LR_thumb.jpg",130,195,15);thumbnails[5255820]=new thumbnail(5255820,"117817","","Group_Shots__15_LR_thumb.jpg",130,87,15);thumbnails[5255821]=new thumbnail(5255821,"117817","","Group_Shots__33_LR_thumb.jpg",130,86,15);thumbnails[2108617]=new thumbnail(2108617,"140332","Jacob, caught in the act","B&W_Candid_Meal_Speaches 163_thumb.jpg",130,87,15);thumbnails[2108620]=new thumbnail(2108620,"140332","Hide and Seek with Lilly","B&W_Candid_Meal_Speaches 160_thumb.jpg",130,87,15);thumbnails[2108621]=new thumbnail(2108621,"140332","Wow, don't Mum & Dad look good ....","B&W_Candid_Meal_Speaches 168_thumb.jpg",130,87,15);thumbnails[2108622]=new thumbnail(2108622,"140332","... tired ...","B&W_Candid_Meal_Speaches 141_thumb.jpg",130,87,15);thumbnails[2108623]=new thumbnail(2108623,"140332","The Candid Bride","B&W_Candid_Meal_Speaches 143_thumb.jpg",130,87,15);thumbnails[2108624]=new thumbnail(2108624,"140332","Candid Groom and Son","B&W_Candid_Meal_Speaches 34_thumb.jpg",130,87,15);thumbnails[2108625]=new thumbnail(2108625,"140332","Candid Bride No.2","B&W_Candid_Meal_Speaches 49_thumb.jpg",130,87,15);thumbnails[2108627]=new thumbnail(2108627,"140332","Candid Groom & Usher","B&W_Candid_Meal_Speaches 52_thumb.jpg",130,87,15);thumbnails[2108615]=new thumbnail(2108615,"140332","Cardoza Candids no.1","B&W_Candid_Meal_Speaches 1_thumb.jpg",130,87,15);thumbnails[2108630]=new thumbnail(2108630,"140332","Wedding Breakfast Arrivals","B&W_Candid_Meal_Speaches 16_thumb.jpg",130,87,15);thumbnails[2108631]=new thumbnail(2108631,"140332","The guests no. 1","B&W_Candid_Meal_Speaches 45_thumb.jpg",130,87,15);thumbnails[2108632]=new thumbnail(2108632,"140332","The guests no.2","B&W_Candid_Meal_Speaches 68_thumb.jpg",130,87,15);thumbnails[2108634]=new thumbnail(2108634,"140332","The Guests No.3","B&W_Candid_Meal_Speaches 78_thumb.jpg",130,87,15);thumbnails[2108635]=new thumbnail(2108635,"140332","Guests No.4","B&W_Candid_Meal_Speaches 102_thumb.jpg",130,87,15);thumbnails[2108636]=new thumbnail(2108636,"140332","Anticipation of Speeches ","B&W_Candid_Meal_Speaches 105_thumb.jpg",130,195,15);thumbnails[2108637]=new thumbnail(2108637,"140332","Father of the bride in deep contemplation ","B&W_Candid_Meal_Speaches 110_thumb.jpg",130,195,15);thumbnails[2108642]=new thumbnail(2108642,"140332","Thirsty ?","B&W_Candid_Meal_Speaches 97_thumb.jpg",130,87,15);thumbnails[2108643]=new thumbnail(2108643,"140332","Best Man","B&W_Candid_Meal_Speaches 129_thumb.jpg",130,195,15);thumbnails[2108644]=new thumbnail(2108644,"140332","Groom","B&W_Candid_Meal_Speaches 134_thumb.jpg",130,195,15);thumbnails[2108645]=new thumbnail(2108645,"140332","... thanks.","B&W_Candid_Meal_Speaches 137_thumb.jpg",130,87,15);thumbnails[2108646]=new thumbnail(2108646,"140332","First Dance & Guests","B&W_Cake_Dance 15_thumb.jpg",130,87,15);thumbnails[1760178]=new thumbnail(1760178,"117918","","Lia_on_fire_by_JosephDirtySoapStory_thumb.jpg",130,196,15);thumbnails[1760164]=new thumbnail(1760164,"117918","","Charlie_in_the_printworks2_by_JosephDirtySoapStory_thumb.jpg",130,195,15);thumbnails[1760175]=new thumbnail(1760175,"117918","","Dee_Dee_by_JosephDirtySoapStory_thumb.jpg",130,194,15);thumbnails[1760180]=new thumbnail(1760180,"117918","","Pink_Shawl_by_JosephDirtySoapStory-1_thumb.jpg",130,196,15);thumbnails[1851981]=new thumbnail(1851981,"117918","Rajan Imports PLC","Rajan B&W Day 1 21_thumb.jpg",130,196,15);thumbnails[1851983]=new thumbnail(1851983,"117918","Rajan Imports PLC no. 2","Rajan B&W Day 1 59_thumb.jpg",130,196,15);thumbnails[1851986]=new thumbnail(1851986,"117918","Rajan Imports PLC no.3","Rajan Colour Day 1 71_thumb.jpg",130,196,15);thumbnails[1851987]=new thumbnail(1851987,"117918","Rajan Imports PLC No.4","Rajan Colour Day 2 79_thumb.jpg",130,196,15);thumbnails[2052646]=new thumbnail(2052646,"117918","Circle Club Manchester No.1","Circle Toilets 3_LOWRES_thumb.jpg",130,195,15);thumbnails[2052648]=new thumbnail(2052648,"117918","Circle Club No.2","Circle Toilets 1_LOWRES_thumb.jpg",130,195,15);thumbnails[2052653]=new thumbnail(2052653,"117918","Lord Laurence","Lord & Lady 4_LOWRES_thumb.jpg",130,196,15);thumbnails[2052659]=new thumbnail(2052659,"117918","Madeline in Derbyshire","Mad by Joseph 7_LOWRES_thumb.jpg",130,196,15);thumbnails[2052660]=new thumbnail(2052660,"117918","Isabella in Orange","Isabella in Orange 1_LR_thumb.jpg",130,196,15);thumbnails[2052662]=new thumbnail(2052662,"117918","Natalie N","NN Blue 3_LOWRES1_thumb.jpg",130,195,15);thumbnails[2052664]=new thumbnail(2052664,"117918","Natalie N Knitwear","NN_Roof 7_lowres_thumb.jpg",130,194,15);thumbnails[2052665]=new thumbnail(2052665,"117918","Sophie in Shirt","Shirt 10_LR_thumb.jpg",130,196,15);thumbnails[1760239]=new thumbnail(1760239,"117917","Marqus Roars","Marqus_Romelle_by_JosephDirtySoapStory_thumb.jpg",130,87,15);thumbnails[2035822]=new thumbnail(2035822,"117917","Lola Pop","Lola Braces 4_WWP_versionLR_thumb.jpg",130,88,15);thumbnails[1755749]=new thumbnail(1755749,"117917","Stacey's Eyes","Staceys_Eyes_by_JosephDirtySoapStory_thumb.jpg",130,82,15);thumbnails[1755750]=new thumbnail(1755750,"117917","Lanie on the bed","Lanie_on_the_bed_by_JosephDirtySoapStory_thumb.jpg",130,87,15);thumbnails[1961672]=new thumbnail(1961672,"117917","60's Jess No. 1","Jess 60s 1_LR_thumb.jpg",130,195,15);thumbnails[1961679]=new thumbnail(1961679,"117917","60's Jess No.2","Jess 60s 3 2LR_thumb.jpg",130,197,15);thumbnails[1961683]=new thumbnail(1961683,"117917","Rachel T Portrait No. 1","Rachel T Portrait_LR_thumb.jpg",130,196,15);thumbnails[1961686]=new thumbnail(1961686,"117917","Rachel T Portrait No. 2","Rachel T Portrait 2_LR_thumb.jpg",130,195,15);thumbnails[2035826]=new thumbnail(2035826,"117917","Oye O: Suited and Booted","Oye Suited and Booted_LOWRES_thumb.jpg",130,196,15);thumbnails[2035828]=new thumbnail(2035828,"117917","Oye O","Oye Edits 6_LOWRES_thumb.jpg",130,196,15);thumbnails[1755788]=new thumbnail(1755788,"117917","Isabella in Orange","Portraits 3_thumb.jpg",130,195,15);thumbnails[2021147]=new thumbnail(2021147,"117917","Natalie Nichols DK Models","NN B&W Hair 3_LOWRES_thumb.jpg",130,200,15);thumbnails[2035904]=new thumbnail(2035904,"117917","Gemma Gleeson","Gleeson 'Tarting Around' 5_LR_thumb.jpg",130,196,15);thumbnails[2035913]=new thumbnail(2035913,"117917","LS7 Results Cast Portraits","IMG_2233_LOWRES_thumb.jpg",130,195,15);thumbnails[2035923]=new thumbnail(2035923,"117917","LS7 Results Cast Portraits","IMG_2287_LOWRES_thumb.jpg",130,196,15);thumbnails[2035994]=new thumbnail(2035994,"117917","Adrian Stretton","1st Look AS 7_LR_thumb.jpg",130,195,15);var galleries=new Object();galleries[117817]=new gallery(117817,"3293467","Wedding Photography","gallery",[3293467,3293471,3293474,3293479,3293484,3293746,3293748,3293751,3293848,3293850,3293854,3293861,3293862,3293864,3293881,3293883,3293965,3293967,3293971,3293977,3294030,3294035,3294038,3294044,5255810,5255815,5255816,5255817,5255818,5255819,5255820,5255821]);galleries[140332]=new gallery(140332,"2108637","Candid Wedding Photography","gallery",[2108617,2108620,2108621,2108622,2108623,2108624,2108625,2108627,2108615,2108630,2108631,2108632,2108634,2108635,2108636,2108637,2108642,2108643,2108644,2108645,2108646]);galleries[117918]=new gallery(117918,"1760164","Commercial Fashion","gallery",[1760178,1760164,1760175,1760180,1851981,1851983,1851986,1851987,2052646,2052648,2052653,2052659,2052660,2052662,2052664,2052665]);galleries[117917]=new gallery(117917,"1961683","Portrait","gallery",[1760239,2035822,1755749,1755750,1961672,1961679,1961683,1961686,2035826,2035828,1755788,2021147,2035904,2035913,2035923,2035994]);var imageSets=new Object();imageSets[1]="3293977";imageSets[2]="3293467,2108637,2049425,1961683,1760164,1755415";imageSets[3]="5255821,5255820,5255819,5255818,5255817,5255816,5255815,5255810,3294044,3294038,3294035,3294030,3293977,3293971,3293967,3293965,3293883,3293881,3293864,3293862,3293861,3293854,3293850,3293848,3293751,3293748,3293746,3293484,3293479,3293474,3293471,3293467,2108646,2108645,2108644,2108643,2108642,2108637,2108636,2108635,2108634,2108632,2108631,2108630,2108627,2108625,2108624,2108623,2108622,2108621";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/JStory/images";break}switch(a){case 1:b="http://www1.clikpic.com/JStory/images";break}switch(a){case 2:b="http://admin.clikpic.com/JStory/images";break}switch(a){case 4:b="http://www.clikchurch.com/JStory/images";break}switch(a){case 5:b="http://www2.clikpic.com/JStory/images";break}switch(a){case 15:b="http://www3.clikpic.com/JStory/images";break}switch(a){case 21:b="http://www6.clikpic.com/JStory/images";break}switch(a){case 18:b="http://www4.clikpic.com/JStory/images";break}switch(a){case 19:b="http://www5.clikpic.com/JStory/images";break}switch(a){case 22:b="http://tpc5/clikpic/JStory/images";break}switch(a){case 23:b="http://tpc10/clikpic/JStory/images";break}switch(a){case 24:b="http://tpc15/clikpic/JStory/images";break}switch(a){case 25:b="http://tpc16/clikpic/JStory/images";break}switch(a){case 31:b="http://www7.clikpic.com/JStory/images";break}switch(a){case 32:b="http://admin2.clikpic.com/JStory/images";break}switch(a){case 33:b="http://www8.clikpic.com/JStory/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="Joseph Story Commercial 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>"}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+'")'})}}};