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[1549290]=new thumbnail(1549290,"104154","Bandstand in the Fog","Bandstand-in-the-FogClik_thumb.jpg",130,195,18);thumbnails[1635587]=new thumbnail(1635587,"104154","Number One Whitefriars","Whitefriars_clik_thumb.jpg",130,195,18);thumbnails[2171502]=new thumbnail(2171502,"104154","Eastgate Clock and Steps","Eastgate-Clock-9x6_clik_thumb.jpg",130,195,18);thumbnails[1531120]=new thumbnail(1531120,"104154","Queens Park Suspension Bridge","CH_05_thumb.jpg",130,87,18);thumbnails[1529806]=new thumbnail(1529806,"104154","Old Dee Bridge","Bridge_at_Nightclik_thumb.jpg",130,87,18);thumbnails[1517347]=new thumbnail(1517347,"104154","Kaleyard Steps","Chester_scenics_80_thumb.jpg",130,86,18);thumbnails[1612405]=new thumbnail(1612405,"104154","Queens Park Footbridge","Queens_Park_Bridge_clik_thumb.jpg",130,195,18);thumbnails[1517321]=new thumbnail(1517321,"104154","King Street in Chester","Chester_scenics_70_thumb.jpg",130,189,18);thumbnails[3283138]=new thumbnail(3283138,"104154","The Groves","CH_62Clik_thumb.jpg",130,195,18);thumbnails[2181221]=new thumbnail(2181221,"104154","Grosvenor Bridge at Sunset","Grosvenor-Bridge-Sunset_Clik_thumb.jpg",130,87,18);thumbnails[1684464]=new thumbnail(1684464,"104154","Old Dee Bridge and Handbridge","Old-Dee-Bridge_and Handbridge_Clik_thumb.jpg",130,88,18);thumbnails[1640146]=new thumbnail(1640146,"104154","The Falcon","Falcon_Clik_thumb.jpg",130,87,18);thumbnails[1529804]=new thumbnail(1529804,"104154","Groves Steps","Stepsclik_thumb.jpg",130,87,18);thumbnails[2160627]=new thumbnail(2160627,"104154","River Dee Sunrise","River-Dee-Sunrise_Clik_thumb.jpg",130,87,18);thumbnails[1681629]=new thumbnail(1681629,"104154","M56 Chester at Night","Motorway_Clik_thumb.jpg",130,87,18);thumbnails[1531709]=new thumbnail(1531709,"104154","St Werburgh Street","St-Werburgh-Streetclik_thumb.jpg",130,87,18);thumbnails[1645666]=new thumbnail(1645666,"104154","Christmas Lights","Christmas-Lights_Clik_thumb.jpg",130,88,18);thumbnails[1517322]=new thumbnail(1517322,"104154","Kaleyard Steps","Stepsclik2_thumb.jpg",130,87,18);thumbnails[1667352]=new thumbnail(1667352,"104154","Chester Cathedral West Door","Cathedral_West_Clik_thumb.jpg",130,195,18);thumbnails[1620840]=new thumbnail(1620840,"104154","Eastgate Clock","Eastgate_Clock_clik_thumb.jpg",130,195,18);thumbnails[2200125]=new thumbnail(2200125,"104154","The Old Rectory","CH_50_thumb.jpg",130,194,18);thumbnails[1683379]=new thumbnail(1683379,"104154","The Olde Edgar","Olde-Edgar_Clik_thumb.jpg",130,87,18);thumbnails[2200154]=new thumbnail(2200154,"104154","Chester Town Hall","CH_51_thumb.jpg",130,87,18);thumbnails[5369745]=new thumbnail(5369745,"104154","Chester Cross in the Snow","CH-84-Clik_thumb.jpg",130,87,18);thumbnails[5369748]=new thumbnail(5369748,"104154","Chester Groves","CH-86-Clik_thumb.jpg",130,87,18);thumbnails[5369746]=new thumbnail(5369746,"104154","Eastgate Clock","CH-85-Clik_thumb.jpg",130,87,18);thumbnails[1684203]=new thumbnail(1684203,"104154","Bridge Place","Bridge-Place_Clik_thumb.jpg",130,87,18);thumbnails[1517323]=new thumbnail(1517323,"104154","King Street Chester","Chester_scenics_50_thumb.jpg",130,197,18);thumbnails[5369743]=new thumbnail(5369743,"104154","Chester Walls in The Snow","CH-83-Clik_thumb.jpg",130,195,18);thumbnails[3283509]=new thumbnail(3283509,"104154","Eastgate Clock","CH_73Clik1_thumb.jpg",130,87,18);thumbnails[2174052]=new thumbnail(2174052,"103934","Old Dee Bridge Arches","Old-Dee-Bridge-From-Handbridge_Clik_thumb.jpg",130,87,18);thumbnails[2179316]=new thumbnail(2179316,"103934","Chester Cross","Chester-Cross_Clik_thumb.jpg",130,87,18);thumbnails[1517365]=new thumbnail(1517365,"103934","Old Dee Bridge","Old-Dee-BridgeCLIK_thumb.jpg",130,87,18);thumbnails[2160891]=new thumbnail(2160891,"103934","Eastgate Clock ","Eastgate-Clock_Clik_thumb.jpg",130,195,18);thumbnails[2188562]=new thumbnail(2188562,"103934","Chester Cathedral Garden","Chester-Cathedral-Garden_Clik_thumb.jpg",130,195,18);thumbnails[2174199]=new thumbnail(2174199,"103934","Chester Wier","Chester-Wier_Clik_thumb.jpg",130,195,18);thumbnails[1578439]=new thumbnail(1578439,"103934","Peaceful Stroll","Peaceful-StrollClik_thumb.jpg",130,194,18);thumbnails[1612462]=new thumbnail(1612462,"103934","Chester Groves","Groves_Benches_clik_thumb.jpg",130,195,18);thumbnails[1737970]=new thumbnail(1737970,"103934","Groves in the fog","Groves-in-The-Fog_Clik_thumb.jpg",130,195,18);thumbnails[2179283]=new thumbnail(2179283,"103934","Newgate Arch","Newgate-Arch_Clik_thumb.jpg",130,87,18);thumbnails[2174097]=new thumbnail(2174097,"103934","Under The Arch","Under-The-Arch_Clik_thumb.jpg",130,87,18);thumbnails[2179112]=new thumbnail(2179112,"103934","Grosvenor Shopping Centre","Grosvenor-Precinct_Clik_thumb.jpg",130,87,18);thumbnails[5369784]=new thumbnail(5369784,"103934","Queens Park Suspension Bridge","CH-87-Clik_thumb.jpg",130,195,18);thumbnails[2182587]=new thumbnail(2182587,"103934","St Marys Church ","St-Marys-Church_Clik_thumb.jpg",130,195,18);thumbnails[2232394]=new thumbnail(2232394,"103934","Bandstand and Benches","CH_16_thumb.jpg",130,195,18);thumbnails[2209268]=new thumbnail(2209268,"103934","Eccleston Church","CH_60_thumb.jpg",130,87,18);thumbnails[2209266]=new thumbnail(2209266,"103934","Eccleston Church","CH_59_thumb.jpg",130,87,18);thumbnails[5369735]=new thumbnail(5369735,"103934","","CH-82-Clik_thumb.jpg",130,87,18);thumbnails[2818008]=new thumbnail(2818008,"176007","Liverpool and Ark Royal","Ark-Royal-and-Liverpool_Clik_thumb.jpg",130,87,18);thumbnails[2818013]=new thumbnail(2818013,"176007","Liverpool & Grand Princess","Grand-Princess_Clik_thumb.jpg",130,87,18);thumbnails[2818015]=new thumbnail(2818015,"176007","Grand Princess","Grand-Princess-2_Clik_thumb.jpg",130,87,18);thumbnails[2818017]=new thumbnail(2818017,"176007","Liverpool Skyline","Liverpool-Seagull_Clik_thumb.jpg",130,87,18);thumbnails[2818019]=new thumbnail(2818019,"176007","HMS Ark Royal","Liverpool-Skyline-Sat_Clik_thumb.jpg",130,87,18);thumbnails[2818090]=new thumbnail(2818090,"176007","Tall Ships","TS13_Clik_thumb.jpg",130,87,18);thumbnails[2818095]=new thumbnail(2818095,"176007","Tall Ships","TS44_Clik_thumb.jpg",130,87,18);thumbnails[2818097]=new thumbnail(2818097,"176007","Tall Ships","TS55_8x12_Clik_thumb.jpg",130,87,18);thumbnails[5034808]=new thumbnail(5034808,"176007","Queen Mary 2 ","CH-74_thumb.jpg",130,87,18);thumbnails[5035557]=new thumbnail(5035557,"176007","Port of Liverpool Office","CH-77_thumb.jpg",130,87,18);thumbnails[5035566]=new thumbnail(5035566,"176007","St Georges Hall","CH-78_thumb.jpg",130,87,18);thumbnails[5035597]=new thumbnail(5035597,"176007","Liverpool Waterfront at Night","CH-79_thumb.jpg",130,87,18);thumbnails[5035603]=new thumbnail(5035603,"176007","Liverpool at Night","CH-80_thumb.jpg",130,87,18);thumbnails[5035608]=new thumbnail(5035608,"176007","Liver Building","CH-81_thumb.jpg",130,87,18);thumbnails[5035009]=new thumbnail(5035009,"176007","Queen Mary 2","CH-76_thumb.jpg",130,87,18);thumbnails[5035443]=new thumbnail(5035443,"285029","Dolbadarn Castle","NW-1_thumb.jpg",130,87,18);thumbnails[5035446]=new thumbnail(5035446,"285029","Dinorwic Slate Quarry","NW-2_thumb.jpg",130,87,18);thumbnails[5035449]=new thumbnail(5035449,"285029","Electric Mountain","NW-3_thumb.jpg",130,87,18);thumbnails[5035456]=new thumbnail(5035456,"285029","Quarry Buildings","NW-5_thumb.jpg",130,86,18);thumbnails[5035461]=new thumbnail(5035461,"285029","Lake Vyrnwy Dam","NW-6_thumb.jpg",130,87,18);thumbnails[5035468]=new thumbnail(5035468,"285029","Long Trek","NW-8_thumb.jpg",130,86,18);thumbnails[5035472]=new thumbnail(5035472,"285029","Quarry Buildings","NW-9_thumb.jpg",130,86,18);thumbnails[5035475]=new thumbnail(5035475,"285029","Quarry Lake","NW-10_thumb.jpg",130,87,18);thumbnails[5035500]=new thumbnail(5035500,"285029","LLyn y Dywarchen","NW-111_thumb.jpg",130,87,18);thumbnails[5035504]=new thumbnail(5035504,"285029","Conway Castle","NW-12_thumb.jpg",130,93,18);thumbnails[5035507]=new thumbnail(5035507,"285029","Vyrnwy Dam","NW-13_thumb.jpg",130,85,18);thumbnails[5035509]=new thumbnail(5035509,"285029","Pystyll Rhaedr Waterfall","NW-14_thumb.jpg",130,87,18);thumbnails[5035512]=new thumbnail(5035512,"285029","Castle Steps","NW-15_thumb.jpg",130,195,18);thumbnails[5035516]=new thumbnail(5035516,"285029","Rusty and Desolate","NW-17_thumb.jpg",130,195,18);thumbnails[5035530]=new thumbnail(5035530,"285029","Point of Ayr Lighthouse","CH_49_thumb.jpg",130,195,18);thumbnails[5035835]=new thumbnail(5035835,"285029","Nantlle Valley","NW-4_thumb.jpg",130,87,18);thumbnails[5035841]=new thumbnail(5035841,"285029","Menai Bridge","NW-18_thumb.jpg",130,87,18);thumbnails[5035862]=new thumbnail(5035862,"285029","Glaslyn","NW-19_thumb.jpg",130,87,18);var galleries=new Object();galleries[104154]=new gallery(104154,"1529806","Photos of Chester By Night","gallery",[1549290,1635587,2171502,1531120,1529806,1517347,1612405,1517321,3283138,2181221,1684464,1640146,1529804,2160627,1681629,1531709,1645666,1517322,1667352,1620840,2200125,1683379,2200154,5369745,5369748,5369746,1684203,1517323,5369743,3283509]);galleries[103934]=new gallery(103934,"5369784,5369735,2232394,2209268,2209266,2188562,2182587,2179316,2179283,2179112","Photos of Chester by Day","section138364",[2174052,2179316,1517365,2160891,2188562,2174199,1578439,1612462,1737970,2179283,2174097,2179112,5369784,2182587,2232394,2209268,2209266,5369735]);galleries[176007]=new gallery(176007,"2818090","Liverpool","section219196",[2818008,2818013,2818015,2818017,2818019,2818090,2818095,2818097,5034808,5035557,5035566,5035597,5035603,5035608,5035009]);galleries[285029]=new gallery(285029,"5035862,5035841,5035835,5035530,5035516,5035512,5035509,5035507,5035504,5035500","North Wales and Snowdonia","section341784",[5035443,5035446,5035449,5035456,5035461,5035468,5035472,5035475,5035500,5035504,5035507,5035509,5035512,5035516,5035530,5035835,5035841,5035862]);var imageSets=new Object();imageSets[1]="2171502,1529806";imageSets[2]="2818090,1529806";imageSets[3]="5369784,5369748,5369746,5369745,5369743,5369735,5035862,5035841,5035835,5035608,5035603,5035597,5035566,5035557,5035530,5035516,5035512,5035509,5035507,5035504,5035500,5035475,5035472,5035468,5035461,5035456,5035449,5035446,5035443,5035009,5034808,3283509,3283138,2818097,2818095,2818090,2818019,2818017,2818015,2818013,2818008,2232394,2209268,2209266,2200154,2200125,2188562,2182587,2181221,2179316";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/jeffdalton/images";break}switch(a){case 1:b="http://www1.clikpic.com/jeffdalton/images";break}switch(a){case 2:b="http://admin.clikpic.com/jeffdalton/images";break}switch(a){case 24:b="http://tpc15/clikpic/jeffdalton/images";break}switch(a){case 4:b="http://www.clikchurch.com/jeffdalton/images";break}switch(a){case 5:b="http://www2.clikpic.com/jeffdalton/images";break}switch(a){case 22:b="http://tpc5/clikpic/jeffdalton/images";break}switch(a){case 23:b="http://tpc10/clikpic/jeffdalton/images";break}switch(a){case 25:b="http://tpc16/clikpic/jeffdalton/images";break}switch(a){case 15:b="http://www3.clikpic.com/jeffdalton/images";break}switch(a){case 18:b="http://www4.clikpic.com/jeffdalton/images";break}switch(a){case 19:b="http://www5.clikpic.com/jeffdalton/images";break}switch(a){case 31:b="http://www7.clikpic.com/jeffdalton/images";break}switch(a){case 32:b="http://admin2.clikpic.com/jeffdalton/images";break}switch(a){case 33:b="http://www8.clikpic.com/jeffdalton/images";break}switch(a){case 34:b="http://www9.clikpic.com/jeffdalton/images";break}switch(a){case 35:b="http://admin3.clikpic.com/jeffdalton/images";break}switch(a){case 37:b="http://admin4.clikpic.com/jeffdalton/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="Chester Scenic Photos: "+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="jeffdalton@mac.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="jeffdalton@mac.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+'")'})}}};