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[4812079]=new thumbnail(4812079,"122818","","7x5_copy_2_thumb.jpg",130,98,18);thumbnails[4812087]=new thumbnail(4812087,"122818","","8x6_thumb.jpg",130,98,18);thumbnails[4812091]=new thumbnail(4812091,"122818","","Archlight10_copy_thumb.jpg",130,182,18);thumbnails[4812158]=new thumbnail(4812158,"122818","","IMG_5054A_copy_3_thumb.jpg",130,182,18);thumbnails[4812253]=new thumbnail(4812253,"122818","","Copy_right9_thumb.JPG",130,182,18);thumbnails[4812265]=new thumbnail(4812265,"122818","","IMG_6113A_copy_thumb.jpg",130,182,18);thumbnails[4812270]=new thumbnail(4812270,"122818","","photo_A_thumb.JPG",130,175,18);thumbnails[4812276]=new thumbnail(4812276,"122818","","Copy_right17_copy_thumb.jpg",130,182,18);thumbnails[4812281]=new thumbnail(4812281,"131220","","IMG_8618B_thumb.JPG",130,163,18);thumbnails[4812287]=new thumbnail(4812287,"131220","","portrat24_thumb.jpg",130,93,18);thumbnails[4812289]=new thumbnail(4812289,"131220","","IMG_8616A_thumb.JPG",130,163,18);thumbnails[4812290]=new thumbnail(4812290,"131220","","portrat25_thumb.jpg",130,93,18);thumbnails[4812294]=new thumbnail(4812294,"131220","","Rubi_canves_16x16_thumb.jpg",130,130,18);thumbnails[4812297]=new thumbnail(4812297,"131220","","IMG_0736_1_thumb.JPG",130,130,18);thumbnails[4812323]=new thumbnail(4812323,"131220","","IMG_8565_thumb.JPG",130,93,18);thumbnails[4812331]=new thumbnail(4812331,"111608","","arch7610x8_thumb.jpg",130,104,18);thumbnails[4812340]=new thumbnail(4812340,"111608","","16x12_for_canves_thumb.jpg",130,98,18);thumbnails[4812349]=new thumbnail(4812349,"111608","","Copy_right25_thumb.JPG",130,182,18);thumbnails[4812361]=new thumbnail(4812361,"111608","","loara10_copy_4_thumb.jpg",130,182,18);thumbnails[4812365]=new thumbnail(4812365,"111608","","portrat66_thumb.jpg",130,104,18);thumbnails[4812371]=new thumbnail(4812371,"111608","","IMG_5076B_thumb.JPG",130,170,18);thumbnails[4812372]=new thumbnail(4812372,"111608","","robeca_36_5x7_thumb.jpg",130,182,18);thumbnails[5433741]=new thumbnail(5433741,"","","IMG_8647__COPYRIGHT_copy_thumb.jpg",130,95,18);thumbnails[5433745]=new thumbnail(5433745,"307105","","IMG_8647__COPYRIGHT_copy1_thumb.jpg",130,95,18);thumbnails[5433747]=new thumbnail(5433747,"307105","","IMG_8662__COPYRIGHT_1_copy_thumb.jpg",130,163,18);thumbnails[5433790]=new thumbnail(5433790,"307105","","IMG_6512B_copy_thumb.jpg",130,183,18);thumbnails[5433793]=new thumbnail(5433793,"307105","","IMG_6516C_copy_thumb.jpg",130,95,18);thumbnails[5433795]=new thumbnail(5433795,"307105","","IMG_6520A_copy_thumb.jpg",130,159,18);thumbnails[5433797]=new thumbnail(5433797,"307105","","IMG_6523A_copy_thumb.jpg",130,91,18);thumbnails[5433799]=new thumbnail(5433799,"307105","","IMG_6526A_copy_thumb.jpg",130,102,18);thumbnails[5433801]=new thumbnail(5433801,"307105","","IMG_6533D_copy_thumb.jpg",130,181,18);thumbnails[5752268]=new thumbnail(5752268,"157156","","IMG_1005__COPYRIGHT_thumb.JPG",130,182,18);thumbnails[5752307]=new thumbnail(5752307,"157156","","IMG_1066__COPYRIGHT_thumb.JPG",130,173,18);thumbnails[5842682]=new thumbnail(5842682,"157156","","first_communion_5_thumb.JPG",130,195,18);thumbnails[5842687]=new thumbnail(5842687,"157156","","IMG_1029__COPYRIGHT_thumb.JPG",130,182,18);thumbnails[5842690]=new thumbnail(5842690,"157156","","IMG_1051__COPYRIGHT_thumb.JPG",130,108,18);thumbnails[5842694]=new thumbnail(5842694,"157156","","IMG_1053__COPYRIGHT_copy_thumb.jpg",130,108,18);thumbnails[5842700]=new thumbnail(5842700,"157156","","IMG_2913B_thumb.JPG",130,182,18);thumbnails[5842707]=new thumbnail(5842707,"157156","","IMG_1068__COPYRIGHT_thumb.JPG",130,178,18);thumbnails[6378303]=new thumbnail(6378303,"307105","","2_thumb.jpg",130,191,18);thumbnails[6378305]=new thumbnail(6378305,"307105","","3_thumb.jpg",130,104,18);thumbnails[6378318]=new thumbnail(6378318,"307105","","Archlight354_thumb.JPG",130,127,18);thumbnails[6378361]=new thumbnail(6378361,"307105","","IMG_8516_copy_thumb.jpg",130,107,18);thumbnails[6378365]=new thumbnail(6378365,"307105","","IMG_1485_copy_thumb.jpg",130,164,18);thumbnails[6378368]=new thumbnail(6378368,"307105","","IMG_1506_MC___thumb.JPG",130,62,18);thumbnails[6378369]=new thumbnail(6378369,"307105","","IMG_1465_copy_thumb.jpg",130,153,18);thumbnails[6378375]=new thumbnail(6378375,"307105","","IMG_1490_copy_thumb.jpg",130,195,18);thumbnails[6378379]=new thumbnail(6378379,"307105","","IMG_1828_thumb.JPG",130,87,18);thumbnails[6378380]=new thumbnail(6378380,"307105","","IMG_1819_copy_thumb.jpg",130,187,18);thumbnails[6378383]=new thumbnail(6378383,"307105","","IMG_1897_copy_thumb.jpg",130,99,18);thumbnails[6378388]=new thumbnail(6378388,"307105","","IMG_1777_copy_thumb.jpg",130,108,18);thumbnails[6378389]=new thumbnail(6378389,"307105","","IMG_1676_thumb.JPG",130,163,18);thumbnails[6378392]=new thumbnail(6378392,"307105","","IMG_1680_thumb.JPG",130,176,18);thumbnails[6378394]=new thumbnail(6378394,"307105","","Z-1515_copy_thumb.jpg",130,152,18);thumbnails[6378396]=new thumbnail(6378396,"307105","","Z-4389_thumb.jpg",130,118,18);thumbnails[6378405]=new thumbnail(6378405,"307105","","Z_thumb.jpg",130,97,18);thumbnails[6378406]=new thumbnail(6378406,"307105","","Z-1580_thumb.jpg",130,104,18);thumbnails[6378407]=new thumbnail(6378407,"307105","","Z-4409_thumb.jpg",130,186,18);thumbnails[6378408]=new thumbnail(6378408,"307105","","Z-1514_thumb.jpg",130,95,18);thumbnails[6378425]=new thumbnail(6378425,"307105","","Z-2_thumb.jpg",130,195,18);thumbnails[6378426]=new thumbnail(6378426,"307105","","Z-1862_thumb.jpg",130,87,18);thumbnails[6378427]=new thumbnail(6378427,"307105","","Z-1815_thumb.jpg",130,184,18);thumbnails[6378428]=new thumbnail(6378428,"307105","","Z-1558_copy_thumb.jpg",130,157,18);thumbnails[6378429]=new thumbnail(6378429,"307105","","IMG_1542_copy_thumb.jpg",130,151,18);thumbnails[6378437]=new thumbnail(6378437,"111608","","IMG_4884A_DxO_thumb.jpg",130,108,18);thumbnails[6378438]=new thumbnail(6378438,"111608","","IMG_5016A_copy_thumb.jpg",130,132,18);thumbnails[6378439]=new thumbnail(6378439,"111608","","IMG_4904A_copy_thumb.jpg",130,74,18);thumbnails[4811302]=new thumbnail(4811302,"111163","","IMG_5176B_thumb.JPG",130,195,18);thumbnails[4811312]=new thumbnail(4811312,"111163","","Copy_rightA_41_thumb.JPG",130,108,18);thumbnails[4811315]=new thumbnail(4811315,"111163","","Copy_rightA_29_thumb.JPG",130,106,18);thumbnails[4811318]=new thumbnail(4811318,"111163","","IMG_5506B_thumb.JPG",130,108,18);thumbnails[4811333]=new thumbnail(4811333,"111163","","IMG_5427A_thumb.JPG",130,93,18);thumbnails[4811344]=new thumbnail(4811344,"111163","","Copy_rightB_2_thumb.JPG",130,143,18);thumbnails[4811352]=new thumbnail(4811352,"111163","","Copy_rightA_30_thumb.JPG",130,90,18);thumbnails[4811357]=new thumbnail(4811357,"111163","","IMG_5509A_thumb.JPG",130,94,18);thumbnails[4811362]=new thumbnail(4811362,"111163","","IMG_5515A_thumb.JPG",130,66,18);thumbnails[4811365]=new thumbnail(4811365,"111163","","IMG_5545A_thumb.JPG",130,103,18);thumbnails[4811372]=new thumbnail(4811372,"111163","","IMG_5547A_copy_2_thumb.jpg",130,87,18);thumbnails[4811375]=new thumbnail(4811375,"111163","","IMG_5547A_1_copy_2_thumb.jpg",130,111,18);thumbnails[4811381]=new thumbnail(4811381,"111163","","IMG_5548A_thumb.JPG",130,172,18);thumbnails[4811387]=new thumbnail(4811387,"111163","","IMG_5578A_thumb.JPG",130,159,18);thumbnails[4811418]=new thumbnail(4811418,"111163","","IMG_5639D_thumb.JPG",130,173,18);thumbnails[4811429]=new thumbnail(4811429,"111163","","IMG_5656B_thumb.JPG",130,164,18);thumbnails[4811434]=new thumbnail(4811434,"111163","","IMG_5666D_thumb.JPG",130,99,18);thumbnails[4811438]=new thumbnail(4811438,"111163","","IMG_5683A_thumb.JPG",130,89,18);thumbnails[4811447]=new thumbnail(4811447,"111163","","IMG_5729C_thumb.JPG",130,74,18);thumbnails[4811453]=new thumbnail(4811453,"111163","","IMG_5806D_thumb.JPG",130,119,18);thumbnails[4811459]=new thumbnail(4811459,"111163","","IMG_5838A_copy_thumb.jpg",130,101,18);thumbnails[4811465]=new thumbnail(4811465,"111163","","photo4_thumb.jpg",130,74,18);thumbnails[4811471]=new thumbnail(4811471,"111163","","Untitled-1_thumb.jpg",130,108,18);thumbnails[4811480]=new thumbnail(4811480,"111163","","12x16_thumb.jpg",130,156,18);thumbnails[4811489]=new thumbnail(4811489,"111163","","IMG_5560A_thumb.JPG",130,102,18);thumbnails[4811496]=new thumbnail(4811496,"111163","","IMG_5654D_thumb.JPG",130,173,18);thumbnails[4812046]=new thumbnail(4812046,"111163","","Copy_right21_thumb.JPG",130,62,18);var galleries=new Object();galleries[131220]=new gallery(131220,"4812323,4812297,4812294,4812290,4812289,4812287,4812281","Baby and  Toddler","gallery",[4812281,4812287,4812289,4812290,4812294,4812297,4812323]);galleries[122818]=new gallery(122818,"4812276,4812270,4812265,4812253,4812158,4812091,4812087,4812079","Black and White","gallery",[4812079,4812087,4812091,4812158,4812253,4812265,4812270,4812276]);galleries[157156]=new gallery(157156,"5842707,5842700,5842694,5842690,5842687,5842682,5752307,5752268","First Communions/christening 's","gallery",[5752268,5752307,5842682,5842687,5842690,5842694,5842700,5842707]);galleries[111608]=new gallery(111608,"6378439,6378438,6378437,4812372,4812371,4812365,4812361,4812349,4812340,4812331","Portraits","gallery",[4812331,4812340,4812349,4812361,4812365,4812371,4812372,6378437,6378438,6378439]);galleries[307105]=new gallery(307105,"6378429,6378428,6378427,6378426,6378425,6378408,6378407,6378406,6378405,6378396","WEdding","gallery",[5433745,5433747,5433790,5433793,5433795,5433797,5433799,5433801,6378303,6378305,6378318,6378361,6378365,6378368,6378369,6378375,6378379,6378380,6378383,6378388,6378389,6378392,6378394,6378396,6378405,6378406,6378407,6378408,6378425,6378426,6378427,6378428,6378429]);galleries[111163]=new gallery(111163,"4812046,4811496,4811489,4811480,4811471,4811465,4811459,4811453,4811447,4811438"," Emma &ryne Wedding","gallery",[4811302,4811312,4811315,4811318,4811333,4811344,4811352,4811357,4811362,4811365,4811372,4811375,4811381,4811387,4811418,4811429,4811434,4811438,4811447,4811453,4811459,4811465,4811471,4811480,4811489,4811496,4812046]);var imageSets=new Object();imageSets[1]="6378439,6378438,6378437,6378429,6378428,6378427,6378426,6378425,6378408,6378407,6378406,6378405,6378396,6378394,6378392,6378389,6378388,6378383,6378380,6378379,6378375,6378369,6378368,6378365,6378361,6378318,6378305,6378303,5842707,5842700,5842694,5842690,5842687,5842682,5752307,5752268,5433801,5433799,5433797,5433795,5433793,5433790,5433747,5433745,5433741,4812372,4812371,4812365,4812361,4812349";imageSets[3]="4811372";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/Archlight/images";break}switch(a){case 1:b="http://www1.clikpic.com/Archlight/images";break}switch(a){case 2:b="http://admin.clikpic.com/Archlight/images";break}switch(a){case 24:b="http://tpc15/clikpic/Archlight/images";break}switch(a){case 4:b="http://www.clikchurch.com/Archlight/images";break}switch(a){case 5:b="http://www2.clikpic.com/Archlight/images";break}switch(a){case 22:b="http://tpc5/clikpic/Archlight/images";break}switch(a){case 23:b="http://tpc10/clikpic/Archlight/images";break}switch(a){case 25:b="http://tpc16/clikpic/Archlight/images";break}switch(a){case 15:b="http://www3.clikpic.com/Archlight/images";break}switch(a){case 18:b="http://www4.clikpic.com/Archlight/images";break}switch(a){case 19:b="http://www5.clikpic.com/Archlight/images";break}switch(a){case 31:b="http://www7.clikpic.com/Archlight/images";break}switch(a){case 32:b="http://admin2.clikpic.com/Archlight/images";break}switch(a){case 33:b="http://www8.clikpic.com/Archlight/images";break}switch(a){case 34:b="http://www9.clikpic.com/Archlight/images";break}switch(a){case 35:b="http://admin3.clikpic.com/Archlight/images";break}switch(a){case 37:b="http://admin4.clikpic.com/Archlight/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="Archlight 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="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="z_masood@hotmail.co.uk">';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="z_masood@hotmail.co.uk">';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+'")'})}}};