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[846552]=new thumbnail(846552,"","","_L5Q0208_thumb.jpg",130,62,1);thumbnails[847024]=new thumbnail(847024,"","","_L5Q7173-2_thumb.jpg",130,62,1);thumbnails[848375]=new thumbnail(848375,"","","_L5Q7203-2_thumb.jpg",130,87,1);thumbnails[848378]=new thumbnail(848378,"","","060603_0541_thumb.jpg",130,87,1);thumbnails[848386]=new thumbnail(848386,"","","060729_0512_thumb.jpg",130,87,1);thumbnails[1102935]=new thumbnail(1102935,"","","Page 2-3_thumb.jpg",130,50,1);thumbnails[1102984]=new thumbnail(1102984,"","","Page 24-25_thumb.jpg",130,50,1);thumbnails[1103029]=new thumbnail(1103029,"","","Page 8-9v2_thumb.jpg",130,49,1);thumbnails[1103121]=new thumbnail(1103121,"","","Page 18-19_thumb.jpg",130,50,1);thumbnails[4573420]=new thumbnail(4573420,"","","0908091238_3_thumb.jpg",130,87,1);thumbnails[846550]=new thumbnail(846550,"65257","","_L5Q01661_thumb.jpg",130,87,1);thumbnails[846553]=new thumbnail(846553,"65257","","_L5Q0452_thumb.jpg",130,87,1);thumbnails[846564]=new thumbnail(846564,"65257","","_L5Q1911_thumb.jpg",130,195,1);thumbnails[847026]=new thumbnail(847026,"65257","","060729_0340-2_thumb.jpg",130,87,1);thumbnails[848255]=new thumbnail(848255,"65257","","060729_0230-2_thumb.jpg",130,87,1);thumbnails[848258]=new thumbnail(848258,"65257","","060729_0378_thumb.jpg",130,87,1);thumbnails[848259]=new thumbnail(848259,"65257","","060729_0768_thumb.jpg",130,86,1);thumbnails[848263]=new thumbnail(848263,"65257","","060729_1629-2_thumb.jpg",130,87,1);thumbnails[848264]=new thumbnail(848264,"65257","","060930679-2_thumb.jpg",130,195,1);thumbnails[848265]=new thumbnail(848265,"65257","","JL5Q0634_thumb.jpg",130,146,1);thumbnails[848267]=new thumbnail(848267,"65257","","JL5Q0792_thumb.jpg",130,87,1);thumbnails[848389]=new thumbnail(848389,"65257","","060729_0815_thumb.jpg",130,87,1);thumbnails[3013656]=new thumbnail(3013656,"65257","","_L5Q8707_thumb.jpg",70,100,1);thumbnails[3471754]=new thumbnail(3471754,"65257","","0710200417_2_thumb.jpg",130,94,1);thumbnails[3471773]=new thumbnail(3471773,"65257","","0712220843_thumb.jpg",130,87,1);thumbnails[3471775]=new thumbnail(3471775,"65257","","0808300705_thumb.jpg",67,100,1);thumbnails[4565170]=new thumbnail(4565170,"264828","","0908091379_thumb.jpg",130,87,1);thumbnails[6307076]=new thumbnail(6307076,"349840","","_MG_1779_thumb.jpg",130,86,1);thumbnails[6307082]=new thumbnail(6307082,"349840","","_MG_1804_thumb.jpg",130,77,1);thumbnails[6307087]=new thumbnail(6307087,"349840","","_MG_1937_thumb.jpg",130,87,1);thumbnails[6307090]=new thumbnail(6307090,"349840","","_MG_19371_thumb.jpg",130,87,1);thumbnails[6307093]=new thumbnail(6307093,"349840","","_MG_1992_thumb.jpg",130,87,1);thumbnails[6307099]=new thumbnail(6307099,"349840","","_MG_2008_thumb.jpg",130,89,1);thumbnails[6307103]=new thumbnail(6307103,"349840","","_MG_2063_thumb.jpg",130,78,1);thumbnails[6307106]=new thumbnail(6307106,"349840","","_MG_2101_thumb.jpg",130,79,1);thumbnails[6307108]=new thumbnail(6307108,"349840","","_MG_2137_thumb.jpg",130,79,1);thumbnails[6562652]=new thumbnail(6562652,"349840","","_MG_3540_2_thumb.jpg",130,87,1);thumbnails[6562672]=new thumbnail(6562672,"349840","","_MG_3601_thumb.jpg",130,87,1);thumbnails[2856291]=new thumbnail(2856291,"177670","","EventLogo1_thumb.jpg",67,100,1);thumbnails[2875907]=new thumbnail(2875907,"177670","","803-993-1_thumb.jpg",129,69,1);thumbnails[2875913]=new thumbnail(2875913,"177670","Sponsored by Mitsubishi imaging - The Flash Centre - Elinchrom","Mitsubishi Logo_thumb.jpg",130,81,1);thumbnails[4573410]=new thumbnail(4573410,"199774","","_L5Q1758_thumb.jpg",130,84,1);thumbnails[4474519]=new thumbnail(4474519,"185457","","0908091251_thumb.jpg",68,100,1);thumbnails[4474568]=new thumbnail(4474568,"185457","","0908091346_thumb.jpg",130,87,1);thumbnails[4474570]=new thumbnail(4474570,"185457","","0908091370_thumb.jpg",69,100,1);thumbnails[4474575]=new thumbnail(4474575,"185457","","0908091377_thumb.jpg",65,100,1);thumbnails[4474585]=new thumbnail(4474585,"185457","","0908091386_thumb.jpg",130,89,1);thumbnails[4474587]=new thumbnail(4474587,"185457","","0908091394_thumb.jpg",130,81,1);thumbnails[3625401]=new thumbnail(3625401,"185457","","_L5Q4493_thumb.jpg",130,87,1);thumbnails[3625433]=new thumbnail(3625433,"185457","","_L5Q4501_2_thumb.jpg",130,87,1);thumbnails[3625456]=new thumbnail(3625456,"185457","","_L5Q4531_thumb.jpg",130,78,1);thumbnails[3625481]=new thumbnail(3625481,"185457","","_L5Q4580_thumb.jpg",130,87,1);thumbnails[3625489]=new thumbnail(3625489,"185457","","_L5Q4638_thumb.jpg",67,100,1);thumbnails[3625511]=new thumbnail(3625511,"185457","","_L5Q4671_thumb.jpg",67,100,1);thumbnails[3625512]=new thumbnail(3625512,"185457","","_L5Q4683_thumb.jpg",67,100,1);thumbnails[3625520]=new thumbnail(3625520,"185457","","_L5Q4731_thumb.jpg",67,100,1);thumbnails[3625529]=new thumbnail(3625529,"185457","","_L5Q4783_thumb.jpg",130,87,1);thumbnails[3626698]=new thumbnail(3626698,"221768","","_L5Q4501_21_thumb.jpg",130,87,1);thumbnails[4564698]=new thumbnail(4564698,"264778","","_L5Q1757_thumb.jpg",130,87,1);thumbnails[4564699]=new thumbnail(4564699,"264778","","_L5Q1800_thumb.jpg",130,87,1);thumbnails[4564700]=new thumbnail(4564700,"264778","","0908091439_thumb.jpg",130,65,1);thumbnails[4565165]=new thumbnail(4565165,"264778","","0908091258_thumb.jpg",130,87,1);thumbnails[4565166]=new thumbnail(4565166,"264778","","0908091329_thumb.jpg",130,87,1);thumbnails[4565168]=new thumbnail(4565168,"264778","","0908091352_thumb.jpg",130,86,1);thumbnails[4573411]=new thumbnail(4573411,"264778","","_L5Q2807_thumb.jpg",66,100,1);thumbnails[4573428]=new thumbnail(4573428,"185457","","0908091421_thumb.jpg",69,100,1);thumbnails[4573429]=new thumbnail(4573429,"264778","","_L5Q6566-2_thumb.jpg",130,87,1);thumbnails[846989]=new thumbnail(846989,"65310","","lauralo_thumb.jpg",130,162,1);thumbnails[847064]=new thumbnail(847064,"65404","","_L5Q1353_thumb.jpg",130,166,1);thumbnails[847077]=new thumbnail(847077,"65404","","_L5Q1392-2_thumb.jpg",130,101,1);thumbnails[847081]=new thumbnail(847081,"65404","","_L5Q1415-2_thumb.jpg",130,179,1);thumbnails[847086]=new thumbnail(847086,"65404","","_L5Q1435-2_thumb.jpg",130,195,1);thumbnails[847092]=new thumbnail(847092,"65404","","_L5Q1467_thumb.jpg",130,209,1);thumbnails[847117]=new thumbnail(847117,"65404","","_L5Q1822-2_thumb.jpg",130,195,1);thumbnails[847119]=new thumbnail(847119,"65404","","_L5Q1829-2_thumb.jpg",130,195,1);thumbnails[847122]=new thumbnail(847122,"65404","","_L5Q1897-3_thumb.jpg",130,195,1);thumbnails[848270]=new thumbnail(848270,"65404","","_L5Q1375_thumb.jpg",130,195,1);thumbnails[848271]=new thumbnail(848271,"65404","","_L5Q1367_thumb.jpg",130,88,1);thumbnails[848274]=new thumbnail(848274,"65404","","_L5Q1398_thumb.jpg",130,195,1);thumbnails[848275]=new thumbnail(848275,"65404","","_L5Q1413_thumb.jpg",130,198,1);thumbnails[3275772]=new thumbnail(3275772,"199732","","VisGuideMontage1_thumb.jpg",100,100,1);thumbnails[3276055]=new thumbnail(3276055,"199732","","Disc Image_thumb.jpg",100,100,1);thumbnails[5361581]=new thumbnail(5361581,"302070","","JL5Q1259_2_thumb.jpg",130,85,1);thumbnails[5126768]=new thumbnail(5126768,"289753","Honl complete set of Light modifiers","group_composite_small_thumb.jpg",120,100,1);thumbnails[5126770]=new thumbnail(5126770,"289753","Speed Snoot 5” Shorty ","honlphoto_5snoot_thumb.jpg",100,100,1);thumbnails[5126772]=new thumbnail(5126772,"289753","Speed Snoot 8” Regular ","honlphoto_5snoot1_thumb.jpg",100,100,1);thumbnails[5126774]=new thumbnail(5126774,"289753","1/8 Speed Grid","honlphoto_grids_thumb.jpg",86,100,1);thumbnails[5126776]=new thumbnail(5126776,"289753","1/4 Speed Grid","honlphoto_grids1_thumb.jpg",86,100,1);thumbnails[5126830]=new thumbnail(5126830,"289753","Speed Strap\t","honlphoto_speedstrap_thumb.jpg",104,100,1);thumbnails[5126832]=new thumbnail(5126832,"289753","Speed Gobo (Barndoor)/Bounce Card ","honlphoto_gobo_thumb.jpg",130,92,1);thumbnails[5126834]=new thumbnail(5126834,"289753","LEE Gel Kit","kit2_thumb.jpg",130,70,1);thumbnails[5126837]=new thumbnail(5126837,"289753","Quantum Turbo SC\tRechargeable Battery / cable extra","Quantum_SC2_thumb.jpg",109,100,1);thumbnails[5126848]=new thumbnail(5126848,"289753","Elinchrom Skyport Universal Set","SkyportUni_thumb.jpg",130,98,1);thumbnails[5126851]=new thumbnail(5126851,"289753","Elinchrom Ranger Quadra 2 Head Kit","quadra2headkit_thumb.jpg",67,100,1);thumbnails[3290468]=new thumbnail(3290468,"200578","","cover06_thumb.jpg",71,100,1);thumbnails[3278521]=new thumbnail(3278521,"199761","","Blurb Cover_thumb.jpg",100,100,1);var galleries=new Object();galleries[264828]=new gallery(264828,"4565170","<b>Camera Flash Seminar<b>","section245998",[4565170]);galleries[65257]=new gallery(65257,"3471754,3013656,846564,846553","<b>Wedding Photography £295.00","gallery",[846550,846553,846564,847026,848255,848258,848259,848263,848264,848265,848267,848389,3013656,3471754,3471773,3471775]);galleries[349840]=new gallery(349840,"6562672,6562652,6307108,6307106,6307103,6307099,6307093,6307090,6307087,6307076","<strong>Fashion / Portfolio £195.00<strong>","gallery",[6307076,6307082,6307087,6307090,6307093,6307099,6307103,6307106,6307108,6562652,6562672]);galleries[199774]=new gallery(199774,"4573410","<b>2 Day Wedding Course £295.00","section245998",[4573410]);galleries[177670]=new gallery(177670,"2875913","<b>Event Photography £165.00","gallery",[2856291,2875907,2875913]);galleries[264778]=new gallery(264778,"4573429,4573411,4565168,4565166,4564700,4564698","<b>Camera Flash Photography <br>£65.00","gallery",[4564698,4564699,4564700,4565165,4565166,4565168,4573411,4573429]);galleries[185457]=new gallery(185457,"4573428,4474585,4474575,4474570,4474568,4474519,3625529,3625520,3625512,3625511,3625489,3625481,3625456,3625433","<b>Creative Location Lighting <br>£245.00","gallery",[4474519,4474568,4474570,4474575,4474585,4474587,3625401,3625433,3625456,3625481,3625489,3625511,3625512,3625520,3625529,4573428]);galleries[221768]=new gallery(221768,"3626698","<b>Location Lighting ","section245998",[3626698]);galleries[65310]=new gallery(65310,"846989","<b>Portrait and Studio Lighting","gallery",[846989]);galleries[65404]=new gallery(65404,"847122,847119,847086","<strong>Glamour and Figure</strong>","gallery",[847064,847077,847081,847086,847092,847117,847119,847122,848270,848271,848274,848275]);galleries[199732]=new gallery(199732,"3276055,3275772","<b>PDF Visual Guides / 100 A6 Guides  £10.00","section245998",[3275772,3276055]);galleries[302070]=new gallery(302070,"5361581","<b>Landscape Photography  from £295.00","gallery",[5361581]);galleries[289753]=new gallery(289753,"5126851,5126848,5126837,5126834,5126832,5126830,5126776,5126774,5126772,5126770","Flash Accessories","section245998",[5126768,5126770,5126772,5126774,5126776,5126830,5126832,5126834,5126837,5126848,5126851]);galleries[200578]=new gallery(200578,"3290468","<b>The Photographers Guide to Studio Lighting","section245998",[3290468]);galleries[199761]=new gallery(199761,"3278521","<b>100 page Visual Guide Book","section245998",[3278521]);var imageSets=new Object();imageSets[1]="6562672,6562652,4573429,4573428,4573420,4573411,4573410,4565170,4565168,4565166,4564700,4564698,4474585,4474575,4474570,4474568,4474519,3626698,3625529,3625520,3625512,3625511,3625489,3625481,3625456,3625433,3625401,3471754,3278521,3275772,3013656,846564,846553,846552,846550";imageSets[2]="6562672,6562652,6307108,6307106,6307103,6307099,6307093,6307090,6307087,6307076,4573429,4573428,4573420,4573411,4573410,4565170,4565168,4565166,4564700,4564698,4474585,4474575,4474570,4474568,4474519,3626698,3625529,3625520,3625512,3625511,3625489,3625481,3625456,3625433,3471754,3290468,3278521,3013656,2875913,847122,847119,847086,846564,846553,846552";imageSets[3]="5126851,5126848,5126837,5126834,5126832,5126830,5126776,5126774,5126772,5126770,5126768,4573429,4573428,4573420,4573411,4573410,4565170,4565168,4565166,4564700,4564698,4474568,4474519,3626698";imageSets[232147]="6562672,5126851,5126848,5126837,5126834,5126832,5126830,5126776,5126774,5126772,5126770,5126768,4573429,4573428,4573420,4573411,4573410,4565170,4565168,4565166,3626698";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/weddingphototraining/images";break}switch(a){case 1:b="http://www1.clikpic.com/weddingphototraining/images";break}switch(a){case 2:b="http://admin.clikpic.com/weddingphototraining/images";break}switch(a){case 24:b="http://tpc15/clikpic/weddingphototraining/images";break}switch(a){case 4:b="http://www.clikchurch.com/weddingphototraining/images";break}switch(a){case 5:b="http://www2.clikpic.com/weddingphototraining/images";break}switch(a){case 22:b="http://tpc5/clikpic/weddingphototraining/images";break}switch(a){case 23:b="http://tpc10/clikpic/weddingphototraining/images";break}switch(a){case 25:b="http://tpc16/clikpic/weddingphototraining/images";break}switch(a){case 15:b="http://www3.clikpic.com/weddingphototraining/images";break}switch(a){case 18:b="http://www4.clikpic.com/weddingphototraining/images";break}switch(a){case 19:b="http://www5.clikpic.com/weddingphototraining/images";break}switch(a){case 31:b="http://www7.clikpic.com/weddingphototraining/images";break}switch(a){case 32:b="http://admin2.clikpic.com/weddingphototraining/images";break}switch(a){case 33:b="http://www8.clikpic.com/weddingphototraining/images";break}switch(a){case 34:b="http://www9.clikpic.com/weddingphototraining/images";break}switch(a){case 35:b="http://admin3.clikpic.com/weddingphototraining/images";break}switch(a){case 37:b="http://admin4.clikpic.com/weddingphototraining/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="Photography Workshops: "+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].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="terry@terryhewlett.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="terry@terryhewlett.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+'")'})}}};