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[5456753]=new thumbnail(5456753,"346842","Running Late","Running_Late_w_thumb.jpg",130,87,1);thumbnails[5459917]=new thumbnail(5459917,"346842","Bar Study","by_the_bar_thumb.jpg",130,98,1);thumbnails[5500834]=new thumbnail(5500834,"346842","Northbound","Northbound_thumb.jpg",130,104,1);thumbnails[5500835]=new thumbnail(5500835,"346842","Rondezvous","rondevouzw_thumb.jpg",130,88,1);thumbnails[5500837]=new thumbnail(5500837,"346842","Whisper","Dsc02718w_thumb.jpg",130,102,1);thumbnails[5500838]=new thumbnail(5500838,"346842","Tenterhooks","by_the_bar_II_w_thumb.jpg",130,98,1);thumbnails[5500839]=new thumbnail(5500839,"346842","In A Lake","Dsc02721w_thumb.jpg",130,118,1);thumbnails[5629225]=new thumbnail(5629225,"346842","Don't Look Now","Dont_look_now_w_thumb.jpg",130,106,1);thumbnails[5629229]=new thumbnail(5629229,"346842","Under A Lamp","Under_a_Lamp_w_thumb.jpg",130,101,1);thumbnails[5686190]=new thumbnail(5686190,"346842","Back to Front","back_to_front_thumb.jpg",130,97,1);thumbnails[5686194]=new thumbnail(5686194,"346842","Cafe Thoughts","cafe_thoughts_thumb.jpg",130,161,1);thumbnails[5686197]=new thumbnail(5686197,"346842","Bar Reflections","Bar_Reflections_thumb.jpg",130,104,1);thumbnails[5686201]=new thumbnail(5686201,"346842","Desire Atmosphere","desire_atmosphere_web_thumb.jpg",130,98,1);thumbnails[5695933]=new thumbnail(5695933,"346842","Home","Home_Tomweb_thumb.jpg",130,97,1);thumbnails[5716638]=new thumbnail(5716638,"346842","Return","Return_thumb.jpg",130,98,1);thumbnails[5788009]=new thumbnail(5788009,"346842","Illuminated","bright_light_thumb.jpg",130,98,1);thumbnails[5788010]=new thumbnail(5788010,"346842","Barcelona Cafe","barcelona_bar_thumb.jpg",130,98,1);thumbnails[5788012]=new thumbnail(5788012,"346842","Nude Study X","nude_thumb.jpg",130,173,1);thumbnails[5829140]=new thumbnail(5829140,"346842","Profile","arm_rest_thumb.jpg",130,173,1);thumbnails[5829146]=new thumbnail(5829146,"346842","Nude Study VIII","nude_9_thumb.jpg",130,98,1);thumbnails[4707688]=new thumbnail(4707688,"218032","PASSENGERS","Passengersweb_thumb.jpg",130,98,1);thumbnails[4707693]=new thumbnail(4707693,"218032","By The Fire","by_the_fire_web_thumb.jpg",130,98,1);thumbnails[4679897]=new thumbnail(4679897,"218032","PROTECTION","protection_thumb.jpg",130,94,1);thumbnails[4555022]=new thumbnail(4555022,"218032","THE CENTURION","the_centurion12_thumb.jpg",130,167,1);thumbnails[4683053]=new thumbnail(4683053,"218032","MORNING COFFEE","mornin_coffee_thumb.jpg",130,95,1);thumbnails[4682332]=new thumbnail(4682332,"218032","PASSING BY","passing_by_thumb.jpg",130,98,1);thumbnails[4555041]=new thumbnail(4555041,"218032","No 1 QUEEN STREET","no1qeenstreet_thumb.jpg",130,86,1);thumbnails[4555033]=new thumbnail(4555033,"218032","TRAINSPOTTING","trainspotting_thumb.jpg",130,97,1);thumbnails[4555050]=new thumbnail(4555050,"218032","BREAKFAST MENU","Breakfast_Menu1_thumb.jpg",130,96,1);thumbnails[4647497]=new thumbnail(4647497,"218032","CITY REFLECTIONS","city_reflections_thumb.jpg",130,86,1);thumbnails[3566167]=new thumbnail(3566167,"218032","FIRESIDE","Fieside_thumb.jpg",130,104,1);thumbnails[3694061]=new thumbnail(3694061,"218032","COFFEE & LIGHTS","Coffee__Lights_thumb.jpg",130,105,1);thumbnails[3694055]=new thumbnail(3694055,"218032","JOURNEY'S END","Jounys_End_thumb.jpg",130,105,1);thumbnails[4707779]=new thumbnail(4707779,"218032","EDGE OF DARKNESS","Edge_of_Darkness_web_thumb.jpg",130,98,1);thumbnails[2609295]=new thumbnail(2609295,"67376","HOTEL LOUNGE","webhotel lounge_thumb.jpg",130,104,1);thumbnails[3004666]=new thumbnail(3004666,"67376","WINDOW TABLE  ","cara1_thumb.jpg",130,95,1);thumbnails[3004713]=new thumbnail(3004713,"67376","HALF EMPTY ","Dsc00413_thumb.jpg",130,92,1);thumbnails[3004753]=new thumbnail(3004753,"67376","TABLE BY THE STAIRS","table by the stairs_thumb.jpg",130,96,1);thumbnails[3004782]=new thumbnail(3004782,"67376","WATCHING STUDY","watching_thumb.jpg",130,95,1);thumbnails[3026107]=new thumbnail(3026107,"67376","SIT & WONDER","sit & wonder_thumb.jpg",130,98,1);thumbnails[3106219]=new thumbnail(3106219,"67376","THE WATERS EDGE","bh1_thumb.jpg",130,100,1);thumbnails[3171014]=new thumbnail(3171014,"67376","SISTERS","sisters 0_thumb.jpg",130,89,1);thumbnails[3566177]=new thumbnail(3566177,"67376","TABLE FOR ONE","window_thumb.jpg",130,98,1);thumbnails[3694033]=new thumbnail(3694033,"67376","FLAMES","Flames_thumb.jpg",130,87,1);thumbnails[3694170]=new thumbnail(3694170,"67376","EMPTY BAR","Empty_Bar_thumb.jpg",130,98,1);thumbnails[2305000]=new thumbnail(2305000,"67376","CANDLE LIGHT","web candlelight_thumb.jpg",130,104,1);thumbnails[2015597]=new thumbnail(2015597,"119618","NUDE STUDY I ","nude study I_thumb.jpg",130,184,1);thumbnails[2015605]=new thumbnail(2015605,"119618","NUDE STUDY II ","nude study II_thumb.jpg",130,181,1);thumbnails[2015609]=new thumbnail(2015609,"119618","NUDE STUDY III ","nude study III_thumb.jpg",130,173,1);thumbnails[2198505]=new thumbnail(2198505,"119618","NUDE STUDY IV","nsp_thumb.jpg",130,54,1);thumbnails[2706741]=new thumbnail(2706741,"119618","NUDE STUDY V","nud_thumb.jpg",130,177,1);thumbnails[2734799]=new thumbnail(2734799,"119618","NUDE STUDY VI","nude vi 001_thumb.jpg",130,173,1);thumbnails[3566174]=new thumbnail(3566174,"119618","NUDE STUDY VII","nude6_thumb.jpg",130,85,1);thumbnails[1656078]=new thumbnail(1656078,"66734","MEMORIES OF GREEN","Memories of Green_thumb.jpg",130,96,1);thumbnails[1915408]=new thumbnail(1915408,"66734","PASSING STRANGER","passing stranger_thumb.jpg",130,98,1);thumbnails[1915483]=new thumbnail(1915483,"66734","LANGUISHED THOUGHTS","languished thoughts_thumb.jpg",130,99,1);thumbnails[2706748]=new thumbnail(2706748,"66734","BY THE SEA","by the sea_thumb.jpg",130,99,1);thumbnails[3004768]=new thumbnail(3004768,"66734","PASSING LIGHTS","ps lghts_thumb.jpg",130,103,1);thumbnails[3061813]=new thumbnail(3061813,"66734","DARK WAS THE NIGHT","dark was the night_thumb.jpg",130,101,1);thumbnails[3061828]=new thumbnail(3061828,"66734","ACROSS THE BAY","across the bay_thumb.jpg",130,100,1);thumbnails[3566180]=new thumbnail(3566180,"66734","SUBURBAN SUNSET ","sub_sunset_thumb.jpg",130,86,1);thumbnails[3566193]=new thumbnail(3566193,"66734","THE RED LAMP","theredlamp_thumb.jpg",130,98,1);thumbnails[5021026]=new thumbnail(5021026,"66734","Facade Study","facade_study_thumb.jpg",130,182,1);thumbnails[5021043]=new thumbnail(5021043,"66734","ONe Day Like This","one_day_lk_this_thumb.jpg",130,109,1);thumbnails[2304998]=new thumbnail(2304998,"66734","HIGH & DRY","high and dry_thumb.jpg",130,102,1);thumbnails[2214116]=new thumbnail(2214116,"66734","SATURDAY AFTERNOON","saturday afternoon_thumb.jpg",130,98,1);thumbnails[3968708]=new thumbnail(3968708,"292088","THEATRE DREAM 1","dream1_thumb.jpg",130,96,1);thumbnails[3968719]=new thumbnail(3968719,"292088","THEATRE DREAM II","tdream2_thumb.jpg",130,97,1);thumbnails[3970741]=new thumbnail(3970741,"292088","PERFORMANCE I","performance_1_thumb.jpg",130,172,1);thumbnails[3970752]=new thumbnail(3970752,"292088","PERFORMANCE II","performance_II_thumb.jpg",130,165,1);thumbnails[5021034]=new thumbnail(5021034,"292088","Dance Study","dance_study_thumb.jpg",130,174,1);thumbnails[3594565]=new thumbnail(3594565,"292088","PORTRAIT OF A WOMAN","j2_thumb.jpg",130,161,1);thumbnails[1690606]=new thumbnail(1690606,"289101","APPROACHING DESTINATION","web app_thumb.jpg",130,104,1);thumbnails[1690612]=new thumbnail(1690612,"289101","THE PASSENGER","The Passenger_thumb.jpg",130,98,1);thumbnails[1915368]=new thumbnail(1915368,"289101","WATCHING LONELY STREETS","webWATCHING LONELY STREETS_thumb.jpg",130,104,1);thumbnails[1915786]=new thumbnail(1915786,"289101","LAST EXIT TO BROOKLYN","web LAST EXIT TO BROOKLYN_thumb.jpg",130,104,1);thumbnails[2411452]=new thumbnail(2411452,"289101","NIGHT DREAMING","webNIGHT DREAMING_thumb.jpg",130,104,1);thumbnails[2411454]=new thumbnail(2411454,"289101","STEEL & STONE","webSTEEL & STONE_thumb.jpg",130,104,1);thumbnails[2438351]=new thumbnail(2438351,"289101","STEEL SKY","websteel sky_thumb.jpg",130,104,1);thumbnails[2452041]=new thumbnail(2452041,"289101","STATION LIGHT","web station light_thumb.jpg",130,104,1);thumbnails[2568390]=new thumbnail(2568390,"289101","THE CANVAS AWAITS","webthe canvas awaits_thumb.jpg",130,104,1);thumbnails[2609300]=new thumbnail(2609300,"289101","THOUGHTS UNDERWAY","webthoughts underway_thumb.jpg",130,104,1);thumbnails[2609304]=new thumbnail(2609304,"289101","THE MEETING PLACE","webthe meeting place_thumb.jpg",130,104,1);thumbnails[2667835]=new thumbnail(2667835,"289101","IN THE SHADE","intheshade_thumb.jpg",130,104,1);thumbnails[2069894]=new thumbnail(2069894,"289101","MEMORIES OF GIANTS","webMEMORIES OF GIANTS_thumb.jpg",130,104,1);thumbnails[879083]=new thumbnail(879083,"289096","COAL","lowcoal1.jpg",130,103,1);thumbnails[879086]=new thumbnail(879086,"289096","GIRL AWAKE","girlawake1.jpg",130,101,1);thumbnails[879089]=new thumbnail(879089,"289096","NIGHT SHIFT","Nightshift1.jpg",130,107,1);thumbnails[1315586]=new thumbnail(1315586,"289096","SIDE SHADOWS","lowres side shadows1.jpg",130,98,1);thumbnails[1315591]=new thumbnail(1315591,"289096","21 MOSLEY STREET","lowres jack1.jpg",130,98,1);thumbnails[1315593]=new thumbnail(1315593,"289096","MORNING PAPER","lowres john1.jpg",130,98,1);thumbnails[1315595]=new thumbnail(1315595,"289096","UNDER THE BRIDGE","lowres under bridge_thumb.jpg",130,98,1);thumbnails[1915495]=new thumbnail(1915495,"289096","STREET SCENE","pic2_thumb.jpg",130,98,1);thumbnails[2186302]=new thumbnail(2186302,"289096","SIT & WAIT","sit & wait_thumb.jpg",130,98,1);thumbnails[2187450]=new thumbnail(2187450,"289096","ROOFTOPS & LIGHTS ","ROOFTOPS LIGHTS15X10_thumb.jpg",130,96,1);thumbnails[3026184]=new thumbnail(3026184,"289096","MORNING WAITRESS","miday waitress1_thumb.jpg",130,89,1);var galleries=new Object();galleries[346842]=new gallery(346842,"5716638,5686190,5629229,5500838,5456753","NEW 2010","gallery",[5456753,5459917,5500834,5500835,5500837,5500838,5500839,5629225,5629229,5686190,5686194,5686197,5686201,5695933,5716638,5788009,5788010,5788012,5829140,5829146]);galleries[218032]=new gallery(218032,"4707693,4679897,4647497,4555033,4555022,3694061,3694055","Paintings I","gallery",[4707688,4707693,4679897,4555022,4683053,4682332,4555041,4555033,4555050,4647497,3566167,3694061,3694055,4707779]);galleries[67376]=new gallery(67376,"3694170,3004666","Paintings II","gallery",[2609295,3004666,3004713,3004753,3004782,3026107,3106219,3171014,3566177,3694033,3694170,2305000]);galleries[119618]=new gallery(119618,"3566174,2734799,2706741,2198505,2015609,2015605,2015597","Paintings III","gallery",[2015597,2015605,2015609,2198505,2706741,2734799,3566174]);galleries[66734]=new gallery(66734,"5021026,3061828,3061813,1915483","Paintings IV","gallery",[1656078,1915408,1915483,2706748,3004768,3061813,3061828,3566180,3566193,5021026,5021043,2304998,2214116]);galleries[292088]=new gallery(292088,"3594565","Paintings V","gallery",[3968708,3968719,3970741,3970752,5021034,3594565]);galleries[289101]=new gallery(289101,"1915786,1690612,1690606","LIMITED EDITIONS","gallery",[1690606,1690612,1915368,1915786,2411452,2411454,2438351,2452041,2568390,2609300,2609304,2667835,2069894]);galleries[289096]=new gallery(289096,"3026184","ART PRINTS","gallery",[879083,879086,879089,1315586,1315591,1315593,1315595,1915495,2186302,2187450,3026184]);var imageSets=new Object();imageSets[1]="5829146,5829140,5788010,5788009,5716638,5686201,5686197,5686194,5686190,5629229,5500839,5500838,5500837,5500835,5500834,5456753,5021043";imageSets[2]="5716638,5686190,5629229,5500838,5456753,5021026,4707693,4679897,4647497,4555033,4555022,3694170,3694061,3694055,3594565,3061828,3061813,3026184,3004666,1915786,1915483,1690612,1690606";imageSets[3]="5829146,5829140,5788012,5788010,5788009,5716638,5695933,5686201,5686197,5686194,5686190,5629229,5629225,5500839,5500838,5500837,5500835,5500834,5459917,5456753,5021043,5021034,5021026,4707779,4707693,4707688,4683053,4682332,4679897,4647497,4555050,4555041,4555033,4555022,3970752,3970741,3968719,3968708,3694170,3694061,3694055,3694033,3594565,3566193,3566180,3566177,3566174,3566167,3171014,3106219";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/kevday/images";break}switch(a){case 1:b="http://www1.clikpic.com/kevday/images";break}switch(a){case 2:b="http://admin.clikpic.com/kevday/images";break}switch(a){case 24:b="http://tpc15/clikpic/kevday/images";break}switch(a){case 4:b="http://www.clikchurch.com/kevday/images";break}switch(a){case 5:b="http://www2.clikpic.com/kevday/images";break}switch(a){case 22:b="http://tpc5/clikpic/kevday/images";break}switch(a){case 23:b="http://tpc10/clikpic/kevday/images";break}switch(a){case 25:b="http://tpc16/clikpic/kevday/images";break}switch(a){case 15:b="http://www3.clikpic.com/kevday/images";break}switch(a){case 18:b="http://www4.clikpic.com/kevday/images";break}switch(a){case 19:b="http://www5.clikpic.com/kevday/images";break}switch(a){case 31:b="http://www7.clikpic.com/kevday/images";break}switch(a){case 32:b="http://admin2.clikpic.com/kevday/images";break}switch(a){case 33:b="http://www8.clikpic.com/kevday/images";break}switch(a){case 34:b="http://www9.clikpic.com/kevday/images";break}switch(a){case 35:b="http://admin3.clikpic.com/kevday/images";break}switch(a){case 37:b="http://admin4.clikpic.com/kevday/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="Kevin Day: "+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>"}if(a!=""){a=a+'<div class="spacer"></div>'}return a}function fnGetPaymentInfo(c){var b="";if(c.item_price!==""){b=b+"<p>Order this print:</p>";b=b+'<p class="imageinfo" id="imagePrice"><strong>'+c.purchase_instruction+"</strong> 							"+(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+'<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+'")'})}}};