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[24259]=new thumbnail(24259,"","SERENGETI SCENE STOCK PHOTO","DAP0323_thumb.jpg",130,87,1);thumbnails[31671]=new thumbnail(31671,"","","ABP501_thumb.jpg",130,195,1);thumbnails[31672]=new thumbnail(31672,"","","ABP502_thumb.jpg",130,195,1);thumbnails[92141]=new thumbnail(92141,"","","f2_thumb.jpg",130,182,1);thumbnails[92145]=new thumbnail(92145,"","","TDP_thumb.jpg",130,66,1);thumbnails[110389]=new thumbnail(110389,"","","Glory-CD-Cover_thumb.jpg",130,135,1);thumbnails[199011]=new thumbnail(199011,"","","WBP6000FJ_thumb.jpg",130,86,1);thumbnails[199014]=new thumbnail(199014,"","","WBP6001FJ_thumb.jpg",130,86,1);thumbnails[199015]=new thumbnail(199015,"","","WBP6002FJ_thumb.jpg",130,86,1);thumbnails[199016]=new thumbnail(199016,"","","WBP6003FJ_thumb.jpg",130,86,1);thumbnails[199017]=new thumbnail(199017,"","","WBP6004FJ_thumb.jpg",130,86,1);thumbnails[199018]=new thumbnail(199018,"","","WBP6005FJ_thumb.jpg",130,86,1);thumbnails[199019]=new thumbnail(199019,"","","WBP6006FJ_thumb.jpg",130,86,1);thumbnails[199020]=new thumbnail(199020,"","","WBP6007FJ_thumb.jpg",130,86,1);thumbnails[199021]=new thumbnail(199021,"","","WBP6008FJ_thumb.jpg",130,86,1);thumbnails[199023]=new thumbnail(199023,"","","WBP6009FJ_thumb.jpg",130,86,1);thumbnails[425040]=new thumbnail(425040,"163588","","GTP667069_thumb.jpg",130,86,1);thumbnails[2361624]=new thumbnail(2361624,"163582","","_DSC0163_thumb.jpg",130,192,1);thumbnails[2361640]=new thumbnail(2361640,"163582","","_DSC0160_thumb.jpg",130,87,1);thumbnails[2559033]=new thumbnail(2559033,"","","Fishing-Yourself-Single--_thumb.jpg",130,182,1);thumbnails[2559035]=new thumbnail(2559035,"","","campside-companio_thumb.jpg",130,175,1);thumbnails[2559043]=new thumbnail(2559043,"","","native commisioner_thumb.jpg",130,184,1);thumbnails[282472]=new thumbnail(282472,"","","wales_thumb.jpg",130,87,1);thumbnails[197837]=new thumbnail(197837,"","Zebra. Etosha, Namibia","Zebra-Smaller_thumb.jpg",130,130,1);thumbnails[210890]=new thumbnail(210890,"","","Lion_thumb.jpg",130,130,1);thumbnails[3567704]=new thumbnail(3567704,"163590","APPY84","APPY841_thumb.jpg",130,145,1);thumbnails[210892]=new thumbnail(210892,"","","Elephant_thumb.jpg",130,130,1);thumbnails[3567648]=new thumbnail(3567648,"218171","A18W1B","A18W1B_thumb.jpg",130,95,1);thumbnails[3567705]=new thumbnail(3567705,"163590","APRHCC","APRHCC1_thumb.jpg",130,205,1);thumbnails[210891]=new thumbnail(210891,"","","Z_thumb.jpg",130,130,1);thumbnails[3567706]=new thumbnail(3567706,"163590","APRJ02","APRJ021_thumb.jpg",130,92,1);thumbnails[33728]=new thumbnail(33728,"163583","NA PALI KAUAI","GTP075_thumb.jpg",130,87,1);thumbnails[210889]=new thumbnail(210889,"","","C_thumb.jpg",130,130,1);thumbnails[3567650]=new thumbnail(3567650,"218169","A1N0K6","A1N0K6_thumb.jpg",130,92,1);thumbnails[3567707]=new thumbnail(3567707,"163590","APRJ8F","APRJ8F1_thumb.jpg",130,92,1);thumbnails[210895]=new thumbnail(210895,"","","Buffalo_thumb.jpg",130,130,1);thumbnails[3567709]=new thumbnail(3567709,"218133","AY88WY","AY88WY_thumb.jpg",130,90,1);thumbnails[33729]=new thumbnail(33729,"163583","KALIUA KONA ","GTP076_thumb.jpg",130,195,1);thumbnails[279780]=new thumbnail(279780,"","KOLMANSKOP","1B_thumb.jpg",130,87,1);thumbnails[27960]=new thumbnail(27960,"218169","LIGHTHOUSE","UKIP200_thumb.jpg",130,195,1);thumbnails[3567716]=new thumbnail(3567716,"163597","B3TF3Y","B3TF3Y_thumb.jpg",130,208,1);thumbnails[3567660]=new thumbnail(3567660,"218154","AANATB","AANATB_thumb.jpg",130,205,1);thumbnails[3567721]=new thumbnail(3567721,"218179","B6E8A8","B6E8A8_thumb.jpg",130,96,1);thumbnails[3567722]=new thumbnail(3567722,"163597","B7PJY3","B7PJY3_thumb.jpg",130,92,1);thumbnails[3567665]=new thumbnail(3567665,"163590","AD0R48","AD0R48_thumb.jpg",130,91,1);thumbnails[3567723]=new thumbnail(3567723,"","B7TB8H","B7TB8H_thumb.jpg",130,203,1);thumbnails[3567666]=new thumbnail(3567666,"163590","AD0R53","AD0R53_thumb.jpg",130,199,1);thumbnails[3567667]=new thumbnail(3567667,"163583","AD0RB0","AD0RB0_thumb.jpg",130,91,1);thumbnails[3567725]=new thumbnail(3567725,"218178","B8023X","B8023X_thumb.jpg",130,205,1);thumbnails[3567726]=new thumbnail(3567726,"218178","B8025N","B8025N_thumb.jpg",130,106,1);thumbnails[50008]=new thumbnail(50008,"","","GTP005_thumb.jpg",130,195,1);thumbnails[47183]=new thumbnail(47183,"","","Untitled-Leaf_thumb.jpg",130,195,1);thumbnails[3567675]=new thumbnail(3567675,"163597","AHDPP4","AHDPP4_thumb.jpg",130,85,1);thumbnails[3567676]=new thumbnail(3567676,"163588","AHKXY9","AHKXY9_thumb.jpg",130,90,1);thumbnails[425039]=new thumbnail(425039,"","","GTP667012_thumb.jpg",130,197,1);thumbnails[3567677]=new thumbnail(3567677,"163588","AHKYK4","AHKYK4_thumb.jpg",130,92,1);thumbnails[3567678]=new thumbnail(3567678,"163588","AJ4TR8","AJ4TR8_thumb.jpg",130,92,1);thumbnails[425096]=new thumbnail(425096,"","","WBP666313_thumb.jpg",130,186,1);thumbnails[3567681]=new thumbnail(3567681,"163588","AJ4WJ9","AJ4WJ9_thumb.jpg",130,92,1);thumbnails[3567685]=new thumbnail(3567685,"218152","APPR71","APPR71_thumb.jpg",130,205,1);thumbnails[3567686]=new thumbnail(3567686,"","APPXD9","APPXD9_thumb.jpg",130,114,1);thumbnails[3567689]=new thumbnail(3567689,"163590","APRJ02","APRJ02_thumb.jpg",130,92,1);thumbnails[27943]=new thumbnail(27943,"2805","","WBP234_thumb.jpg",130,87,1);thumbnails[279162]=new thumbnail(279162,"2805","BOARDWALK","71_thumb.jpg",130,87,1);thumbnails[24396]=new thumbnail(24396,"2809","lisianthus flower buds","MRP001_thumb.jpg",130,130,1);thumbnails[24397]=new thumbnail(24397,"2809","lisianthus flower ","MRP002_thumb.jpg",130,130,1);thumbnails[24400]=new thumbnail(24400,"2809","lisianthus","MRP003_thumb.jpg",130,130,1);thumbnails[24401]=new thumbnail(24401,"2809","lisianthus","MRP004_thumb.jpg",130,130,1);thumbnails[24403]=new thumbnail(24403,"2809","lisianthus","MRP005_thumb.jpg",130,130,1);thumbnails[24404]=new thumbnail(24404,"2809","lisianthus","MRP006_thumb.jpg",130,130,1);thumbnails[24405]=new thumbnail(24405,"2809","lisianthus flower ","MRP007_thumb.jpg",130,130,1);thumbnails[24407]=new thumbnail(24407,"2809","lisianthus flowers","MRP008_thumb.jpg",130,130,1);thumbnails[24408]=new thumbnail(24408,"2809","lisianthus ","MRP009_thumb.jpg",130,130,1);thumbnails[24410]=new thumbnail(24410,"2809","lisianthus flowers","MRP010_thumb.jpg",130,130,1);thumbnails[31331]=new thumbnail(31331,"2809","Poppy","FLP122_thumb.jpg",130,130,1);thumbnails[32515]=new thumbnail(32515,"2809","red gerbera","FLP138_thumb.jpg",130,130,1);thumbnails[32521]=new thumbnail(32521,"2809","Clematis Flower","FLP132_thumb.jpg",130,130,1);thumbnails[32523]=new thumbnail(32523,"2809","Lily Lillium","FLP130_thumb.jpg",130,130,1);thumbnails[32524]=new thumbnail(32524,"2809","Geranium flower petals","FLP140_thumb.jpg",130,130,1);thumbnails[27979]=new thumbnail(27979,"2809","Geranium","FLP121_thumb.jpg",130,87,1);thumbnails[32518]=new thumbnail(32518,"2809","","FLP135_thumb.jpg",130,87,1);thumbnails[32519]=new thumbnail(32519,"2809","Yellow flower","FLP134_thumb.jpg",130,87,1);thumbnails[32516]=new thumbnail(32516,"2809","Poppy","FLP137_thumb.jpg",130,87,1);thumbnails[32525]=new thumbnail(32525,"2809","Red gerbera petals ","FLP141_thumb.jpg",130,87,1);thumbnails[32517]=new thumbnail(32517,"2809","ROSE","FLP136_thumb.jpg",130,195,1);thumbnails[32522]=new thumbnail(32522,"2809","Daisy","FLP131_thumb.jpg",130,195,1);thumbnails[32520]=new thumbnail(32520,"2809","yellow rose","FLP133_thumb.jpg",130,195,1);thumbnails[31332]=new thumbnail(31332,"2809","Poppy","FLP123_thumb.jpg",130,195,1);thumbnails[27964]=new thumbnail(27964,"2809","rose stem and petals","FLP116_thumb.jpg",130,195,1);thumbnails[49132]=new thumbnail(49132,"2809","Close up flower Celosia red macro","FLP1308_thumb.jpg",130,195,1);thumbnails[27974]=new thumbnail(27974,"2809","bee on chive plant","MR050_thumb.jpg",130,195,1);thumbnails[49129]=new thumbnail(49129,"2809","Alstroemeria Peruvian lily","FLP1278_thumb.jpg",130,195,1);thumbnails[49128]=new thumbnail(49128,"2809","water droplets on a green leaf","FLP1343_thumb.jpg",130,195,1);thumbnails[49130]=new thumbnail(49130,"2809","poppy seed heads","FLP1362_thumb.jpg",130,195,1);var galleries=new Object();galleries[218147]=new gallery(218147,"","Antelope","gallery",[]);galleries[218136]=new gallery(218136,"","Australia","gallery",[]);galleries[163582]=new gallery(163582,"2361640,2361624","Azores (Portugal)","gallery",[2361624,2361640]);galleries[218138]=new gallery(218138,"","Belgium","gallery",[]);galleries[218154]=new gallery(218154,"3567660","Birds","gallery",[3567660]);galleries[218141]=new gallery(218141,"","Digital Africa","gallery",[]);galleries[163588]=new gallery(163588,"3567681,3567678,3567677,3567676,425040","France","gallery",[425040,3567676,3567677,3567678,3567681]);galleries[163583]=new gallery(163583,"3567667,33729,33728","Hawaii (USA)","gallery",[33728,33729,3567667]);galleries[218152]=new gallery(218152,"3567685","Insects & Arachnids","gallery",[3567685]);galleries[218158]=new gallery(218158,"","Lion","gallery",[]);galleries[218133]=new gallery(218133,"3567709","Namibia","gallery",[3567709]);galleries[218137]=new gallery(218137,"","New Zealand","gallery",[]);galleries[218179]=new gallery(218179,"3567721","Poland","gallery",[3567721]);galleries[218151]=new gallery(218151,"","Reptiles","gallery",[]);galleries[218153]=new gallery(218153,"","Rodents","gallery",[]);galleries[163597]=new gallery(163597,"3567722,3567716,3567675","South Africa","gallery",[3567716,3567722,3567675]);galleries[218178]=new gallery(218178,"3567726,3567725","Spain","gallery",[3567725,3567726]);galleries[218171]=new gallery(218171,"3567648","Switzerland","gallery",[3567648]);galleries[218174]=new gallery(218174,"","Tanzania","gallery",[]);galleries[218169]=new gallery(218169,"27960","United Kingdom","gallery",[3567650,27960]);galleries[163587]=new gallery(163587,"","USA","gallery",[]);galleries[218148]=new gallery(218148,"","Wildebeest","gallery",[]);galleries[163590]=new gallery(163590,"3567707,3567706,3567705,3567704,3567689,3567666,3567665","Zakynthos (Greece)","gallery",[3567704,3567705,3567706,3567707,3567665,3567666,3567689]);galleries[218144]=new gallery(218144,"","Zebra","gallery",[]);galleries[218134]=new gallery(218134,"","Zimbabwe","gallery",[]);galleries[2805]=new gallery(2805,"279162,27943","LANDSCAPE","gallery",[27943,279162]);galleries[2806]=new gallery(2806,"3567685,3567660","WILDLIFE","gallery",[]);galleries[2808]=new gallery(2808,"","African Elephants","gallery",[]);galleries[2809]=new gallery(2809,"49132,49129,49128,32517,31332,27974,27964","NATURE","gallery",[24396,24397,24400,24401,24403,24404,24405,24407,24408,24410,31331,32515,32521,32523,32524,27979,32518,32519,32516,32525,32517,32522,32520,31332,27964,49132,27974,49129,49128,49130]);galleries[2810]=new gallery(2810,"27960","TRAVEL","gallery",[]);var imageSets=new Object();imageSets[1]="3567726,3567725,3567723,3567722,3567721,3567716,3567709,3567707,3567706,3567705,3567704,3567689,3567686,3567685,3567681,3567678,3567677,3567676,3567675,3567667,3567666,3567665,3567660,3567650,3567648,2559043,2559035,2559033,2361640,2361624,425096,425040,425039,282472,279780,279162,210895,210892,210891,210890,210889,199023,199021,199020,199019,199018,199017,199016,199015,199014";imageSets[2]="210890,50008,49132,49129,49128,47183,32517,31332,27974,27964,27960,24259";imageSets[3]="3567726,3567725,3567723,3567722,3567721,3567716,3567709,3567707,3567706,3567705,3567704,3567689,3567686,3567685,3567681,3567678,3567677,3567676,3567675,3567667,3567666,3567665,3567660,3567650,3567648,2559043,2559035,2559033,2361640,2361624,425096,425040,425039,282472,279780,279162,210895,210892,210891,210890,210889,199023,199021,199020,199019,199018,199017,199016,199015,199014";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/vs_clikpic/images";break}switch(a){case 1:b="http://www1.clikpic.com/vs_clikpic/images";break}switch(a){case 2:b="http://admin.clikpic.com/vs_clikpic/images";break}switch(a){case 4:b="http://www.clikchurch.com/vs_clikpic/images";break}switch(a){case 5:b="http://www2.clikpic.com/vs_clikpic/images";break}switch(a){case 15:b="http://www3.clikpic.com/vs_clikpic/images";break}switch(a){case 21:b="http://www6.clikpic.com/vs_clikpic/images";break}switch(a){case 18:b="http://www4.clikpic.com/vs_clikpic/images";break}switch(a){case 19:b="http://www5.clikpic.com/vs_clikpic/images";break}switch(a){case 22:b="http://tpc5/clikpic/vs_clikpic/images";break}switch(a){case 23:b="http://tpc10/clikpic/vs_clikpic/images";break}switch(a){case 24:b="http://tpc15/clikpic/vs_clikpic/images";break}switch(a){case 25:b="http://tpc16/clikpic/vs_clikpic/images";break}switch(a){case 31:b="http://www7.clikpic.com/vs_clikpic/images";break}switch(a){case 32:b="http://admin2.clikpic.com/vs_clikpic/images";break}switch(a){case 33:b="http://www8.clikpic.com/vs_clikpic/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="visualsafari.com: "+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="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="sales@visualsafari.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="sales@visualsafari.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 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+'")'})}}};