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[4425048]=new thumbnail(4425048,"","","twpppA4_thumb.jpg",120,123,18);thumbnails[3711597]=new thumbnail(3711597,"","","Gareth-Tote-sepia_web_thumb.jpg",130,124,18);thumbnails[4425045]=new thumbnail(4425045,"123896","","mike_noga_A4_thumb.jpg",130,184,18);thumbnails[4425044]=new thumbnail(4425044,"123896","","Lilith_Lane_A4_thumb.jpg",130,184,18);thumbnails[4425041]=new thumbnail(4425041,"123896","","jmds_11_thumb.jpg",130,189,18);thumbnails[4425037]=new thumbnail(4425037,"123896","","0551_thumb.jpg",130,204,18);thumbnails[4425039]=new thumbnail(4425039,"123896","","dronespark_cover_thumb.jpg",130,189,18);thumbnails[4425042]=new thumbnail(4425042,"123896","","Johnny_A4_thumb.jpg",130,131,18);thumbnails[4425046]=new thumbnail(4425046,"123896","","Nick_McGee_A4_thumb.jpg",130,126,18);thumbnails[4425040]=new thumbnail(4425040,"123896","","DSC_0042edit1_thumb.jpg",130,195,18);thumbnails[4425038]=new thumbnail(4425038,"123896","","Dan-Kelly1_thumb.jpg",130,106,18);thumbnails[4425278]=new thumbnail(4425278,"123896","","_AUGweb_09_2_thumb.jpg",120,80,2);thumbnails[4425047]=new thumbnail(4425047,"123896","","vandas_0311_thumb.jpg",130,87,18);thumbnails[4425043]=new thumbnail(4425043,"123896","","mike_gof_001blue_thumb.jpg",130,99,18);thumbnails[4425148]=new thumbnail(4425148,"170195","","chris_mickey_009_thumb.jpg",120,177,2);thumbnails[4425150]=new thumbnail(4425150,"170195","","DSC_0042_thumb.jpg",120,180,2);thumbnails[4425153]=new thumbnail(4425153,"170195","","Luscombe_A4_thumb.jpg",120,170,2);thumbnails[4425144]=new thumbnail(4425144,"170195","","024edit_thumb.jpg",120,180,2);thumbnails[4425155]=new thumbnail(4425155,"170195","","gareth_liddiard_01_thumb.jpg",120,186,2);thumbnails[4425145]=new thumbnail(4425145,"170195","","Aaron01_thumb.jpg",120,174,2);thumbnails[4425151]=new thumbnail(4425151,"170195","","DSC_0143BW_thumb.jpg",120,162,2);thumbnails[4425152]=new thumbnail(4425152,"170195","","Fiona_Taz__thumb.jpg",120,181,2);thumbnails[4425147]=new thumbnail(4425147,"170195","","arron_031_thumb.jpg",120,120,2);thumbnails[4425154]=new thumbnail(4425154,"170195","","Nick-slugger-McGee_A4_thumb.jpg",120,150,2);thumbnails[4425149]=new thumbnail(4425149,"170195","","Dallas01_thumb.jpg",120,78,2);thumbnails[4425146]=new thumbnail(4425146,"170195","","amanda01_thumb.jpg",120,58,2);thumbnails[3033130]=new thumbnail(3033130,"186479","","little-red-012_thumb.jpg",130,86,18);thumbnails[3033127]=new thumbnail(3033127,"186479","","little-red-009_thumb.jpg",130,99,18);thumbnails[3033124]=new thumbnail(3033124,"186479","","little-red-006_thumb.jpg",130,86,18);thumbnails[3033123]=new thumbnail(3033123,"186479","","little-red-005_thumb.jpg",130,86,18);thumbnails[3033436]=new thumbnail(3033436,"186479","","little-red-016_thumb.jpg",130,195,18);thumbnails[3033432]=new thumbnail(3033432,"186479","","little-red-0021_thumb.jpg",130,195,18);thumbnails[3033129]=new thumbnail(3033129,"186479","","little-red-011_thumb.jpg",130,195,18);thumbnails[3033128]=new thumbnail(3033128,"186479","","little-red-010_thumb.jpg",130,195,18);thumbnails[3033435]=new thumbnail(3033435,"186479","","little-red-015_thumb.jpg",130,88,18);thumbnails[3033434]=new thumbnail(3033434,"186479","","little-red-014_thumb.jpg",130,86,18);thumbnails[3033125]=new thumbnail(3033125,"186479","","little-red-007_thumb.jpg",130,86,18);thumbnails[3033433]=new thumbnail(3033433,"186479","","little-red-013_thumb.jpg",130,86,18);thumbnails[3033119]=new thumbnail(3033119,"186479","","little-red-001_thumb.jpg",130,92,18);thumbnails[3033121]=new thumbnail(3033121,"186479","","little-red-003_thumb.jpg",130,85,18);thumbnails[3033122]=new thumbnail(3033122,"186479","","little-red-004_thumb.jpg",130,91,18);thumbnails[3033126]=new thumbnail(3033126,"186479","","little-red-008_thumb.jpg",130,86,18);thumbnails[3679146]=new thumbnail(3679146,"224817","","_AUGweb_01_thumb.jpg",130,86,18);thumbnails[2523100]=new thumbnail(2523100,"160458","","drones_havilah_031_thumb.jpg",130,178,18);thumbnails[3679377]=new thumbnail(3679377,"224817"," ","_AUGweb_02_thumb.jpg",130,86,18);thumbnails[2523182]=new thumbnail(2523182,"160458","","drones_havilah_371_thumb.jpg",130,150,18);thumbnails[3679378]=new thumbnail(3679378,"224817","","_AUGweb_03_thumb.jpg",130,86,18);thumbnails[2523188]=new thumbnail(2523188,"160458","","Gareth_mic1_thumb.jpg",130,195,18);thumbnails[3679398]=new thumbnail(3679398,"224817","","_AUGweb_04_thumb.jpg",130,86,18);thumbnails[2526118]=new thumbnail(2526118,"160458","","drones_havilah_252_thumb.jpg",130,195,18);thumbnails[3679365]=new thumbnail(3679365,"224817","","_AUGweb_12_thumb.jpg",130,196,18);thumbnails[2526119]=new thumbnail(2526119,"160458","","drones_havilah_301_thumb.jpg",130,195,18);thumbnails[3679401]=new thumbnail(3679401,"224817","","_AUGweb_13_thumb.jpg",130,196,18);thumbnails[2523278]=new thumbnail(2523278,"160458","","drones_havilah_312_thumb.jpg",130,195,18);thumbnails[3679402]=new thumbnail(3679402,"224817","","_AUGweb_14_thumb.jpg",130,196,18);thumbnails[2523237]=new thumbnail(2523237,"160458","","drones_havilah_075_thumb.jpg",130,170,18);thumbnails[3679367]=new thumbnail(3679367,"224817","","_AUGweb_17_thumb.jpg",130,196,18);thumbnails[3702370]=new thumbnail(3702370,"160458","","Fiona_web_thumb.jpg",130,195,18);thumbnails[3679399]=new thumbnail(3679399,"224817","","_AUGweb_06_thumb.jpg",130,86,18);thumbnails[3702372]=new thumbnail(3702372,"160458","<br>\r\n","g_d_web_thumb.jpg",130,86,18);thumbnails[3679361]=new thumbnail(3679361,"224817","","_AUGweb_07_thumb.jpg",130,86,18);thumbnails[3702373]=new thumbnail(3702373,"160458","","g_f_web_thumb.jpg",130,86,18);thumbnails[2522915]=new thumbnail(2522915,"160458","","fi_havila_thumb.jpg",130,85,18);thumbnails[3679363]=new thumbnail(3679363,"224817","","_AUGweb_09_thumb.jpg",130,86,18);thumbnails[2526155]=new thumbnail(2526155,"160458","","drones_havilah_162_thumb.jpg",130,91,18);thumbnails[3679362]=new thumbnail(3679362,"224817","","_AUGweb_08_thumb.jpg",130,86,18);thumbnails[2501949]=new thumbnail(2501949,"160458","","drones_havilah_thumb.jpg",130,86,18);thumbnails[3679364]=new thumbnail(3679364,"224817","","_AUGweb_11_thumb.jpg",130,86,18);thumbnails[3702371]=new thumbnail(3702371,"160458","","Gareth_x3_web_thumb.jpg",130,65,18);thumbnails[2526154]=new thumbnail(2526154,"160458","","drones_havilah_151_thumb.jpg",130,86,18);thumbnails[3679360]=new thumbnail(3679360,"224817"," ","_AUGweb_05_thumb.jpg",130,86,18);thumbnails[2523106]=new thumbnail(2523106,"160458","","drones_havilah_291_thumb.jpg",130,106,18);thumbnails[3679400]=new thumbnail(3679400,"224817"," ","_AUGweb_10_thumb.jpg",130,86,18);thumbnails[3679368]=new thumbnail(3679368,"224817","","_AUGweb_19_thumb.jpg",130,86,18);thumbnails[2523272]=new thumbnail(2523272,"160458","","drones_havilah_171_thumb.jpg",130,86,18);thumbnails[3679403]=new thumbnail(3679403,"224817","","_AUGweb_15_thumb.jpg",130,196,18);thumbnails[2526120]=new thumbnail(2526120,"160458","","drones_havilah_331_thumb.jpg",130,88,18);thumbnails[4425298]=new thumbnail(4425298,"224817","","_AUG03_26_thumb.jpg",120,181,2);thumbnails[2526121]=new thumbnail(2526121,"160458","","drones_havilah_342_thumb.jpg",130,87,18);thumbnails[3679366]=new thumbnail(3679366,"224817","","_AUGweb_16_thumb.jpg",130,196,18);thumbnails[3679575]=new thumbnail(3679575,"224817","","_AUGweb_18_thumb.jpg",130,196,18);thumbnails[3702374]=new thumbnail(3702374,"160458","","m_b_web_thumb.jpg",130,86,18);thumbnails[2524148]=new thumbnail(2524148,"160458","","drones_havilah_182_thumb.jpg",130,88,18);thumbnails[4425377]=new thumbnail(4425377,"91861","","gareth_02_A4_thumb.jpg",120,170,2);thumbnails[4425356]=new thumbnail(4425356,"91861","","king_bro_007_thumb.jpg",120,180,2);thumbnails[4425378]=new thumbnail(4425378,"91861","","mess_hall_03_A4_thumb.jpg",120,170,2);thumbnails[4425383]=new thumbnail(4425383,"91861","","dimi_A4_thumb.jpg",120,170,2);thumbnails[3702385]=new thumbnail(3702385,"91861","","DSC_0071_thumb.jpg",130,195,18);thumbnails[4425350]=new thumbnail(4425350,"91861","","dan_01_1_thumb.jpg",120,166,2);thumbnails[4425351]=new thumbnail(4425351,"91861","","DSC_0037_thumb.jpg",120,180,2);thumbnails[4425354]=new thumbnail(4425354,"91861","","gareth_01_1_thumb.jpg",120,178,2);thumbnails[4425663]=new thumbnail(4425663,"91861","","snowman_006_1_thumb.jpg",120,180,2);thumbnails[4425357]=new thumbnail(4425357,"91861","","king_bro_01_A4_thumb.jpg",120,170,2);thumbnails[4425352]=new thumbnail(4425352,"91861","","DSC_00671_thumb.jpg",120,181,2);thumbnails[4425353]=new thumbnail(4425353,"91861","","DSC_0240_thumb.jpg",120,180,2);var galleries=new Object();galleries[123896]=new gallery(123896,"4425045","Portraits ","gallery",[4425045,4425044,4425041,4425037,4425039,4425042,4425046,4425040,4425038,4425278,4425047,4425043]);galleries[170195]=new gallery(170195,"4425153","B&W Portraits","gallery",[4425148,4425150,4425153,4425144,4425155,4425145,4425151,4425152,4425147,4425154,4425149,4425146]);galleries[186479]=new gallery(186479,"3033129","Little Red 'Coca Cola' ","gallery",[3033130,3033127,3033124,3033123,3033436,3033432,3033129,3033128,3033435,3033434,3033125,3033433,3033119,3033121,3033122,3033126]);galleries[224817]=new gallery(224817,"3679367","Augie March 'Farmer's Son' ","gallery",[3679146,3679377,3679378,3679398,3679365,3679401,3679402,3679367,3679399,3679361,3679363,3679362,3679364,3679360,3679400,3679368,3679403,4425298,3679366,3679575]);galleries[160458]=new gallery(160458,"2523100","Down Havilah Way","gallery",[2523100,2523182,2523188,2526118,2526119,2523278,2523237,3702370,3702372,3702373,2522915,2526155,2501949,3702371,2526154,2523106,2523272,2526120,2526121,3702374,2524148]);galleries[91861]=new gallery(91861,"4425663,4425383,4425378,4425377,4425357,4425356,4425354,4425353,4425352,4425351","Music","gallery",[4425377,4425356,4425378,4425383,3702385,4425350,4425351,4425354,4425663,4425357,4425352,4425353]);var imageSets=new Object();imageSets[1]="4425147,4425048,4425042,3711597";imageSets[2]="4425153,4425045,3679367,3033129,2523100";imageSets[3]="4425663,4425383,4425378,4425377,4425357,4425356,4425354,4425353,4425352,4425351,4425350,4425298,4425278,4425155,4425154,4425153,4425152,4425151,4425150,4425149,4425148,4425147,4425146,4425145,4425144,4425048,4425047,4425046,4425045,4425044,4425043,4425042,4425041,4425040,4425039,4425038,4425037,3711597,3702385,3702374,3702373,3702372,3702371,3702370,3679575,3679403,3679402,3679401,3679400,3679399";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 1:b="http://www1.clikpic.com/DCPhotography/images";break}switch(a){case 2:b="http://admin.clikpic.com/DCPhotography/images";break}switch(a){case 4:b="http://www.clikchurch.com/DCPhotography/images";break}switch(a){case 5:b="http://www2.clikpic.com/DCPhotography/images";break}switch(a){case 15:b="http://www3.clikpic.com/DCPhotography/images";break}switch(a){case 21:b="http://www6.clikpic.com/DCPhotography/images";break}switch(a){case 18:b="http://www4.clikpic.com/DCPhotography/images";break}switch(a){case 19:b="http://www5.clikpic.com/DCPhotography/images";break}switch(a){case 22:b="http://tpc5/clikpic/DCPhotography/images";break}switch(a){case 23:b="http://tpc10/clikpic/DCPhotography/images";break}switch(a){case 24:b="http://tpc15/clikpic/DCPhotography/images";break}switch(a){case 25:b="http://tpc16/clikpic/DCPhotography/images";break}switch(a){case 31:b="http://www7.clikpic.com/DCPhotography/images";break}switch(a){case 32:b="http://admin2.clikpic.com/DCPhotography/images";break}switch(a){case 33:b="http://www8.clikpic.com/DCPhotography/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="Baker  Street  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").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+"</p>";var e=c.purchase_instruction;var d=c.item_price;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<120){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+'")'})}}};