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[2999288]=new thumbnail(2999288,"","","Vivien 010 SC comp_thumb.jpg",130,173,5);thumbnails[5269571]=new thumbnail(5269571,"","","sarah_thumb.jpg",130,173,5);thumbnails[5801190]=new thumbnail(5801190,"","","Copy_of_Erin_060_proc_sc_thumb.jpg",130,87,5);thumbnails[2749152]=new thumbnail(2749152,"172271","","Child portrait C 8x12 SC2_thumb.jpg",130,87,5);thumbnails[2749155]=new thumbnail(2749155,"172271","","Child Portrait B 8x12 SC_thumb.jpg",130,195,5);thumbnails[3310710]=new thumbnail(3310710,"172271","","Adam_thumb.jpg",130,195,5);thumbnails[3310719]=new thumbnail(3310719,"172271","","Jake_thumb.jpg",130,195,5);thumbnails[3310936]=new thumbnail(3310936,"172271","","Dylan 7 proc 5x7 SC_thumb.jpg",130,182,5);thumbnails[4179810]=new thumbnail(4179810,"172271","","28Mar09058_proc_BW_SC_thumb.jpg",130,87,5);thumbnails[5182921]=new thumbnail(5182921,"172271","","Copy_of_28Jun09015_proc_SC_comp_thumb.jpg",130,195,5);thumbnails[5182976]=new thumbnail(5182976,"172271","","Rhys001_SC_thumb.jpg",130,182,5);thumbnails[5182978]=new thumbnail(5182978,"172271","","Rhys004_SC_thumb.jpg",130,93,5);thumbnails[5267112]=new thumbnail(5267112,"172271","","Cynthia027_proc_SC_72dpi_thumb.jpg",130,130,5);thumbnails[5267113]=new thumbnail(5267113,"172271","","Cynthia046_proc_BW_SC_72dpi_thumb.jpg",130,87,5);thumbnails[5323977]=new thumbnail(5323977,"172271","","021_SC_thumb.jpg",130,173,5);thumbnails[5635258]=new thumbnail(5635258,"172271","","Lucy029_proc_sc_thumb.jpg",130,87,5);thumbnails[5635261]=new thumbnail(5635261,"172271","","Lucy043_proc_BW_sc_thumb.jpg",130,195,5);thumbnails[5801157]=new thumbnail(5801157,"172271","","Rory_040_proc_touched_up_thumb.jpg",130,87,5);thumbnails[5801158]=new thumbnail(5801158,"172271","","Rory_043_proc_BW_blue_star_thumb.jpg",130,87,5);thumbnails[6138223]=new thumbnail(6138223,"172271","","Lucan_007_FINAL_seaweed_comp_sc_thumb.jpg",130,74,5);thumbnails[6138224]=new thumbnail(6138224,"172271","","Lucan_008_FINAL_high_key_BW_comp_sc_thumb.jpg",130,87,5);thumbnails[2749151]=new thumbnail(2749151,"172271","","Child portrait monochrome SC2_thumb.jpg",130,93,5);thumbnails[4179805]=new thumbnail(4179805,"296490","","28Mar09014_proc_SC_thumb.jpg",130,98,5);thumbnails[4179806]=new thumbnail(4179806,"296490","","28Mar09028_proc_BW_SC_thumb.jpg",130,87,5);thumbnails[4179807]=new thumbnail(4179807,"296490","","28Mar09031_proc_SC_thumb.jpg",130,98,5);thumbnails[4179809]=new thumbnail(4179809,"296490","","28Mar09079_proc_SC_thumb.jpg",130,195,5);thumbnails[5182929]=new thumbnail(5182929,"296490","","Copy_of_28Jun09023_proc_SC_comp_thumb.jpg",130,195,5);thumbnails[5323979]=new thumbnail(5323979,"296490","","006_SC_thumb.jpg",130,173,5);thumbnails[5323980]=new thumbnail(5323980,"296490","","029_SC_thumb.jpg",130,98,5);thumbnails[5635264]=new thumbnail(5635264,"296490","","Fi_004_proc_comp_SCv2_thumb.jpg",130,195,5);thumbnails[5635268]=new thumbnail(5635268,"296490","","Copy_of_Fi_001_proc_comp_sc_thumb.jpg",130,87,5);thumbnails[5801168]=new thumbnail(5801168,"296490","","Copy_of_Fi_Apr2010_007_proc_sc_thumb.jpg",130,87,5);thumbnails[6138216]=new thumbnail(6138216,"296490","","HarryRuby_005_proc_pp_comp_sc_thumb.jpg",130,87,5);thumbnails[6138217]=new thumbnail(6138217,"296490","","HarryRuby_006_proc_pp_comp_sc_thumb.jpg",130,87,5);thumbnails[6138218]=new thumbnail(6138218,"296490","","HarryRuby_030_proc_pp_comp_sc_thumb.jpg",130,195,5);thumbnails[2749205]=new thumbnail(2749205,"172272","","Cloisters D 8x12 SC_thumb.jpg",130,195,5);thumbnails[2749233]=new thumbnail(2749233,"172272","","Vivien B 8x12 SC_thumb.jpg",130,195,5);thumbnails[2758554]=new thumbnail(2758554,"172272","","Charlee 035 proc SC_thumb.jpg",130,195,5);thumbnails[2999127]=new thumbnail(2999127,"172272","","Julie007 proc_pp SC_thumb.jpg",130,173,5);thumbnails[2999130]=new thumbnail(2999130,"172272","","Julie016 proc_pp SC_thumb.jpg",130,87,5);thumbnails[3310939]=new thumbnail(3310939,"172272","","Group 2 b colour proc texture SC_thumb.jpg",130,195,5);thumbnails[3310940]=new thumbnail(3310940,"172272","","Group 3 c colour proc SC_thumb.jpg",130,195,5);thumbnails[3310942]=new thumbnail(3310942,"172272","","Group 4 j colour SC_thumb.jpg",130,87,5);thumbnails[3310946]=new thumbnail(3310946,"172272","","Group 6 a  proc SC_thumb.jpg",130,195,5);thumbnails[3533077]=new thumbnail(3533077,"172272","","VivienMono015_SC_thumb.jpg",130,87,5);thumbnails[3533078]=new thumbnail(3533078,"172272","","VivienMono018_pp_SC_thumb.jpg",130,195,5);thumbnails[3533079]=new thumbnail(3533079,"172272","","VivienMono021_proc_pp_SC_thumb.jpg",130,87,5);thumbnails[3533081]=new thumbnail(3533081,"172272","","VivienMono024_proc_SC_thumb.jpg",130,195,5);thumbnails[4074373]=new thumbnail(4074373,"172272","","Sara019_thumb.jpg",130,87,5);thumbnails[4074380]=new thumbnail(4074380,"172272","","Sara026_thumb.jpg",130,195,5);thumbnails[4074381]=new thumbnail(4074381,"172272","","Sara030_thumb.jpg",130,195,5);thumbnails[4474508]=new thumbnail(4474508,"172272","","Laura027_BW_thumb.jpg",130,87,5);thumbnails[3310716]=new thumbnail(3310716,"172272","","Alison_thumb.jpg",130,195,5);thumbnails[2823463]=new thumbnail(2823463,"172272","","Alison 006_pp proc SC comp_thumb.jpg",130,195,5);thumbnails[2749521]=new thumbnail(2749521,"184784","","Beauford 8x12 SC_thumb.jpg",130,87,5);thumbnails[2754127]=new thumbnail(2754127,"184784","","rob 030908 proc SC_thumb.jpg",130,97,5);thumbnails[2754130]=new thumbnail(2754130,"184784","","Viv Rob 003 proc SC_thumb.jpg",130,195,5);thumbnails[2758569]=new thumbnail(2758569,"184784","","Viv Rob 022 proc SC_thumb.jpg",130,195,5);thumbnails[2758570]=new thumbnail(2758570,"184784","","Scott guitar SC_thumb.jpg",130,182,5);thumbnails[2999357]=new thumbnail(2999357,"184784","","Copy of Ainsley final SC_thumb.jpg",130,159,5);thumbnails[3533106]=new thumbnail(3533106,"184784","","namebadge019_processed_rotated_SC_thumb.jpg",130,87,5);thumbnails[4533031]=new thumbnail(4533031,"184784","","WeddingDress002_proc_SC_thumb.jpg",130,195,5);thumbnails[4533034]=new thumbnail(4533034,"184784","","WeddingDress005_proc_SC_thumb.jpg",130,195,5);thumbnails[4533036]=new thumbnail(4533036,"184784","","WeddingDress008_proc_SC_thumb.jpg",130,195,5);thumbnails[5268515]=new thumbnail(5268515,"184784","","Birthday_Bouquet_2_proc_SC_thumb.jpg",130,87,5);thumbnails[5268516]=new thumbnail(5268516,"184784","","Birthday_Bouquet_proc_SC_thumb.jpg",130,195,5);thumbnails[5268536]=new thumbnail(5268536,"184784","","Beauford_3_proc_SC_thumb.jpg",130,87,5);thumbnails[5268538]=new thumbnail(5268538,"184784","","Beauford_7_proc_SC_thumb.jpg",130,87,5);thumbnails[2749385]=new thumbnail(2749385,"172611","Blush","Pink Flower 8x12 SC_thumb.jpg",130,195,5);thumbnails[2749391]=new thumbnail(2749391,"172611","Bunch","Carrots 8x12 SC_thumb.jpg",130,195,5);thumbnails[2749395]=new thumbnail(2749395,"172611","Too many peas?","Peapod Too many peas 8x12 SC_thumb.jpg",130,87,5);thumbnails[2749399]=new thumbnail(2749399,"172611","Red Pepper","Red Pepper on Black 8x12 SC_thumb.jpg",130,87,5);thumbnails[2749422]=new thumbnail(2749422,"172611","On the vine","Vine tomatoes 8x12 SC_thumb.jpg",130,87,5);thumbnails[2749426]=new thumbnail(2749426,"172611","Vivid","Coloured Plates 8x12 SC_thumb.jpg",130,195,5);thumbnails[2782590]=new thumbnail(2782590,"172611","Lily","Lily proc SC_thumb.jpg",130,87,5);thumbnails[3310957]=new thumbnail(3310957,"172611","Autumn","Autumn leaves filmgrain SC_thumb.jpg",130,195,5);thumbnails[3310958]=new thumbnail(3310958,"172611","Blossom","Blossom proc SC_thumb.jpg",130,87,5);thumbnails[3311032]=new thumbnail(3311032,"172611","Cupcake","Cupcake proc SC_thumb.jpg",130,195,5);thumbnails[3311061]=new thumbnail(3311061,"172611","Tulips","Tulip SC comp_thumb.jpg",130,104,5);thumbnails[3311081]=new thumbnail(3311081,"172611","Orchid","Orchid 2 proc SC_thumb.jpg",130,87,5);thumbnails[3311082]=new thumbnail(3311082,"172611","Fork & Knife","Plate 2 proc SC_thumb.jpg",130,130,5);thumbnails[5801177]=new thumbnail(5801177,"172611","Sea of Crayons","Copy_of_28Mar10_041_proc_sc_thumb.jpg",130,87,5);thumbnails[6138227]=new thumbnail(6138227,"172611","Gold","June2010_002_proc_sc_thumb.jpg",130,92,5);thumbnails[6138228]=new thumbnail(6138228,"172611","Killer Heels","June2010_005_proc_sc_thumb.jpg",130,89,5);thumbnails[3310728]=new thumbnail(3310728,"172611","Delicate","Pink Rose proc SC_thumb.jpg",130,195,5);thumbnails[2749387]=new thumbnail(2749387,"172611","Tulips","Tulip Pink 8x12 SC_thumb.jpg",130,196,5);thumbnails[2749392]=new thumbnail(2749392,"172611","Top to Toe","Peapod Top to Toe 8x12 SC_thumb.jpg",130,87,5);thumbnails[2749397]=new thumbnail(2749397,"172611","Pears","Three Pears 8x12 SC_thumb.jpg",130,195,5);thumbnails[2749454]=new thumbnail(2749454,"172618","Kibble Palace, Glasgow","Botanic Gardens 8x12 SC]_thumb.jpg",130,87,5);thumbnails[2749456]=new thumbnail(2749456,"172618","Liverpool docks","Liverpool 8x12 SC_thumb.jpg",130,195,5);thumbnails[2749463]=new thumbnail(2749463,"172618","NYC","Top of the Rock 8x12 SC_thumb.jpg",130,195,5);thumbnails[2749466]=new thumbnail(2749466,"172618","Phuket, Thailand","Thailand 8x12 SC_thumb.jpg",130,87,5);thumbnails[2749470]=new thumbnail(2749470,"172618","Taxi ","New York Taxi 8x10 SC_thumb.jpg",130,104,5);thumbnails[2749512]=new thumbnail(2749512,"172618","Central Park, NYC","Central Park 8x10 SC_thumb.jpg",130,104,5);thumbnails[2749513]=new thumbnail(2749513,"172618","Rouken Glen Park, Glasgow","Rouken Glen 8x12 SC_thumb.jpg",130,195,5);thumbnails[2749514]=new thumbnail(2749514,"172618","Glasgow Cathedral","Glasgow Cathedral 8x12 SC_thumb.jpg",130,190,5);thumbnails[2749552]=new thumbnail(2749552,"172618","Aberdeen Beach","Umbrella 8x12 SC_thumb.jpg",130,195,5);thumbnails[3311049]=new thumbnail(3311049,"172618","Altanta, Georgia","buildings 4 proc SC_thumb.jpg",130,195,5);thumbnails[3311051]=new thumbnail(3311051,"172618","New York City","NY buildings 8x12 SC_thumb.jpg",130,195,5);var galleries=new Object();galleries[172271]=new gallery(172271,"2749155","Babies & Children","gallery",[2749152,2749155,3310710,3310719,3310936,4179810,5182921,5182976,5182978,5267112,5267113,5323977,5635258,5635261,5801157,5801158,6138223,6138224,2749151]);galleries[296490]=new gallery(296490,"4179809","Families","gallery",[4179805,4179806,4179807,4179809,5182929,5323979,5323980,5635264,5635268,5801168,6138216,6138217,6138218]);galleries[172272]=new gallery(172272,"4074380","Fashion & Beauty","gallery",[2749205,2749233,2758554,2999127,2999130,3310939,3310940,3310942,3310946,3533077,3533078,3533079,3533081,4074373,4074380,4074381,4474508,3310716,2823463]);galleries[184784]=new gallery(184784,"5268516","Commercial","gallery",[2749521,2754127,2754130,2758569,2758570,2999357,3533106,4533031,4533034,4533036,5268515,5268516,5268536,5268538]);galleries[172611]=new gallery(172611,"2749391","Still Life","gallery",[2749385,2749391,2749395,2749399,2749422,2749426,2782590,3310957,3310958,3311032,3311061,3311081,3311082,5801177,6138227,6138228,3310728,2749387,2749392,2749397]);galleries[172618]=new gallery(172618,"2749463","Around the Globe","gallery",[2749454,2749456,2749463,2749466,2749470,2749512,2749513,2749514,2749552,3311049,3311051]);var imageSets=new Object();imageSets[1]="5268536,5268516,5267113,5182978,5182921,4533034,4179809,4179806,4074381,4074373,3533106,3310936,3310728,3310716,3310710,2999357,2749454,2749399,2749397,2749395,2749391,2749387,2749155,2749152,2749151";imageSets[2]="5268516,4179809,4074380,2749463,2749391,2749155";imageSets[3]="5267113,5267112,5182978,5182976,5182929,5182921,4533036,4533034,4533031,4474508,4179810,4179809,4179807,4179806,4179805,4074381,4074380,4074373,3533106,3533081,3533079,3533078,3533077,3311082,3311081,3311061,3311051,3311049,3311032,3310958,3310957,3310946,3310942,3310940,3310939,3310936,3310728,3310719,3310716,3310710,2999357,2999288";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/sarahconnolly82/images";break}switch(a){case 1:b="http://www1.clikpic.com/sarahconnolly82/images";break}switch(a){case 2:b="http://admin.clikpic.com/sarahconnolly82/images";break}switch(a){case 24:b="http://tpc15/clikpic/sarahconnolly82/images";break}switch(a){case 4:b="http://www.clikchurch.com/sarahconnolly82/images";break}switch(a){case 5:b="http://www2.clikpic.com/sarahconnolly82/images";break}switch(a){case 22:b="http://tpc5/clikpic/sarahconnolly82/images";break}switch(a){case 23:b="http://tpc10/clikpic/sarahconnolly82/images";break}switch(a){case 25:b="http://tpc16/clikpic/sarahconnolly82/images";break}switch(a){case 15:b="http://www3.clikpic.com/sarahconnolly82/images";break}switch(a){case 18:b="http://www4.clikpic.com/sarahconnolly82/images";break}switch(a){case 19:b="http://www5.clikpic.com/sarahconnolly82/images";break}switch(a){case 31:b="http://www7.clikpic.com/sarahconnolly82/images";break}switch(a){case 32:b="http://admin2.clikpic.com/sarahconnolly82/images";break}switch(a){case 33:b="http://www8.clikpic.com/sarahconnolly82/images";break}switch(a){case 34:b="http://www9.clikpic.com/sarahconnolly82/images";break}switch(a){case 35:b="http://admin3.clikpic.com/sarahconnolly82/images";break}switch(a){case 37:b="http://admin4.clikpic.com/sarahconnolly82/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="'+escape(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="Sarah Connolly 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 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="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="SARAHCONNOLLY82">';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+'")'})}}};