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[3686639]=new thumbnail(3686639,"213258","First Impressions of Liverpool","firstimpressions_thumb.jpg",130,52,15);thumbnails[3686641]=new thumbnail(3686641,"213258","First Impressions of Liverpool (black & white)","firstimpressionsbw_thumb.jpg",130,52,15);thumbnails[3691073]=new thumbnail(3691073,"213258","Shaft!","shaftbw_thumb.jpg",130,173,15);thumbnails[3644377]=new thumbnail(3644377,"213258","Liverpool Anglican Cathedral","anglican_thumb.jpg",130,173,15);thumbnails[3644422]=new thumbnail(3644422,"213258","What's in a Name?","rodneyst01_thumb.jpg",130,87,15);thumbnails[3607760]=new thumbnail(3607760,"213258","Victoria Street","victoriast_thumb.jpg",130,98,15);thumbnails[3609418]=new thumbnail(3609418,"213258","Albert Dock","albertdock01_thumb.jpg",130,98,15);thumbnails[3607793]=new thumbnail(3607793,"213258","Radio City Tower Poster","radiocityposter_thumb.jpg",130,173,15);thumbnails[3607794]=new thumbnail(3607794,"213258","Radio City Tower","radiocity1_thumb.jpg",130,173,15);thumbnails[3492998]=new thumbnail(3492998,"213258","Canning Street","canningst_thumb.jpg",130,98,15);thumbnails[3504909]=new thumbnail(3504909,"213258","Hope Street","hopest_thumb.jpg",130,98,15);thumbnails[3521631]=new thumbnail(3521631,"213258","Downtown Liverpool","downtownliverpool_thumb.jpg",130,52,15);thumbnails[3585676]=new thumbnail(3585676,"213258","Downtown Liverpool (black & white)","downtownliverpoolbw_thumb.jpg",130,52,15);thumbnails[3585687]=new thumbnail(3585687,"213258","Downtown Liverpool (duotone)","downtownliverpooldt_thumb.jpg",130,52,15);thumbnails[3677452]=new thumbnail(3677452,"213258","The Harley Street of the North","rodneyst02_thumb.jpg",130,98,15);thumbnails[3677477]=new thumbnail(3677477,"213258","Mornington Terrace","mornington_thumb.jpg",130,87,15);thumbnails[3569380]=new thumbnail(3569380,"213258","Tomorrow is another Day","tomorrow_thumb.jpg",130,52,15);thumbnails[3497395]=new thumbnail(3497395,"213258","St George's Hall Plateau","stgeorges_thumb.jpg",130,98,15);thumbnails[3504389]=new thumbnail(3504389,"213258","St George's Hall Plateau (black & white)","stgeorgesbw_thumb.jpg",130,98,15);thumbnails[3644365]=new thumbnail(3644365,"213258","Hanover Street","hanoverst_thumb.jpg",130,87,15);thumbnails[3497772]=new thumbnail(3497772,"213258","The Sailors' Church","sailorschurch_thumb.jpg",130,98,15);thumbnails[5212345]=new thumbnail(5212345,"213258","Port of Liverpool Building","mdhbdt_thumb.jpg",130,173,15);thumbnails[5233393]=new thumbnail(5233393,"213258","Back Canning Street","backstreet_thumb.jpg",130,173,15);thumbnails[5233398]=new thumbnail(5233398,"213258","New and Old","chapelst_thumb.jpg",130,98,15);thumbnails[5233500]=new thumbnail(5233500,"213258","Flyovers","flyovers_thumb.jpg",130,98,15);thumbnails[5234287]=new thumbnail(5234287,"213258","Signs of Life","signsoflife_thumb.jpg",130,98,15);thumbnails[4643864]=new thumbnail(4643864,"267863","Blood Red Castle","edinburghcastlered_thumb.jpg",130,98,15);thumbnails[4644638]=new thumbnail(4644638,"267863","Twinkling Edinburgh","edinburghnight_thumb.jpg",130,52,15);thumbnails[4644283]=new thumbnail(4644283,"267863","North Bridge and the Scotsman","edinburghnorthbridge_thumb.jpg",130,98,15);thumbnails[4644325]=new thumbnail(4644325,"267863","St Giles' and the Old Town","edinburgholdtown_thumb.jpg",130,98,15);thumbnails[4644359]=new thumbnail(4644359,"267863","North Bridge and the Scotsman (duotone)","edinburghnorthbridgedt_thumb.jpg",130,98,15);thumbnails[4644580]=new thumbnail(4644580,"267863","Edinburgh is for Lovers (black & white)","edinburghloversbw_thumb.jpg",130,98,15);thumbnails[4644581]=new thumbnail(4644581,"267863","Edinburgh is for Lovers","edinburghloversreds_thumb.jpg",130,98,15);thumbnails[5233403]=new thumbnail(5233403,"267863","Edinburgh and Salisbury Crag","edinburghcrag_thumb.jpg",130,98,15);thumbnails[6551764]=new thumbnail(6551764,"213259","Green Water","greenwave_4x3_thumb.jpg",130,98,15);thumbnails[6551917]=new thumbnail(6551917,"213259","Off Shore","worldship01_3x2_thumb.jpg",130,87,15);thumbnails[6551759]=new thumbnail(6551759,"213259","Going Nowhere","havenfrozen02_3x2_thumb.jpg",130,86,15);thumbnails[5387356]=new thumbnail(5387356,"213259","Foggy Harbour","havenfog01_thumb.jpg",130,98,15);thumbnails[5301096]=new thumbnail(5301096,"213259","Wast Water and Scafell","wasdale_thumb.jpg",130,98,15);thumbnails[5301097]=new thumbnail(5301097,"213259","Wast Water and Scafell (black & white)","wasdalebw_thumb.jpg",130,98,15);thumbnails[3557481]=new thumbnail(3557481,"213259","Snowdon and Glaslyn","snowdon01_thumb.jpg",130,98,15);thumbnails[3559825]=new thumbnail(3559825,"213259","Aber Falls","aberfalls_thumb.jpg",130,173,15);thumbnails[3496315]=new thumbnail(3496315,"213259","Stickle Ghyll","stickle01_thumb.jpg",130,98,15);thumbnails[3515521]=new thumbnail(3515521,"213259","Stickle Tarn and Pavy Ark","stickle02_thumb.jpg",130,52,15);thumbnails[3492841]=new thumbnail(3492841,"213259","Ennerdale from Crag Fell","ennerdale01_thumb.jpg",130,87,15);thumbnails[3504804]=new thumbnail(3504804,"213259","Sunset in the Fells","ennerdale02_thumb.jpg",130,52,15);thumbnails[5300883]=new thumbnail(5300883,"213259","Lonely Stones","castlerigg_thumb.jpg",130,98,15);thumbnails[5212237]=new thumbnail(5212237,"213259","Pointing The Way","oldroadsign_thumb.jpg",130,98,15);thumbnails[5233430]=new thumbnail(5233430,"213259","Haycock and Pillar from Caw Fell","ennerdale03_thumb.jpg",130,52,15);thumbnails[5233524]=new thumbnail(5233524,"213259","Cumbrian Sunset","sunsetsheep_thumb.jpg",130,98,15);thumbnails[5233534]=new thumbnail(5233534,"213259","Whitehaven South Harbour","weststrand_thumb.jpg",130,98,15);thumbnails[5234269]=new thumbnail(5234269,"213259","Grasmere","grasmere_thumb.jpg",130,52,15);thumbnails[5234274]=new thumbnail(5234274,"213259","Grasmere (black & white)","grasmerebw_thumb.jpg",130,52,15);thumbnails[5234281]=new thumbnail(5234281,"213259","Frozen In","havenfrozen_thumb.jpg",130,98,15);thumbnails[5234290]=new thumbnail(5234290,"213259","The Rivals","yreifel_thumb.jpg",130,55,15);thumbnails[5301421]=new thumbnail(5301421,"213259","The Loneliest Posting","hardknott_thumb.jpg",130,98,15);thumbnails[5551934]=new thumbnail(5551934,"213259","Crummock and Melbreak","crummock01_thumb.jpg",130,98,15);thumbnails[5555328]=new thumbnail(5555328,"213259","Crummock Inlet","crummock02_thumb.jpg",130,98,15);thumbnails[5555333]=new thumbnail(5555333,"213259","Crummock Inlet 2","crummock03_thumb.jpg",130,98,15);thumbnails[5300898]=new thumbnail(5300898,"213259","Circle of Stones","castleriggpano_thumb.jpg",130,55,15);thumbnails[5555369]=new thumbnail(5555369,"314989","Tyne Bridge, Newcastle","tynebridge_thumb.jpg",130,55,15);thumbnails[3504740]=new thumbnail(3504740,"213267","Trains in Cologne","trains_thumb.jpg",130,130,15);thumbnails[3493398]=new thumbnail(3493398,"213267","Strasbourg","strasbourg_thumb.jpg",130,98,15);thumbnails[5555347]=new thumbnail(5555347,"213267","Dunquerque Beach","dunquerque_thumb.jpg",130,98,15);thumbnails[6330117]=new thumbnail(6330117,"335565","Charlevoix Lighthouse","charlevoix_thumb.jpg",130,173,15);thumbnails[6365848]=new thumbnail(6365848,"335565","O'Neill Lake","oneill2_thumb.jpg",130,87,15);thumbnails[6365851]=new thumbnail(6365851,"335565","O'Neill Lake (duotone)","oneill2dt_thumb.jpg",130,87,15);thumbnails[6365912]=new thumbnail(6365912,"335565","Mackinac Island","mackinacisland1_thumb.jpg",130,98,15);thumbnails[6365882]=new thumbnail(6365882,"335565","Grand Rapids River","grapidswaterfront_thumb.jpg",130,98,15);thumbnails[5948507]=new thumbnail(5948507,"335565","Mighty Mac 1","mackinack01_thumb.jpg",130,98,15);thumbnails[5948510]=new thumbnail(5948510,"335565","Mighty Mac 2","mackinack02_thumb.jpg",130,173,15);thumbnails[5948511]=new thumbnail(5948511,"335565","Little Traverse Aqua 1","littletraverse01_thumb.jpg",130,98,15);thumbnails[5948512]=new thumbnail(5948512,"335565","Little Traverse Aqua 2","littletraverse02_thumb.jpg",130,173,15);thumbnails[5948513]=new thumbnail(5948513,"335565","Little Traverse Aqua 3","littletraverse03_thumb.jpg",130,98,15);thumbnails[5988253]=new thumbnail(5988253,"273094","African Acacia","acacia_thumb.jpg",130,87,15);thumbnails[6017886]=new thumbnail(6017886,"273094","Railroad to Nowhere","kenyarailroad_thumb.jpg",130,98,15);thumbnails[5212222]=new thumbnail(5212222,"273094","Herd of Elephants in the Serengeti","elephantherd_thumb.jpg",130,98,15);thumbnails[5212229]=new thumbnail(5212229,"273094","The Leopard","leopard_thumb.jpg",130,173,15);thumbnails[5223459]=new thumbnail(5223459,"273094","Maasai Warriors","maasai_thumb.jpg",130,98,15);thumbnails[5212341]=new thumbnail(5212341,"273094","Bee Eater","beeeater_thumb.jpg",130,98,15);thumbnails[5223359]=new thumbnail(5223359,"273094","Ngorongoro Crater Panorama","ngorongoro_thumb.jpg",130,56,15);thumbnails[5212342]=new thumbnail(5212342,"273094","Red Elephant of Kenya","redelephant_thumb.jpg",130,173,15);thumbnails[6031256]=new thumbnail(6031256,"273092","Osteospermum 1","osteospermum01_thumb.jpg",130,173,15);thumbnails[6031257]=new thumbnail(6031257,"273092","Osteospermum 2","osteospermum02_thumb.jpg",130,98,15);thumbnails[6031258]=new thumbnail(6031258,"273092","Gerbera","gerbera01_thumb.jpg",130,87,15);thumbnails[5948515]=new thumbnail(5948515,"273092","Red Tulips","redtulips_thumb.jpg",130,173,15);thumbnails[3637780]=new thumbnail(3637780,"273092","Primary Colours - Tulips","tulips01_thumb.jpg",130,173,15);thumbnails[5233529]=new thumbnail(5233529,"273092","Tulips (colour popped)","tulips01bw_thumb.jpg",130,173,15);var galleries=new Object();galleries[213258]=new gallery(213258,"5233393,3691073,3644377,3607794","Artsy and Unique Liverpool","gallery",[3686639,3686641,3691073,3644377,3644422,3607760,3609418,3607793,3607794,3492998,3504909,3521631,3585676,3585687,3677452,3677477,3569380,3497395,3504389,3644365,3497772,5212345,5233393,5233398,5233500,5234287]);galleries[267863]=new gallery(267863,"5233403,4644638,4644581,4644580,4644359,4644325,4644283,4643864","Edinburgh","gallery",[4643864,4644638,4644283,4644325,4644359,4644580,4644581,5233403]);galleries[295127]=new gallery(295127,"5555369,5233403,4644638,4644581,4644580,4644359,4644325,4644283,4643864","Proud Cities","gallery",[]);galleries[213259]=new gallery(213259,"3559825","Lovely British Landscapes","gallery",[6551764,6551917,6551759,5387356,5301096,5301097,3557481,3559825,3496315,3515521,3492841,3504804,5300883,5212237,5233430,5233524,5233534,5234269,5234274,5234281,5234290,5301421,5551934,5555328,5555333,5300898]);galleries[314989]=new gallery(314989,"5555369","Newcastle","gallery",[5555369]);galleries[213267]=new gallery(213267,"5555347,3504740,3493398","All Around Europe","gallery",[3504740,3493398,5555347]);galleries[335565]=new gallery(335565,"6330117,5948512,5948510","Great Lakes Splendour","gallery",[6330117,6365848,6365851,6365912,6365882,5948507,5948510,5948511,5948512,5948513]);galleries[273094]=new gallery(273094,"5212342,5212229","African Soul and Safari","gallery",[5988253,6017886,5212222,5212229,5223459,5212341,5223359,5212342]);galleries[273092]=new gallery(273092,"6031256,5948515,5233529,3637780","Fantastic Flowers","gallery",[6031256,6031257,6031258,5948515,3637780,5233529]);var imageSets=new Object();imageSets[1]="6551917,6551764,6551759,6365912,6365882,6365851,6365848,6330117,6031258,6031257,6031256,5948515,5948513,5948512,5948511,5948507,5555333,5555328,5301421,5301096,5300898,5300883,5234290,5234287,5234281,5223459,5223359,5212342,5212341,5212237,5212229,5212222,4644581,4644325,4644283,4643864,3686639,3677477,3644422,3644377,3637780,3609418,3607760,3569380,3559825,3557481,3521631,3515521,3504804,3497772,3497395,3496315,3493398,3492998,3492841";imageSets[2]="6330117,6031256,5948515,5948512,5948510,5233529,5233393,5212342,5212229,3691073,3644377,3637780,3607794,3559825";imageSets[3]="5948510,5551934,4644638,4644581,4644359,4644325,4644283,4643864";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/willmcallister/images";break}switch(a){case 1:b="http://www1.clikpic.com/willmcallister/images";break}switch(a){case 2:b="http://admin.clikpic.com/willmcallister/images";break}switch(a){case 24:b="http://tpc15/clikpic/willmcallister/images";break}switch(a){case 4:b="http://www.clikchurch.com/willmcallister/images";break}switch(a){case 5:b="http://www2.clikpic.com/willmcallister/images";break}switch(a){case 22:b="http://tpc5/clikpic/willmcallister/images";break}switch(a){case 23:b="http://tpc10/clikpic/willmcallister/images";break}switch(a){case 25:b="http://tpc16/clikpic/willmcallister/images";break}switch(a){case 15:b="http://www3.clikpic.com/willmcallister/images";break}switch(a){case 18:b="http://www4.clikpic.com/willmcallister/images";break}switch(a){case 19:b="http://www5.clikpic.com/willmcallister/images";break}switch(a){case 31:b="http://www7.clikpic.com/willmcallister/images";break}switch(a){case 32:b="http://admin2.clikpic.com/willmcallister/images";break}switch(a){case 33:b="http://www8.clikpic.com/willmcallister/images";break}switch(a){case 34:b="http://www9.clikpic.com/willmcallister/images";break}switch(a){case 35:b="http://admin3.clikpic.com/willmcallister/images";break}switch(a){case 37:b="http://admin4.clikpic.com/willmcallister/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="Mokka Gallery: "+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>Keywords: </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="WILLMCALLISTER">';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+'")'})}}};