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[5146181]=new thumbnail(5146181,"123283","St Clement Danes","St_Clement_Danes_thumb.jpg",130,184,1);thumbnails[5142299]=new thumbnail(5142299,"123283","Albert Bridge I","Albert_Bridge_II___42_x_30_cm_thumb.jpg",130,182,1);thumbnails[5146183]=new thumbnail(5146183,"123283","St Pauls","St_Pauls_thumb.jpg",130,183,1);thumbnails[5142134]=new thumbnail(5142134,"123283","Albert Bridge II","Albert_Bridge___40_x_60_cm_thumb.jpg",130,88,1);thumbnails[1852191]=new thumbnail(1852191,"123283","Marlowe Bridge","Marlow Bridge Ajpg_thumb.jpg",130,92,1);thumbnails[1852173]=new thumbnail(1852173,"123283","Henley Bridge","Henley Bridge Acrylicjpg_thumb.jpg",130,92,1);thumbnails[1849331]=new thumbnail(1849331,"123283","Charing Cross","Charing Cross at Nightjpg_thumb.jpg",130,91,1);thumbnails[1852182]=new thumbnail(1852182,"123283","Parliament at Dusk","Houses of Parliament Acrylic  60 x 40 cmjpg_thumb.jpg",130,91,1);thumbnails[1852195]=new thumbnail(1852195,"123283","The Savoy","Savoy Hoteljpg_thumb.jpg",130,86,1);thumbnails[2956504]=new thumbnail(2956504,"123283","Towards Charing Cross","Light-On-Thames-Near-Charin_thumb.jpg",130,178,1);thumbnails[1855691]=new thumbnail(1855691,"123283","St Pauls At Night","StPaulsNightLights jpg_thumb.jpg",130,197,1);thumbnails[2974401]=new thumbnail(2974401,"123283","St Pancras International","_St-Pancras-International-S_thumb.jpg",130,197,1);thumbnails[1852200]=new thumbnail(1852200,"123283","The Embankment ","The Embankment at Dusk  Ajpg_thumb.jpg",130,98,1);thumbnails[1852198]=new thumbnail(1852198,"123283","Shellmex Building ","Shell Building at Nightjpg_thumb.jpg",130,91,1);thumbnails[5160253]=new thumbnail(5160253,"123283","Lighting Up Time, Westminster","Lighting_Up_Time_Westminster___60_x_80_cm1_thumb.jpg",130,99,1);thumbnails[1846624]=new thumbnail(1846624,"123477","Provence","Blue Shutters, Provence  Acrylic 60 x 80 cmjpg_thumb.jpg",130,98,1);thumbnails[4906034]=new thumbnail(4906034,"123477","The Harbour, Honfleur","Honfleur21x30cmAcryl_thumb.jpg",130,91,1);thumbnails[1846621]=new thumbnail(1846621,"123477","Pont Neuf","Bateau Mouche at the Pont Neufjpg_thumb.jpg",130,90,1);thumbnails[1846626]=new thumbnail(1846626,"123477","Cafe, Girona","Cafe Gironajpg_thumb.jpg",130,93,1);thumbnails[1846638]=new thumbnail(1846638,"123477","San Giacomo, Venice","San Giacomojpg_thumb.jpg",130,92,1);thumbnails[1846636]=new thumbnail(1846636,"123477","Hilltop Village, Provence","rooftops, provence  Acrylic 40 x 60 cmjpg_thumb.jpg",130,87,1);thumbnails[1846640]=new thumbnail(1846640,"123477","Side Canal, Venice","Side canal Venicejpg_thumb.jpg",130,91,1);thumbnails[1846690]=new thumbnail(1846690,"123477","Red Building,Nice","Red Building, Nice  Acrylic  30 x 42 cmjpg_thumb.jpg",130,92,1);thumbnails[2974460]=new thumbnail(2974460,"123477","Hotel Europa, Evening","Hotel-Europa,-Evening-Light_thumb.jpg",130,91,1);thumbnails[5142428]=new thumbnail(5142428,"123477","The Salute, Summer Afternoon","The_Salute_Afternoon_Light____60_x_40_cm_thumb.jpg",130,196,1);thumbnails[1855710]=new thumbnail(1855710,"123477","Flower Shop","FlowerShopLoire jpg_thumb.jpg",130,187,1);thumbnails[1855707]=new thumbnail(1855707,"123477","Barcelona Balconies","Balconies_Barcelona jpg_thumb.jpg",130,196,1);thumbnails[1855708]=new thumbnail(1855708,"123477","Clearing Sky, Grand Canal","ClearingSkyNearTheRialto  jpg_thumb.jpg",130,173,1);thumbnails[1840707]=new thumbnail(1840707,"123477","View From The Academia ","View_From_Academia_ Bridge_thumb.jpg",130,96,1);thumbnails[1854659]=new thumbnail(1854659,"123477","Palazzi At Night","2-Pallazzi-at-night1_thumb.jpg",130,183,1);thumbnails[1843325]=new thumbnail(1843325,"123482","Lina Stores, Soho","Lina-Stores-1_thumb.jpg",130,92,1);thumbnails[1843432]=new thumbnail(1843432,"123482","Gilbert's Restaurant, Kensington","Restaurant,-Kensington_thumb.jpg",130,92,1);thumbnails[1843449]=new thumbnail(1843449,"123482","Shops, Nottinghill","Shops-Nottinghill_thumb.jpg",130,91,1);thumbnails[1843248]=new thumbnail(1843248,"123482","Brighton Pavillion","Brighton-Pavillion-_thumb.jpg",130,184,1);thumbnails[4899667]=new thumbnail(4899667,"123482","Simpson's Doorway, The Strand","Simpsons-DoorwayThe-Stran_thumb.jpg",130,194,1);thumbnails[1840805]=new thumbnail(1840805,"123483","Bay, Sitges","  Bayatsitges_thumb.jpg",130,87,2);thumbnails[1846630]=new thumbnail(1846630,"123483","Rooftops, Girona","Fooftops Gironajpg_thumb.jpg",130,97,1);thumbnails[1846714]=new thumbnail(1846714,"123483","Placa Real, Barcelona","Placa Real Barcelona  jpg_thumb.jpg",130,98,1);thumbnails[1991388]=new thumbnail(1991388,"123483","Lift Bridge Amsterdam","Amsterdam  MMjpg1_thumb.jpg",130,87,1);thumbnails[4861958]=new thumbnail(4861958,"123483","Arcade Venice","ArcadeVenice_thumb.jpg",130,87,1);thumbnails[4864217]=new thumbnail(4864217,"123483","Eus, Roussillon","Eus30x42cmOil_thumb.jpg",130,92,1);thumbnails[1855705]=new thumbnail(1855705,"123483","Houses Amsterdam","Amsterdam Houses  jpg_thumb.jpg",130,183,1);thumbnails[1849319]=new thumbnail(1849319,"123484","Near Brimham Rocks, Yorkshire","From_Brimham_Rocks  jpg1_thumb.jpg",130,62,1);thumbnails[1849275]=new thumbnail(1849275,"123484","Nidderdale Tops","Nidderdale_Tops_I  jpg_thumb.jpg",130,66,1);thumbnails[1849304]=new thumbnail(1849304,"123484","Near Pateley Bridge","Road_Yorkshire_Dales  jpg_thumb.jpg",130,58,1);thumbnails[1852167]=new thumbnail(1852167,"123484","Cromford Canal","Cromford Canal  Ajpg_thumb.jpg",130,94,1);thumbnails[2861582]=new thumbnail(2861582,"123484","Autumn Walk Near Leigh","AutumnWalkNearPenshurst_thumb.jpg",129,92,1);thumbnails[5095878]=new thumbnail(5095878,"123484","Evening walk Golden Green","Evening-2-Walk-Golden-Gree_thumb.jpg",130,87,1);thumbnails[2985000]=new thumbnail(2985000,"183825","Brooklyn Bridge (Detail)","KN001009_thumb.jpg",130,195,1);thumbnails[3507068]=new thumbnail(3507068,"183825","London Transport Poster","London-Underground-Poster_thumb.jpg",130,180,1);thumbnails[2985089]=new thumbnail(2985089,"183825","Church Spire, Prague","CNV00001_thumb.jpg",130,204,1);thumbnails[2985105]=new thumbnail(2985105,"183825","Indian Doorway   ","KN001015_thumb.jpg",130,88,1);thumbnails[2985217]=new thumbnail(2985217,"183825","Baroque Church, Prague","CNV00002_thumb.jpg",130,72,1);thumbnails[2985283]=new thumbnail(2985283,"183825","Mosque, Cordoba    ","CNV00005_thumb.jpg",130,95,1);thumbnails[2985369]=new thumbnail(2985369,"183825"," House in Lindfield       ","House-commission--MM3_thumb.jpg",130,56,1);thumbnails[2985087]=new thumbnail(2985087,"183825","Corniche, Muscat","KN001010_thumb.jpg",130,152,1);thumbnails[1840831]=new thumbnail(1840831,"123485","Church and Palms, Sitges"," ChurchatSitges_thumb.jpg",130,86,2);thumbnails[1852478]=new thumbnail(1852478,"123485","fabbriche Vecchie, Venice"," Fabbriche Vecchie, Venice   jpg1_thumb.jpg",130,87,2);thumbnails[1846721]=new thumbnail(1846721,"123485","Salute Venice","Salute Venice jpg_thumb.jpg",130,91,1);thumbnails[1930955]=new thumbnail(1930955,"123485","Courtyard Venice","Courtyard_Venice-_thumb.jpg",130,204,1);thumbnails[1930989]=new thumbnail(1930989,"123485","Farmhouse, Umbria","Farmhouse_Umbria-_thumb.jpg",130,202,1);thumbnails[1934415]=new thumbnail(1934415,"123485","Gothic Balconies","Gothic_Balconies  jpg_thumb.jpg",130,198,1);thumbnails[1934421]=new thumbnail(1934421,"123485","Green Doorway","Green_Door_Grand_Canal  jpg_thumb.jpg",130,204,1);thumbnails[1934426]=new thumbnail(1934426,"123485","Green Palina","Green_Palina jpg_thumb.jpg",130,197,1);thumbnails[1991314]=new thumbnail(1991314,"123485","Doge's Palace, Winter Light","Doges Palace Winter  jpg1_thumb.jpg",130,196,1);thumbnails[1934431]=new thumbnail(1934431,"123485","Two Moored Boats","Two_Moored_Boats  jpg_thumb.jpg",130,194,1);thumbnails[1991325]=new thumbnail(1991325,"123485","Alhambra, Grenada","AlhambraGrenada1_thumb.jpg",130,184,1);thumbnails[1991349]=new thumbnail(1991349,"123485","Chocolate Shop Nice","Chocolaterie, Nice A3jpg1_thumb.jpg",130,195,1);thumbnails[1991417]=new thumbnail(1991417,"123485","San Marco","San Marcojpg_thumb.jpg",130,90,1);thumbnails[1852495]=new thumbnail(1852495,"123485","Church Doorway, Vouvant","Church Doorway, Vouvant  jpg1_thumb.jpg",130,87,1);var galleries=new Object();galleries[123283]=new gallery(123283,"5160253,5146183,5146181,5142299,5142134,2974401,2956504,1855691,1852200,1852198","UK Acrylics","gallery",[5146181,5142299,5146183,5142134,1852191,1852173,1849331,1852182,1852195,2956504,1855691,2974401,1852200,1852198,5160253]);galleries[123477]=new gallery(123477,"1840707","Europe Acrylics","gallery",[1846624,4906034,1846621,1846626,1846638,1846636,1846640,1846690,2974460,5142428,1855710,1855707,1855708,1840707,1854659]);galleries[123482]=new gallery(123482,"4899667,1843449,1843432,1843325,1843248","UK Mixed Media","gallery",[1843325,1843432,1843449,1843248,4899667]);galleries[123483]=new gallery(123483,"4864217,4861958,1991388,1855705,1846714,1846630,1840805","Europe Mixed Media","gallery",[1840805,1846630,1846714,1991388,4861958,4864217,1855705]);galleries[123484]=new gallery(123484,"5095878,2861582,1852167,1849319,1849304,1849275","Landscapes","gallery",[1849319,1849275,1849304,1852167,2861582,5095878]);galleries[183825]=new gallery(183825,"3507068,2985369,2985283,2985217,2985105,2985089,2985087,2985000","Commissions","gallery",[2985000,3507068,2985089,2985105,2985217,2985283,2985369,2985087]);galleries[123485]=new gallery(123485,"1991417,1991349,1991325,1991314,1934431,1934426,1934421,1934415,1930989,1930955","Prints","gallery",[1840831,1852478,1846721,1930955,1930989,1934415,1934421,1934426,1991314,1934431,1991325,1991349,1991417,1852495]);var imageSets=new Object();imageSets[1]="5160253,5146183,5146181,5142428,5142299,5142134,5095878,4906034,4899667,4864217,4861958,3507068,2985369,2985283,2985217,2985105,2985089,2985087,2985000,2974460,2974401,2956504,2861582,1991417,1991388,1991349,1991325,1991314,1934431,1934426,1934421,1934415,1930989,1930955,1855710,1855708,1855707,1855705,1855691,1854659,1852495,1852478,1852200,1852198,1852195,1852191,1852182,1852173,1852167,1849331";imageSets[2]="1840707";imageSets[3]="5160253,5146183,5146181,5142428,5142299,5142134,5095878,4906034,4899667,4864217,4861958,3507068,2985369,2985283,2985217,2985105,2985089,2985087,2985000,2974460,2974401,2956504,2861582,1991417,1991388,1991349,1991325,1991314,1934431,1934426,1934421,1934415,1930989,1930955,1855710,1855708,1855707,1855705,1855691,1854659,1852495,1852478,1852200,1852198,1852195,1852191,1852182,1852173,1852167,1849331";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/nickhebditch/images";break}switch(a){case 1:b="http://www1.clikpic.com/nickhebditch/images";break}switch(a){case 2:b="http://admin.clikpic.com/nickhebditch/images";break}switch(a){case 24:b="http://tpc15/clikpic/nickhebditch/images";break}switch(a){case 4:b="http://www.clikchurch.com/nickhebditch/images";break}switch(a){case 5:b="http://www2.clikpic.com/nickhebditch/images";break}switch(a){case 22:b="http://tpc5/clikpic/nickhebditch/images";break}switch(a){case 23:b="http://tpc10/clikpic/nickhebditch/images";break}switch(a){case 25:b="http://tpc16/clikpic/nickhebditch/images";break}switch(a){case 15:b="http://www3.clikpic.com/nickhebditch/images";break}switch(a){case 18:b="http://www4.clikpic.com/nickhebditch/images";break}switch(a){case 19:b="http://www5.clikpic.com/nickhebditch/images";break}switch(a){case 31:b="http://www7.clikpic.com/nickhebditch/images";break}switch(a){case 32:b="http://admin2.clikpic.com/nickhebditch/images";break}switch(a){case 33:b="http://www8.clikpic.com/nickhebditch/images";break}switch(a){case 34:b="http://www9.clikpic.com/nickhebditch/images";break}switch(a){case 35:b="http://admin3.clikpic.com/nickhebditch/images";break}switch(a){case 37:b="http://admin4.clikpic.com/nickhebditch/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="Nick Hebditch: "+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+'")'})}}};