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[1710031]=new thumbnail(1710031,"","","Me_thumb.jpg",130,93,1);thumbnails[2191155]=new thumbnail(2191155,"","","All with fire1_thumb.jpg",130,86,1);thumbnails[2846443]=new thumbnail(2846443,"","","Fanning flames 21_thumb.jpg",130,86,1);thumbnails[5131511]=new thumbnail(5131511,"","","Portrait_of_County_Downcover12_thumb.jpg",130,121,1);thumbnails[6360771]=new thumbnail(6360771,"352235","Doon at Blackwaterfoot","Doondusk2_thumb.jpg",130,86,1);thumbnails[6360772]=new thumbnail(6360772,"352235","On the summit of Goatfell mountain","Goatfellsummit2_thumb.jpg",130,86,1);thumbnails[6360775]=new thumbnail(6360775,"352235","Arran Sunset","Hillssunset_thumb.jpg",130,86,1);thumbnails[6360779]=new thumbnail(6360779,"352235","Sunset reflected in a rockpool on Blackwaterfoot beach","Rockpoolsunset_thumb.jpg",130,86,1);thumbnails[6360802]=new thumbnail(6360802,"352235","Rocks at Dusk","Rocksseasunset_thumb.jpg",130,86,1);thumbnails[6360883]=new thumbnail(6360883,"352235","Seaweed Sunset","Seaweedsunset_thumb.jpg",130,86,1);thumbnails[5349290]=new thumbnail(5349290,"156487","Ballynoe Stone Circle","Ballynoe_Stone_Circle_6_thumb.jpg",130,86,1);thumbnails[5529816]=new thumbnail(5529816,"156487","Tyrella Sunset","Posts_71_thumb.jpg",130,86,1);thumbnails[5354086]=new thumbnail(5354086,"156487","Ballynoe Stone Circle 2","Ballynoe_Stone_Circle_4_thumb.jpg",130,86,1);thumbnails[3859215]=new thumbnail(3859215,"156487","The Blue Lough","Blue_Lough_thumb.jpg",130,86,1);thumbnails[5319370]=new thumbnail(5319370,"156487","Chaine Memorial Tower","Chaine_Memorial_Tower_21_thumb.jpg",130,195,1);thumbnails[4966599]=new thumbnail(4966599,"156487","Sunset over Crawfordsburn","Crawfordsburn_shore_412_thumb.jpg",130,86,1);thumbnails[605918]=new thumbnail(605918,"141075","Scrabo Dawn ","Scrabo Tower Dawn 2, Comber, Northern Ireland_thumb.jpg",130,86,1);thumbnails[2498262]=new thumbnail(2498262,"52603","The Mourne Mountains ","Mournes 11_thumb.jpg",130,86,1);thumbnails[232044]=new thumbnail(232044,"52603","Mournes from Murlough","Dunes Mournes_thumb.jpg",130,86,1);thumbnails[2070480]=new thumbnail(2070480,"141075","Nendrum Monastic Site ","nendrum horizontal 3_thumb.jpg",130,86,1);thumbnails[283047]=new thumbnail(283047,"141075","Windmill Hill ","Windmill Hill Snow 2_thumb.jpg",130,86,1);thumbnails[2530956]=new thumbnail(2530956,"52603","Sunset on Tyrella Beach","Mournes-Tyrella-b_thumb.jpg",130,86,1);thumbnails[605920]=new thumbnail(605920,"52603","Mourne Wall","131_thumb.jpg",130,86,1);thumbnails[1849406]=new thumbnail(1849406,"141075","Millin Bay Cairn ","43 - Millin Cairn sunset_thumb.jpg",130,86,1);thumbnails[621042]=new thumbnail(621042,"141075","Ballycopeland Windmill ","Windmill 1_thumb.jpg",130,195,1);thumbnails[4922718]=new thumbnail(4922718,"52603","Reflections of a Mountain Sunset","Sunset_2_thumb.jpg",130,86,1);thumbnails[672269]=new thumbnail(672269,"52603","Silent Valley","Drain hole_thumb.jpg",130,86,1);thumbnails[2120501]=new thumbnail(2120501,"141075","Ballycopeland Windmill Sunset","From-field-h-4_thumb.jpg",130,86,1);thumbnails[3114108]=new thumbnail(3114108,"52603","Sunset over the Mourne Mountains","Mournes from St Johns Point_thumb.jpg",130,86,1);thumbnails[2850160]=new thumbnail(2850160,"52603","Rainbow over the Mourne Mountains","Mournes_rainbow_thumb.jpg",130,86,1);thumbnails[2418936]=new thumbnail(2418936,"52603","Mourne Reflections","Mournes Tyrella reflection 2_thumb.jpg",130,86,1);thumbnails[552307]=new thumbnail(552307,"52607","Carrickfergus Castle at Dawn","Castle 2_thumb.jpg",130,86,1);thumbnails[232061]=new thumbnail(232061,"52607","Giant's Ring","Giants Ring Hor 41_thumb.jpg",130,86,1);thumbnails[425181]=new thumbnail(425181,"52607","Giant's Causeway Twilight","Causeway 2_thumb.jpg",130,86,1);thumbnails[582783]=new thumbnail(582783,"52607","Stormy Giant's Causeway ","Giants Causeway 11_thumb.jpg",130,86,1);thumbnails[3859220]=new thumbnail(3859220,"52607","Wateresk Dolmen","Wateresk_Dolmen_7_thumb.jpg",130,86,1);thumbnails[3091887]=new thumbnail(3091887,"52607","Elephant Rock","Elephants Rock 2_thumb.jpg",130,86,1);thumbnails[2418928]=new thumbnail(2418928,"52607","St John's Point Lighthouse","Horizontal reflection and rocks_thumb.jpg",130,86,1);thumbnails[2846366]=new thumbnail(2846366,"52607","Mussenden Temple","Mussenden Temple h4_thumb.jpg",130,86,1);thumbnails[3114122]=new thumbnail(3114122,"52607","Quoile River","Quoile River 4_thumb.jpg",130,86,1);thumbnails[269486]=new thumbnail(269486,"52610","Jetty Sunset","Pier 2 - Holywood_thumb.jpg",130,92,1);thumbnails[250541]=new thumbnail(250541,"52610","Groomsport Harbour Sunset","Groomsport Harbour sunset_thumb.jpg",130,86,1);thumbnails[563873]=new thumbnail(563873,"52610","Kircubbin Dusk","Kirkubbin harbour, Northern Ireland_thumb.jpg",130,86,1);thumbnails[582805]=new thumbnail(582805,"52610","Steps to the Lighthouse ","Steps lighthouse_thumb.jpg",130,86,1);thumbnails[211675]=new thumbnail(211675,"52610","Donaghadee Lighthouse at Dusk ","Lighthouse dusk v_thumb.jpg",130,195,1);thumbnails[742920]=new thumbnail(742920,"52610","Lough Cowey ","Lough Cowey1_thumb.jpg",130,87,1);thumbnails[137093]=new thumbnail(137093,"52614","Hay Bales at Sunrise","Hay Bales_thumb.jpg",130,92,1);thumbnails[232059]=new thumbnail(232059,"52614","Bluebells in Delamont Country Park","Bluebells_and_forest_h_thumb.jpg",130,86,1);thumbnails[232057]=new thumbnail(232057,"52614","Spring Tree","Giants_Ring_Tree_hor_4_thumb.jpg",130,86,1);thumbnails[504567]=new thumbnail(504567,"52614","Stepping Stones","Stepping stones h 3_thumb.jpg",130,86,1);thumbnails[3140777]=new thumbnail(3140777,"52614","Crawfordsburn Waterfall","Waterfall_in_Crawfordsburn_Country_Park_2_thumb.jpg",130,195,1);thumbnails[3816869]=new thumbnail(3816869,"52614","Bluebells in Garvagh Forest","Bluebells_and_forest__1_thumb.jpg",130,86,1);thumbnails[95230]=new thumbnail(95230,"52618","Tranquil ","Tranquil Sunset_thumb.jpg",130,184,1);thumbnails[570779]=new thumbnail(570779,"52618","Jetty Remains","Broken Jetty 1, Oxford Island, Northern Ireland_thumb.jpg",130,86,1);thumbnails[95228]=new thumbnail(95228,"52618","Broken","Broken Fence_thumb.jpg",130,184,1);thumbnails[250540]=new thumbnail(250540,"52618","Step Into the Sunset","Metal steps ver_thumb.jpg",130,195,1);thumbnails[152373]=new thumbnail(152373,"52618","Fiery Farewell","Fiery Farewell - Ards Peninsula_thumb.jpg",130,86,1);thumbnails[411134]=new thumbnail(411134,"52618","Towards the Moonlight ","Islandhill moonlight  vertical_thumb.jpg",130,195,1);thumbnails[411135]=new thumbnail(411135,"52622","Pier and Slipway ","Pier Slipway 2_thumb.jpg",130,86,1);thumbnails[250525]=new thumbnail(250525,"52622","Serene Sea","Groyne into the sea with sky_thumb.jpg",130,86,1);thumbnails[420000]=new thumbnail(420000,"52622","Reflections of the Day","Sea Mirror_thumb.jpg",130,86,1);thumbnails[361126]=new thumbnail(361126,"52622","A Place for Contemplation","Seatsunset_thumb.jpg",130,86,1);thumbnails[997732]=new thumbnail(997732,"52622","Halcyon Horizon","Rock calm sea horizon vertical_thumb.jpg",130,195,1);thumbnails[567368]=new thumbnail(567368,"52622","Pale Moonlight","Groyne Moon_thumb.jpg",130,86,1);thumbnails[3032392]=new thumbnail(3032392,"52625","White Rocks Beach","Whiterocks beach 9_thumb.jpg",130,86,1);thumbnails[816287]=new thumbnail(816287,"52625","The Boathouse ","Boathouse 3_thumb.jpg",130,86,1);thumbnails[510372]=new thumbnail(510372,"52625","Strangford Twilight ","Ballymorran 9redone_thumb.jpg",130,86,1);thumbnails[997739]=new thumbnail(997739,"52625","Low Tide in Ballywalter","Ballywalter-boat-sunset_thumb.jpg",130,86,1);thumbnails[3032388]=new thumbnail(3032388,"52625","Gap in the Clouds","Whiterocks beach 5_thumb.jpg",130,86,1);thumbnails[376190]=new thumbnail(376190,"52625","Sunset on the Peninsula ","SimonBrown_thumb.jpg",130,87,1);thumbnails[1627845]=new thumbnail(1627845,"110331","Moonlit Ballyholme","Moonlit panorama, Ballyholme Beach_thumb.jpg",130,27,1);thumbnails[1627898]=new thumbnail(1627898,"110331","Mountstewart","Lake panorama_thumb.jpg",130,27,1);thumbnails[2058134]=new thumbnail(2058134,"110331","Silent Valley","Silent Valley Panorama_thumb.jpg",130,26,1);thumbnails[3534398]=new thumbnail(3534398,"216256","Lake Wakatipu at Dawn","Lake_Wakatipo_blue_skies_1_thumb.jpg",130,86,1);thumbnails[3559787]=new thumbnail(3559787,"216256","Twilight Church","Church_of_the_Good_Shepherd_5_thumb.jpg",130,86,1);thumbnails[3559791]=new thumbnail(3559791,"216256","Lake Tekapo Sunset","Lake_sunset_thumb.jpg",130,86,1);thumbnails[3545225]=new thumbnail(3545225,"216256","The Church of the Good Shepherd","Church_of_the_Good_Shepard_stars_3_thumb.jpg",130,195,1);thumbnails[3559786]=new thumbnail(3559786,"216256","Sunset over the Church of the Good Shepherd","Church_of_the_Good_Shepherd_41_thumb.jpg",130,86,1);thumbnails[3545231]=new thumbnail(3545231,"216256","Trees and the Night Sky","Trees_Moonlight_thumb.jpg",130,195,1);thumbnails[3545229]=new thumbnail(3545229,"216256","Mt John","Mt_John_reflections_thumb.jpg",130,86,1);thumbnails[3578997]=new thumbnail(3578997,"216256","Tasman Glacier","Tasman_glacier_2a_thumb.jpg",130,86,1);thumbnails[3594871]=new thumbnail(3594871,"216256","Sunrise over Lake Wanaka","Pier_sunrise_thumb.jpg",130,86,1);thumbnails[3594910]=new thumbnail(3594910,"216256","Wanaka Sunset","Posts_mountain_2_thumb.jpg",130,86,1);thumbnails[3594865]=new thumbnail(3594865,"216256","Twilight Heart","Heart_thumb.jpg",130,86,1);thumbnails[3629314]=new thumbnail(3629314,"216256","Misty Te Anau","Posts_early_morning_1_thumb.jpg",130,86,1);thumbnails[3629328]=new thumbnail(3629328,"216256","Sunset Sailing","2_Yachts_2_thumb.jpg",130,86,1);thumbnails[3675970]=new thumbnail(3675970,"216256","Lakefront Reflections","Lakefront_reflection_thumb.jpg",130,86,1);thumbnails[3629323]=new thumbnail(3629323,"216256","Te Anau Jetty","Pier_dark_thumb.jpg",130,86,1);var galleries=new Object();galleries[352235]=new gallery(352235,"6360779","Arran - July 2010","gallery",[6360771,6360772,6360775,6360779,6360802,6360883]);galleries[156487]=new gallery(156487,"5349290","Latest Northern Ireland Images","gallery",[5349290,5529816,5354086,3859215,5319370,4966599]);galleries[141075]=new gallery(141075,"283047","Ards Peninsula ","gallery",[605918,2070480,283047,1849406,621042,2120501]);galleries[52603]=new gallery(52603,"2850160,2498262","Mourne Mountains ","gallery",[2498262,232044,2530956,605920,4922718,672269,3114108,2850160,2418936]);galleries[52607]=new gallery(52607,"425181","Around Northern Ireland","gallery",[552307,232061,425181,582783,3859220,3091887,2418928,2846366,3114122]);galleries[52610]=new gallery(52610,"582805","Harbours and Jetties ","gallery",[269486,250541,563873,582805,211675,742920]);galleries[52614]=new gallery(52614,"232057","Forests, Fields and Flowers ","gallery",[137093,232059,232057,504567,3140777,3816869]);galleries[52618]=new gallery(52618,"570779,152373","Shapes and Patterns ","gallery",[95230,570779,95228,250540,152373,411134]);galleries[52622]=new gallery(52622,"250525","Serene Scenes","gallery",[411135,250525,420000,361126,997732,567368]);galleries[52625]=new gallery(52625,"997739,376190","Beaches and Coastline ","gallery",[3032392,816287,510372,997739,3032388,376190]);galleries[110331]=new gallery(110331,"2058134","Panoramas ","gallery",[1627845,1627898,2058134]);galleries[216256]=new gallery(216256,"3629323,3594871,3545229","New Zealand - March 2009","gallery",[3534398,3559787,3559791,3545225,3559786,3545231,3545229,3578997,3594871,3594910,3594865,3629314,3629328,3675970,3629323]);var imageSets=new Object();imageSets[1]="6360779,4922718,3629328,3629323,3114108,2846366,2498262,570779,563873,283047,250525,232057";imageSets[2]="6360779,5349290,3629323,3594871,3545229,2850160,2498262,2058134,997739,582805,570779,425181,376190,283047,250525,232057,152373";imageSets[3]="6360883,6360802,6360779,6360775,6360772,6360771,5529816,5354086,5349290,5319370,5131511,4966599,4922718,3859220,3859215,3816869,3675970,3629328,3629323,3629314,3594910,3594871,3594865,3578997,3559791,3559787,3559786,3545231,3545229,3545225,3534398,3140777,3114122,3114108,3091887,3032392,3032388,2850160,2846443,2846366,2530956,2498262,2418936,2418928,2191155,2120501,2070480,2058134,1849406,1710031";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/mcsimeyb/images";break}switch(a){case 1:b="http://www1.clikpic.com/mcsimeyb/images";break}switch(a){case 2:b="http://admin.clikpic.com/mcsimeyb/images";break}switch(a){case 24:b="http://tpc15/clikpic/mcsimeyb/images";break}switch(a){case 4:b="http://www.clikchurch.com/mcsimeyb/images";break}switch(a){case 5:b="http://www2.clikpic.com/mcsimeyb/images";break}switch(a){case 22:b="http://tpc5/clikpic/mcsimeyb/images";break}switch(a){case 23:b="http://tpc10/clikpic/mcsimeyb/images";break}switch(a){case 25:b="http://tpc16/clikpic/mcsimeyb/images";break}switch(a){case 15:b="http://www3.clikpic.com/mcsimeyb/images";break}switch(a){case 18:b="http://www4.clikpic.com/mcsimeyb/images";break}switch(a){case 19:b="http://www5.clikpic.com/mcsimeyb/images";break}switch(a){case 31:b="http://www7.clikpic.com/mcsimeyb/images";break}switch(a){case 32:b="http://admin2.clikpic.com/mcsimeyb/images";break}switch(a){case 33:b="http://www8.clikpic.com/mcsimeyb/images";break}switch(a){case 34:b="http://www9.clikpic.com/mcsimeyb/images";break}switch(a){case 35:b="http://admin3.clikpic.com/mcsimeyb/images";break}switch(a){case 37:b="http://admin4.clikpic.com/mcsimeyb/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="My Photography Journey: "+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="MCSIMEYB">';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+'")'})}}};