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[4684370]=new thumbnail(4684370,"246544","","DEB_6086_CROP_thumb.jpg",130,94,18);thumbnails[4684373]=new thumbnail(4684373,"246544","","DEB_6170_thumb.jpg",130,179,18);thumbnails[4684374]=new thumbnail(4684374,"246544","","DEB_6222_POP_thumb.jpg",130,179,18);thumbnails[4695992]=new thumbnail(4695992,"246544","","JAM_6119_ANT_thumb.jpg",130,179,18);thumbnails[4695993]=new thumbnail(4695993,"246544","","JAM_6127_ANT_thumb.jpg",130,94,18);thumbnails[4695994]=new thumbnail(4695994,"246544","","JAM_6129_BW_thumb.jpg",130,94,18);thumbnails[4695995]=new thumbnail(4695995,"246544","","JAM_6177_thumb.jpg",130,179,18);thumbnails[4475735]=new thumbnail(4475735,"246544","","DMZ_4681_thumb.jpg",130,163,18);thumbnails[4475737]=new thumbnail(4475737,"246544","","DMZ_4782_thumb.jpg",130,104,18);thumbnails[4475739]=new thumbnail(4475739,"246544","","DMZ_4812_BW_thumb.jpg",130,104,18);thumbnails[4475740]=new thumbnail(4475740,"246544","","DMZ_4816_thumb.jpg",130,104,18);thumbnails[4475743]=new thumbnail(4475743,"246544","","DMZ_4867_thumb.jpg",130,179,18);thumbnails[4475744]=new thumbnail(4475744,"246544","","DMZ_4880_thumb.jpg",130,179,18);thumbnails[4475746]=new thumbnail(4475746,"246544","","DMZ_4901_GLAM_GLOW_thumb.jpg",130,179,18);thumbnails[4475747]=new thumbnail(4475747,"246544","","DMZ_4904_thumb.jpg",130,94,18);thumbnails[4475750]=new thumbnail(4475750,"246544","","DMZ_4934_thumb.jpg",130,179,18);thumbnails[4475752]=new thumbnail(4475752,"246544","","DMZ_4963_BW_thumb.jpg",130,179,18);thumbnails[4475753]=new thumbnail(4475753,"246544","","DMZ_4965_BW_thumb.jpg",130,94,18);thumbnails[4475755]=new thumbnail(4475755,"246544","","DMZ_4979_GLAM_GLOW_thumb.jpg",130,94,18);thumbnails[4475757]=new thumbnail(4475757,"246544","","DMZ_5061_thumb.jpg",130,94,18);thumbnails[4475759]=new thumbnail(4475759,"246544","","DMZ_5133_GLAM_GLOW_thumb.jpg",130,94,18);thumbnails[4475760]=new thumbnail(4475760,"246544","","DMZ_5144_GLAM_GLOW_thumb.jpg",130,94,18);thumbnails[4475762]=new thumbnail(4475762,"246544","","DMZ_5161_CROP_thumb.jpg",130,179,18);thumbnails[4475764]=new thumbnail(4475764,"246544","","DMZ_5182_thumb.jpg",130,94,18);thumbnails[4113179]=new thumbnail(4113179,"246544","","DSC_2969_thumb.jpg",130,174,18);thumbnails[4113173]=new thumbnail(4113173,"246544","","DSC_2880_thumb.jpg",130,174,18);thumbnails[4113176]=new thumbnail(4113176,"246544","","DSC_2944_thumb.jpg",130,174,18);thumbnails[4113180]=new thumbnail(4113180,"246544","","DSC_2980-BW_thumb.jpg",130,174,18);thumbnails[4113170]=new thumbnail(4113170,"246544","","_DSC_3003-BW_thumb.jpg",130,174,18);thumbnails[3133014]=new thumbnail(3133014,"115299","","m&m-11_thumb.jpg",130,130,18);thumbnails[1715946]=new thumbnail(1715946,"115299","","DSC_0037_thumb.jpg",130,173,18);thumbnails[1715912]=new thumbnail(1715912,"115299","","2jpg1_thumb.jpg",130,130,18);thumbnails[1715947]=new thumbnail(1715947,"115299","","DSC_0059_thumb.jpg",130,130,18);thumbnails[1723509]=new thumbnail(1723509,"115299","","CON1jpg_thumb.jpg",130,130,18);thumbnails[1715919]=new thumbnail(1715919,"115299","","12ajpg1_thumb.jpg",130,130,18);thumbnails[1715948]=new thumbnail(1715948,"115299","","DSC_0076_thumb.jpg",130,130,18);thumbnails[3275025]=new thumbnail(3275025,"115299","","2_thumb.jpg",130,130,18);thumbnails[1715914]=new thumbnail(1715914,"115299","","4jpg1_thumb.jpg",130,130,18);thumbnails[1715949]=new thumbnail(1715949,"115299","","DSC_2065_thumb.jpg",130,98,18);thumbnails[3278019]=new thumbnail(3278019,"115299","","14_thumb.jpg",130,130,18);thumbnails[3275027]=new thumbnail(3275027,"115299","","4_thumb.jpg",130,130,18);thumbnails[1723516]=new thumbnail(1723516,"115299","","JO SILHOUETTE 2jpg_thumb.jpg",130,130,18);thumbnails[1723517]=new thumbnail(1723517,"115299","","LAUREN1jpg_thumb.jpg",130,130,18);thumbnails[1723518]=new thumbnail(1723518,"115299","","LAUREN2jpg_thumb.jpg",130,130,18);thumbnails[1723520]=new thumbnail(1723520,"115299","","NIKKI 1jpg_thumb.jpg",130,130,18);thumbnails[1723524]=new thumbnail(1723524,"115299","","SAM 1jpg_thumb.jpg",130,130,18);thumbnails[5394219]=new thumbnail(5394219,"115797","","MKB_8426_BW_thumb.JPG",130,94,18);thumbnails[5394224]=new thumbnail(5394224,"115797","","MKB_8434_thumb.JPG",130,179,18);thumbnails[5394225]=new thumbnail(5394225,"115797","","MKB_8438_thumb.JPG",130,179,18);thumbnails[5394227]=new thumbnail(5394227,"115797","","MKB_8440_DARK_SEPIA_thumb.JPG",130,179,18);thumbnails[5394229]=new thumbnail(5394229,"115797","","MKB_8468_ANTIQUE_1_thumb.JPG",130,179,18);thumbnails[5394230]=new thumbnail(5394230,"115797","","MKB_8527_thumb.JPG",130,179,18);thumbnails[5483090]=new thumbnail(5483090,"115797","","MKB_8832_thumb.JPG",130,179,18);thumbnails[5483096]=new thumbnail(5483096,"115797","","MKB_8803_thumb.JPG",130,204,18);thumbnails[5483100]=new thumbnail(5483100,"115797","","MKB_8749_thumb.JPG",130,179,18);thumbnails[5483103]=new thumbnail(5483103,"115797","","MKB_8908_thumb.JPG",130,179,18);thumbnails[5483106]=new thumbnail(5483106,"115797","","MKB_8909_thumb.JPG",130,179,18);thumbnails[5219229]=new thumbnail(5219229,"115797","","ALF_6717_ANT_thumb.jpg",130,179,18);thumbnails[5219230]=new thumbnail(5219230,"115797","","ALF_6726_thumb.jpg",130,239,18);thumbnails[5219231]=new thumbnail(5219231,"115797","","ALF_6752_thumb.jpg",130,179,18);thumbnails[5219234]=new thumbnail(5219234,"115797","","BRI_6798_thumb.jpg",130,179,18);thumbnails[5219235]=new thumbnail(5219235,"115797","","BRI_6802_thumb.jpg",130,179,18);thumbnails[5219237]=new thumbnail(5219237,"115797","","BRI_6817_thumb.jpg",130,179,18);thumbnails[5219245]=new thumbnail(5219245,"115797","","BRI_7063_thumb.jpg",130,179,18);thumbnails[5219240]=new thumbnail(5219240,"115797","","BRI_6936_thumb.jpg",130,179,18);thumbnails[5219241]=new thumbnail(5219241,"115797","","BRI_6978_thumb.jpg",130,179,18);thumbnails[5219242]=new thumbnail(5219242,"115797","","BRI_6988_thumb.jpg",130,179,18);thumbnails[5219243]=new thumbnail(5219243,"115797","","BRI_7015_thumb.jpg",130,179,18);thumbnails[5219247]=new thumbnail(5219247,"115797","","BRI_7093_CROP_thumb.jpg",130,179,18);thumbnails[5219248]=new thumbnail(5219248,"115797","","BRI_7093_thumb.jpg",130,179,18);thumbnails[5219250]=new thumbnail(5219250,"115797","","BRI_7128_thumb.jpg",130,94,18);thumbnails[5219251]=new thumbnail(5219251,"115797","","BRI_7133_thumb.jpg",130,179,18);thumbnails[5219252]=new thumbnail(5219252,"115797","","BRI_7139_thumb.jpg",130,94,18);thumbnails[5219253]=new thumbnail(5219253,"115797","","BRI_7141_thumb.jpg",130,179,18);thumbnails[3317938]=new thumbnail(3317938,"11616","","DSC_0016 BW_thumb.jpg",130,130,18);thumbnails[3317939]=new thumbnail(3317939,"11616","","DSC_0018_thumb.jpg",130,130,18);thumbnails[3317940]=new thumbnail(3317940,"11616","","DSC_0026_thumb.jpg",130,130,18);thumbnails[3317941]=new thumbnail(3317941,"11616","","DSC_0032_thumb.jpg",130,130,18);thumbnails[3317942]=new thumbnail(3317942,"11616","","DSC_00371_thumb.jpg",130,130,18);thumbnails[3317943]=new thumbnail(3317943,"11616","","DSC_0064_thumb.jpg",130,130,18);thumbnails[3317944]=new thumbnail(3317944,"11616","","DSC_0071_thumb.jpg",130,130,18);thumbnails[3317945]=new thumbnail(3317945,"11616","","DSC_0095_thumb.jpg",130,130,18);thumbnails[3317948]=new thumbnail(3317948,"11616","","LG!!_0027jpg_thumb.jpg",130,130,18);thumbnails[3317949]=new thumbnail(3317949,"11616","","LG!!_0088jpg_thumb.jpg",130,130,18);thumbnails[3317950]=new thumbnail(3317950,"11616","","LG!!_2020_thumb.jpg",130,130,18);thumbnails[3317951]=new thumbnail(3317951,"11616","","LG11_3020jpg1_thumb.jpg",130,130,18);var galleries=new Object();galleries[246544]=new gallery(246544,"4695995,4695994,4695993,4695992,4684374,4684373,4684370,4475764,4475762,4475760","Studio & Fashion","gallery",[4684370,4684373,4684374,4695992,4695993,4695994,4695995,4475735,4475737,4475739,4475740,4475743,4475744,4475746,4475747,4475750,4475752,4475753,4475755,4475757,4475759,4475760,4475762,4475764,4113179,4113173,4113176,4113180,4113170]);galleries[115299]=new gallery(115299,"3278019,3275027,3275025,3133014,1723524,1723520,1723518,1723517,1723516,1723509","Portraits","gallery",[3133014,1715946,1715912,1715947,1723509,1715919,1715948,3275025,1715914,1715949,3278019,3275027,1723516,1723517,1723518,1723520,1723524]);galleries[115797]=new gallery(115797,"5219237","Weddings & Bridal Portraits","gallery",[5394219,5394224,5394225,5394227,5394229,5394230,5483090,5483096,5483100,5483103,5483106,5219229,5219230,5219231,5219234,5219235,5219237,5219245,5219240,5219241,5219242,5219243,5219247,5219248,5219250,5219251,5219252,5219253]);galleries[302037]=new gallery(302037,"","Headshots","gallery",[]);galleries[302038]=new gallery(302038,"","Food & Commercial","gallery",[]);galleries[319324]=new gallery(319324,"","Pregnancy Portraits","gallery",[]);galleries[11616]=new gallery(11616,"3317944","School Proms","gallery",[3317938,3317939,3317940,3317941,3317942,3317943,3317944,3317945,3317948,3317949,3317950,3317951]);var imageSets=new Object();imageSets[59686]="5483106,5483103,5483100,5483096,5483090,5394230,5394229,5394227,5394225,5394224,5394219,5219253,5219252,5219251,5219250,5219248,5219247,5219245,5219243,5219242,5219241,5219240,5219237,5219235,5219234,5219231,5219230,5219229,4695995,4695994,4695993,4695992,4684374,4684373,4684370,4475764,4475762,4475760,4475759,4475757,4475755,4475753,4475752,4475750,4475747,4475746,4475744,4475743,4475740,4475739,4475737,4475735,3317950,3317949,3317948,3317944,3317943,3317942,3317941,3317940,3317939,3317938,3278019,3275027,3275025,3133014,1723524,1723520,1723518,1723517,1723516,1723509,1715949,1715948,1715947,1715946,1715919,1715914,1715912";imageSets[1]="5483106,5483103,5483100,5483096,5483090,5394230,5394229,5394227,5394225,5394224,5394219,5219253,5219252,5219251,5219250,5219248,5219247,5219245,5219243,5219242,5219241,5219240,5219237,5219235,5219234,5219231,5219230,5219229,4695995,4695994,4695993,4695992,4684374,4684373,4684370,4475764,4475762,4475760,4475759,4475757,4475755,4475753,4475752,4475750,4475747,4475746,4475744,4475743,4475740,4475739";imageSets[2]="5219237,3317944";imageSets[3]="5483106,5483103,5483100,5483096,5483090,5394230,5394229,5394227,5394225,5394224,5394219,5219253,5219252,5219251,5219250,5219248,5219247,5219245,5219243,5219242,5219241,5219240,5219237,5219235,5219234,5219231,5219230,5219229,4695995,4695994,4695993,4695992,4684374,4684373,4684370,4475764,4475762,4475760,4475759,4475757,4475755,4475753,4475752,4475750,4475747,4475746,4475744,4475743,4475740,4475739";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/darmil2006/images";break}switch(a){case 1:b="http://www1.clikpic.com/darmil2006/images";break}switch(a){case 2:b="http://admin.clikpic.com/darmil2006/images";break}switch(a){case 24:b="http://tpc15/clikpic/darmil2006/images";break}switch(a){case 4:b="http://www.clikchurch.com/darmil2006/images";break}switch(a){case 5:b="http://www2.clikpic.com/darmil2006/images";break}switch(a){case 22:b="http://tpc5/clikpic/darmil2006/images";break}switch(a){case 23:b="http://tpc10/clikpic/darmil2006/images";break}switch(a){case 25:b="http://tpc16/clikpic/darmil2006/images";break}switch(a){case 15:b="http://www3.clikpic.com/darmil2006/images";break}switch(a){case 18:b="http://www4.clikpic.com/darmil2006/images";break}switch(a){case 19:b="http://www5.clikpic.com/darmil2006/images";break}switch(a){case 31:b="http://www7.clikpic.com/darmil2006/images";break}switch(a){case 32:b="http://admin2.clikpic.com/darmil2006/images";break}switch(a){case 33:b="http://www8.clikpic.com/darmil2006/images";break}switch(a){case 34:b="http://www9.clikpic.com/darmil2006/images";break}switch(a){case 35:b="http://admin3.clikpic.com/darmil2006/images";break}switch(a){case 37:b="http://admin4.clikpic.com/darmil2006/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="Miles of Smiles - natural, vibrant & fun portraits: "+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="darren1105@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="darren1105@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+'")'})}}};