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[5361696]=new thumbnail(5361696,"332844","","_MG_0051_thumb.jpg",130,87,1);thumbnails[5361699]=new thumbnail(5361699,"332844","","_MG_0055_thumb.jpg",130,195,1);thumbnails[5361701]=new thumbnail(5361701,"332844","","_MG_0049_thumb.jpg",130,91,1);thumbnails[5361703]=new thumbnail(5361703,"332844","","_MG_0064_23E0BB34-1D09-001F-9985E294C4E127F2_thumb.jpg",130,195,1);thumbnails[5361704]=new thumbnail(5361704,"332844","","_MG_0077_thumb.jpg",130,195,1);thumbnails[5361712]=new thumbnail(5361712,"332844","","_MG_0110_thumb.jpg",130,86,1);thumbnails[5361716]=new thumbnail(5361716,"332844","","_MG_0116_thumb.jpg",130,195,1);thumbnails[5361720]=new thumbnail(5361720,"332844","","_MG_0136_thumb.jpg",130,195,1);thumbnails[5710689]=new thumbnail(5710689,"332844","","_MG_0088_thumb.jpg",130,195,1);thumbnails[5710690]=new thumbnail(5710690,"332844","","_MG_0113_thumb.jpg",130,195,1);thumbnails[5710691]=new thumbnail(5710691,"332844","","_MG_0096_thumb.jpg",130,195,1);thumbnails[5837897]=new thumbnail(5837897,"302073","","_MG_00071_thumb.jpg",130,195,1);thumbnails[5837913]=new thumbnail(5837913,"302073","","_MG_0024_thumb.jpg",130,87,1);thumbnails[5837916]=new thumbnail(5837916,"302073","","_MG_0051-2_thumb.jpg",130,87,1);thumbnails[5844635]=new thumbnail(5844635,"302073","","_MG_0131_thumb.jpg",130,87,1);thumbnails[5877459]=new thumbnail(5877459,"302073","","6_thumb.jpg",130,87,1);thumbnails[5877469]=new thumbnail(5877469,"302073","","10_thumb.jpg",130,87,1);thumbnails[5877538]=new thumbnail(5877538,"302073","","18_thumb.jpg",130,89,1);thumbnails[5877542]=new thumbnail(5877542,"302073","","19_thumb.jpg",130,87,1);thumbnails[5877543]=new thumbnail(5877543,"302073","","23_thumb.jpg",130,93,1);thumbnails[5877544]=new thumbnail(5877544,"302073","","26_thumb.jpg",130,199,1);thumbnails[5877546]=new thumbnail(5877546,"302073","","20_thumb.jpg",130,97,1);thumbnails[5893293]=new thumbnail(5893293,"302073","","1_5AB9F07D-1D09-001F-9907DE26C5CFDCE4_thumb.jpg",130,93,1);thumbnails[5893299]=new thumbnail(5893299,"302073","","2_thumb.jpg",130,182,1);thumbnails[5893404]=new thumbnail(5893404,"302073","","3_thumb.jpg",130,89,1);thumbnails[5893419]=new thumbnail(5893419,"302073","","4_thumb.jpg",130,202,1);thumbnails[5893618]=new thumbnail(5893618,"302073","","11_thumb.jpg",130,87,1);thumbnails[5893627]=new thumbnail(5893627,"302073","","12_thumb.jpg",130,195,1);thumbnails[5893639]=new thumbnail(5893639,"302073","","14_thumb.jpg",130,195,1);thumbnails[5893890]=new thumbnail(5893890,"302073","","15_thumb.jpg",130,72,1);thumbnails[3984435]=new thumbnail(3984435,"141550","","tyne_3x2_thumb.jpg",130,94,1);thumbnails[5361814]=new thumbnail(5361814,"141550","","snow_field_thumb.jpg",130,64,1);thumbnails[2356392]=new thumbnail(2356392,"141550","","loch-2_thumb.jpg",130,86,1);thumbnails[2328382]=new thumbnail(2328382,"141550","","_MG_0045_thumb.jpg",130,87,1);thumbnails[2129532]=new thumbnail(2129532,"141550","","IMG_2859-Edit_thumb.jpg",130,70,1);thumbnails[5361870]=new thumbnail(5361870,"141550","","Winter_snow_web_thumb.jpg",130,86,1);thumbnails[2328400]=new thumbnail(2328400,"141550","","Bridge_thumb.jpg",130,87,1);thumbnails[2328153]=new thumbnail(2328153,"141550","","_MG_0012_thumb.jpg",130,195,1);thumbnails[2129591]=new thumbnail(2129591,"141550","","Crag_thumb.jpg",130,195,1);thumbnails[2129590]=new thumbnail(2129590,"141550","","Boat House_thumb.jpg",130,195,1);thumbnails[2129529]=new thumbnail(2129529,"141550","","IMG_25451_thumb.jpg",130,87,1);thumbnails[2129541]=new thumbnail(2129541,"141550","","A quiet town_thumb.jpg",130,64,1);thumbnails[2328397]=new thumbnail(2328397,"141550","","_MG_0105_thumb.jpg",130,193,1);thumbnails[2129592]=new thumbnail(2129592,"141550","","firing range_thumb.jpg",130,48,1);thumbnails[2328399]=new thumbnail(2328399,"141550","","_MG_0123_thumb.jpg",130,195,1);thumbnails[2129534]=new thumbnail(2129534,"141550","","tides out(2)1_thumb.jpg",130,70,1);thumbnails[2328388]=new thumbnail(2328388,"141550","","_MG_0102_thumb.jpg",130,87,1);thumbnails[2129539]=new thumbnail(2129539,"141550","","_MG_3924_thumb.jpg",130,87,1);thumbnails[2129545]=new thumbnail(2129545,"141550","","Gate HDR_thumb.jpg",130,198,1);thumbnails[2129536]=new thumbnail(2129536,"141550","","_MG_3897_thumb.jpg",130,87,1);thumbnails[2129546]=new thumbnail(2129546,"141550","","waters edge_thumb.jpg",130,195,1);thumbnails[2129588]=new thumbnail(2129588,"141550","","_MG_4527_thumb.jpg",130,195,1);thumbnails[3765402]=new thumbnail(3765402,"141550","","sept-31_thumb.jpg",130,87,1);thumbnails[2129586]=new thumbnail(2129586,"141550","","_MG_4166_thumb.jpg",130,195,1);thumbnails[2129587]=new thumbnail(2129587,"141550","","_MG_4469_thumb.jpg",130,195,1);thumbnails[2129530]=new thumbnail(2129530,"141550","","IMG_25541_thumb.jpg",130,87,1);thumbnails[2374170]=new thumbnail(2374170,"141550","","_MG_0034_thumb.jpg",130,87,1);thumbnails[2129548]=new thumbnail(2129548,"141569","","_MG_0001_thumb.jpg",130,195,1);thumbnails[2129550]=new thumbnail(2129550,"141569","","_MG_0004_thumb.jpg",130,195,1);thumbnails[2129551]=new thumbnail(2129551,"141569","","_MG_0005_thumb.jpg",130,195,1);thumbnails[2129552]=new thumbnail(2129552,"141569","","_MG_0064_thumb.jpg",130,87,1);thumbnails[2129553]=new thumbnail(2129553,"141569","","Steve_thumb.jpg",130,197,1);thumbnails[2357208]=new thumbnail(2357208,"141569","","_MG_0126_thumb.jpg",130,87,1);thumbnails[2357245]=new thumbnail(2357245,"141569","","_MG_0137_thumb.jpg",130,87,1);thumbnails[2357246]=new thumbnail(2357246,"141569","","_MG_0141_thumb.jpg",130,195,1);thumbnails[2357341]=new thumbnail(2357341,"141569","","idea2_thumb.jpg",130,87,1);thumbnails[2357345]=new thumbnail(2357345,"141569","","idea3_thumb.jpg",130,195,1);thumbnails[2587904]=new thumbnail(2587904,"141569","","in the style of_thumb.jpg",130,87,1);thumbnails[2587909]=new thumbnail(2587909,"141569","","Beauty In a Box_final_thumb.jpg",130,195,1);thumbnails[2730347]=new thumbnail(2730347,"141569","","_MG_4263_thumb.jpg",130,87,1);thumbnails[2787053]=new thumbnail(2787053,"141569","","sept-1_thumb.jpg",130,85,1);thumbnails[2787056]=new thumbnail(2787056,"141569","","sept-2_thumb.jpg",130,195,1);thumbnails[3732375]=new thumbnail(3732375,"141569","","_MG_3972_thumb.jpg",130,195,1);thumbnails[3732379]=new thumbnail(3732379,"141569","","_MG_3968_thumb.jpg",130,195,1);thumbnails[3732381]=new thumbnail(3732381,"141569","","_MG_3965_thumb.jpg",130,215,1);thumbnails[3732386]=new thumbnail(3732386,"141569","","_MG_3987_thumb.jpg",130,195,1);thumbnails[4441668]=new thumbnail(4441668,"141569","","_MG_4269_thumb.jpg",130,87,1);thumbnails[2129595]=new thumbnail(2129595,"150362","","Pitcher+Piano1_thumb.jpg",130,122,1);thumbnails[2294030]=new thumbnail(2294030,"150362","","_MG_0154_thumb.jpg",130,210,1);thumbnails[2294031]=new thumbnail(2294031,"150362","","_MG_0156_thumb.jpg",130,87,1);thumbnails[2294034]=new thumbnail(2294034,"150362","","_MG_0157_thumb.jpg",130,195,1);thumbnails[2294036]=new thumbnail(2294036,"150362","","_MG_0158_thumb.jpg",130,195,1);thumbnails[2294038]=new thumbnail(2294038,"150362","","_MG_0160_thumb.jpg",130,195,1);thumbnails[5837100]=new thumbnail(5837100,"150362","","Dance_Studio_thumb.jpg",130,88,1);thumbnails[5837102]=new thumbnail(5837102,"150362","","Studio_4_thumb.jpg",130,195,1);thumbnails[5837230]=new thumbnail(5837230,"150362","","SmithyBistro3_thumb.jpg",130,87,1);thumbnails[5837223]=new thumbnail(5837223,"150362","","SmithyBistro2-Edit_thumb.jpg",130,74,1);thumbnails[2129559]=new thumbnail(2129559,"53326","","_MG_4203_thumb.jpg",130,195,1);thumbnails[2129561]=new thumbnail(2129561,"53326","","_MG_4426_thumb.jpg",130,195,1);thumbnails[2129563]=new thumbnail(2129563,"53326","","_MG_4445_thumb.jpg",130,87,1);thumbnails[2129565]=new thumbnail(2129565,"53326","","IMG_3106_thumb.jpg",130,195,1);thumbnails[2129589]=new thumbnail(2129589,"53326","","Beemer_thumb.jpg",130,87,1);thumbnails[2129593]=new thumbnail(2129593,"53326","","Studio 4_thumb.jpg",130,195,1);thumbnails[2314630]=new thumbnail(2314630,"53326","","Sparklets_thumb.jpg",130,164,1);thumbnails[2374175]=new thumbnail(2374175,"53326","","_MG_0117_thumb.jpg",130,87,1);thumbnails[2374180]=new thumbnail(2374180,"53326","","_MG_0081_thumb.jpg",130,87,1);thumbnails[3234421]=new thumbnail(3234421,"53326","","Magazine image1_thumb.jpg",130,196,1);thumbnails[2777694]=new thumbnail(2777694,"53326","","Dance City-171_thumb.jpg",130,87,1);thumbnails[2777643]=new thumbnail(2777643,"53326","","Dance City_thumb.jpg",130,195,1);thumbnails[2777611]=new thumbnail(2777611,"53326","","Dance City-34_thumb.jpg",130,87,1);var galleries=new Object();galleries[332844]=new gallery(332844,"5361712,5361696","<strong> Simon & Donne </strong>","gallery",[5361696,5361699,5361701,5361703,5361704,5361712,5361716,5361720,5710689,5710690,5710691]);galleries[302073]=new gallery(302073,"5893890,5893639,5893627,5893618,5893419,5893404,5893299,5893293,5877546,5877544","<strong>Tim & Jane</strong>","gallery",[5837897,5837913,5837916,5844635,5877459,5877469,5877538,5877542,5877543,5877544,5877546,5893293,5893299,5893404,5893419,5893618,5893627,5893639,5893890]);galleries[141550]=new gallery(141550,"2356392","<strong>LANDSCAPES</strong>","gallery",[3984435,5361814,2356392,2328382,2129532,5361870,2328400,2328153,2129591,2129590,2129529,2129541,2328397,2129592,2328399,2129534,2328388,2129539,2129545,2129536,2129546,2129588,3765402,2129586,2129587,2129530,2374170]);galleries[332840]=new gallery(332840,"5361712,5361696","<strong>WEDDINGS</strong>","gallery",[]);galleries[141569]=new gallery(141569,"2730347,2357245,2129552","<strong>PORTRAITS</strong>","gallery",[2129548,2129550,2129551,2129552,2129553,2357208,2357245,2357246,2357341,2357345,2587904,2587909,2730347,2787053,2787056,3732375,3732379,3732381,3732386,4441668]);galleries[150362]=new gallery(150362,"5837223,2294031","<strong>ARCHITECTURE & INTERIORS</strong>","gallery",[2129595,2294030,2294031,2294034,2294036,2294038,5837100,5837102,5837230,5837223]);galleries[53326]=new gallery(53326,"2129589","<strong>OTHER</strong>","gallery",[2129559,2129561,2129563,2129565,2129589,2129593,2314630,2374175,2374180,3234421,2777694,2777643,2777611]);var imageSets=new Object();imageSets[1]="5361716,2777694,2730347,2356392,2328400,2129589,2129552,2129541,2129532";imageSets[2]="5837223,5361712,5361696,2730347,2357245,2356392,2294031,2129589,2129552";imageSets[3]="5893890,5893639,5893627,5893618,5893419,5893404,5893299,5893293,5877546,5877544,5877543,5877542,5877538,5877469,5877459,5844635,5837916,5837913,5837897,5837230,5837223,5837102,5837100,5710691,5710690,5710689,5361870,5361814,5361720,5361716,5361712,5361704,5361703,5361701,5361699,5361696,4441668,3984435,3765402,3732386,3732381,3732379,3732375,3234421,2787056,2787053,2777694,2777643,2777611,2730347";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/alexnic07/images";break}switch(a){case 1:b="http://www1.clikpic.com/alexnic07/images";break}switch(a){case 2:b="http://admin.clikpic.com/alexnic07/images";break}switch(a){case 24:b="http://tpc15/clikpic/alexnic07/images";break}switch(a){case 4:b="http://www.clikchurch.com/alexnic07/images";break}switch(a){case 5:b="http://www2.clikpic.com/alexnic07/images";break}switch(a){case 22:b="http://tpc5/clikpic/alexnic07/images";break}switch(a){case 23:b="http://tpc10/clikpic/alexnic07/images";break}switch(a){case 25:b="http://tpc16/clikpic/alexnic07/images";break}switch(a){case 15:b="http://www3.clikpic.com/alexnic07/images";break}switch(a){case 18:b="http://www4.clikpic.com/alexnic07/images";break}switch(a){case 19:b="http://www5.clikpic.com/alexnic07/images";break}switch(a){case 31:b="http://www7.clikpic.com/alexnic07/images";break}switch(a){case 32:b="http://admin2.clikpic.com/alexnic07/images";break}switch(a){case 33:b="http://www8.clikpic.com/alexnic07/images";break}switch(a){case 34:b="http://www9.clikpic.com/alexnic07/images";break}switch(a){case 35:b="http://admin3.clikpic.com/alexnic07/images";break}switch(a){case 37:b="http://admin4.clikpic.com/alexnic07/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="Alex Nicolson 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="ALEXNIC07">';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+'")'})}}};