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[776758]=new thumbnail(776758,"60213","Fay","Fay_thumb.jpg",130,184,15);thumbnails[821670]=new thumbnail(821670,"60213","Fay","Fay&Copy_thumb.jpg",130,184,15);thumbnails[776780]=new thumbnail(776780,"60213","Sophia","Sophia_thumb.jpg",130,184,15);thumbnails[776768]=new thumbnail(776768,"60213","John","John_thumb.jpg",130,184,15);thumbnails[776792]=new thumbnail(776792,"60213","Steph and friends","Stephani_thumb.jpg",130,184,15);thumbnails[821674]=new thumbnail(821674,"63732","Zahid Din","Winchester2_thumb.jpg",130,130,15);thumbnails[821673]=new thumbnail(821673,"63732","Julia Gash","Julia_thumb.jpg",130,130,15);thumbnails[821672]=new thumbnail(821672,"63732","Mark Goodband","MarkGVT_thumb.jpg",130,130,15);thumbnails[821719]=new thumbnail(821719,"63733","Anna","Anna_thumb.jpg",130,195,15);thumbnails[821726]=new thumbnail(821726,"63733","Sam","BarberSam1_thumb.jpg",130,195,15);thumbnails[821734]=new thumbnail(821734,"63733","Mark","Mark_thumb.jpg",130,87,15);thumbnails[821738]=new thumbnail(821738,"63733","Penny","Penny1_thumb.jpg",130,195,15);thumbnails[821740]=new thumbnail(821740,"63733","Penny","Penny2_thumb.jpg",130,87,15);thumbnails[760400]=new thumbnail(760400,"58818","Braised Lamb Shanks with root vegetable mash.","Thyme02872_thumb.jpg",130,195,15);thumbnails[760404]=new thumbnail(760404,"58818","Boiled Ham Hock with grain mustard sauce and spring vegetable mash.","Thyme0454_thumb.jpg",130,195,15);thumbnails[760407]=new thumbnail(760407,"58818","Fishcakes with green vegetables and butter sauce.","Thyme1067_thumb.jpg",130,195,15);thumbnails[760408]=new thumbnail(760408,"58818","Scallops with fennel remoulade and watercress.","Thyme1169_thumb.jpg",130,195,15);thumbnails[760410]=new thumbnail(760410,"58818","Italian Sausages with polenta mash and tomato sauce.","Thyme1518_thumb.jpg",130,195,15);thumbnails[760417]=new thumbnail(760417,"58818","Warm Cherries with Mascarpone.","Thyme0582_thumb.jpg",130,195,15);thumbnails[760419]=new thumbnail(760419,"58818","Fresh Berry Pavlova.","Thyme1065_thumb.jpg",130,195,15);thumbnails[760421]=new thumbnail(760421,"58818","Rhubarb Spring Rolls with liquorice dipping sauce.","Thyme1265_thumb.jpg",130,195,15);thumbnails[769515]=new thumbnail(769515,"58833","Roast haddock with caramelised shallot and garlic with champ.","Mag1089_thumb.jpg",130,195,15);thumbnails[769518]=new thumbnail(769518,"58833","Cod with olives, cherry tomatoes ,garlic and spinach.","Mag1257_thumb.jpg",130,195,15);thumbnails[769522]=new thumbnail(769522,"58833","Salmon en croute with crisp green salad.","Mag1814_thumb.jpg",130,195,15);thumbnails[769526]=new thumbnail(769526,"58833","Fishcake with mushy peas.","Mag0311_thumb.jpg",130,195,15);thumbnails[769528]=new thumbnail(769528,"58833","Fillet of Sea Bass with Pernod sauce and celeriac crisps.","Mag0883_thumb.jpg",130,195,15);thumbnails[769531]=new thumbnail(769531,"58833","Cod with an Anchovy crust, served with dauphinois potatoes.","Mag2038_thumb.jpg",130,195,15);thumbnails[769532]=new thumbnail(769532,"58833","Rhubarb crumble.","Mag1893_thumb.jpg",130,195,15);thumbnails[769535]=new thumbnail(769535,"58833","Vanilla parfait with Brandy snaps.","Mag2372_thumb.jpg",130,195,15);thumbnails[769547]=new thumbnail(769547,"59560","","Art079_thumb.jpg",130,195,15);thumbnails[769548]=new thumbnail(769548,"59560","","Art109_thumb.jpg",130,195,15);thumbnails[769551]=new thumbnail(769551,"59560","","Cat118_thumb.jpg",130,195,15);thumbnails[769553]=new thumbnail(769553,"59560","","Cat152_thumb.jpg",130,195,15);thumbnails[776636]=new thumbnail(776636,"60481","BE...","BE_thumb.jpg",130,325,15);thumbnails[776639]=new thumbnail(776639,"60481","CK..","CK_thumb.jpg",130,325,15);thumbnails[776657]=new thumbnail(776657,"60481","ER","ER_thumb.jpg",130,325,15);thumbnails[776675]=new thumbnail(776675,"60604","Pump(in) water.","Pumps01_thumb.jpg",130,195,15);thumbnails[776686]=new thumbnail(776686,"60604","A bigger splash","Fountain_thumb.jpg",130,87,15);thumbnails[776566]=new thumbnail(776566,"60482","The first Summer drink.","Summer-Drink_thumb.jpg",130,298,15);thumbnails[776571]=new thumbnail(776571,"60482","Winter skater.","Winter-Skater_thumb.jpg",130,298,15);thumbnails[776720]=new thumbnail(776720,"58915","Wrench","SJ1158_thumb.jpg",130,195,15);thumbnails[776735]=new thumbnail(776735,"58915","Builder's tools","SJ1803_thumb.jpg",130,195,15);thumbnails[776724]=new thumbnail(776724,"58915","Snips","SJ1716_thumb.jpg",130,195,15);thumbnails[776729]=new thumbnail(776729,"58915","Saws","SJ1771_thumb.jpg",130,195,15);thumbnails[776736]=new thumbnail(776736,"58915","Hammers","SJ1618_thumb.jpg",130,195,15);thumbnails[776725]=new thumbnail(776725,"58915","Scrapers","SJ1365_thumb.jpg",130,195,15);thumbnails[776739]=new thumbnail(776739,"58915","Punches","SJ1968_thumb.jpg",130,195,15);thumbnails[776726]=new thumbnail(776726,"58915","Gauge etc","SJ1867_thumb.jpg",130,195,15);thumbnails[821746]=new thumbnail(821746,"63734","Corus","Corus_thumb.jpg",130,182,15);thumbnails[821751]=new thumbnail(821751,"63734","Natures Way","NaturesWay_thumb.jpg",130,165,15);thumbnails[821757]=new thumbnail(821757,"63734","Bestobell Valves","Bestobell_thumb.jpg",130,93,15);thumbnails[776627]=new thumbnail(776627,"60484","Message in a fire","FireDoor_thumb.jpg",130,93,15);thumbnails[821878]=new thumbnail(821878,"60484","Men In Black","M_thumb.I.B.jpg",130,182,15);thumbnails[821778]=new thumbnail(821778,"63735","The Burley Group","Burley2620_thumb.jpg",130,68,15);thumbnails[821789]=new thumbnail(821789,"63735","The Burley Group","Burley2681_thumb.jpg",130,68,15);thumbnails[821799]=new thumbnail(821799,"63735","The Burley Group","Burley2768_thumb.jpg",130,68,15);thumbnails[821862]=new thumbnail(821862,"63737","Trac 020 chip","Trac020_thumb.jpg",130,101,15);thumbnails[776712]=new thumbnail(776712,"60535","Wind","Wind_thumb.jpg",130,60,15);thumbnails[821679]=new thumbnail(821679,"58912","","Monakate_thumb.jpg",130,195,15);var galleries=new Object();galleries[58234]=new gallery(58234,"821719,821672,776758","A N I M A L","gallery",[]);galleries[60213]=new gallery(60213,"776758","Brown Sugar","gallery",[776758,821670,776780,776768,776792]);galleries[63732]=new gallery(63732,"821672","GVT Conference","gallery",[821674,821673,821672]);galleries[63733]=new gallery(63733,"821719","Working with models and non-professionals","gallery",[821719,821726,821734,821738,821740]);galleries[58238]=new gallery(58238,"769548,769518,760417,760408,760407","V E G E  T A B L E","gallery",[]);galleries[58818]=new gallery(58818,"760417,760408,760407","Thyme","gallery",[760400,760404,760407,760408,760410,760417,760419,760421]);galleries[58833]=new gallery(58833,"769518","Magpie","gallery",[769515,769518,769522,769526,769528,769531,769532,769535]);galleries[59560]=new gallery(59560,"769548","Artisan & Catch","gallery",[769547,769548,769551,769553]);galleries[58236]=new gallery(58236,"821778,821746,776729,776725,776720,776675,776636,776627,776571,776566","M I N E R A L","gallery",[]);galleries[60481]=new gallery(60481,"776636","Becker ...","gallery",[776636,776639,776657]);galleries[60604]=new gallery(60604,"776675","With water","gallery",[776675,776686]);galleries[60482]=new gallery(60482,"776571,776566","Software","gallery",[776566,776571]);galleries[58915]=new gallery(58915,"776729,776725,776720","Choosing the right tool for the job ...","gallery",[776720,776735,776724,776729,776736,776725,776739,776726]);galleries[63734]=new gallery(63734,"821746","Simple product photography","gallery",[821746,821751,821757]);galleries[60484]=new gallery(60484,"776627","Design and Agency work","gallery",[776627,821878]);galleries[63735]=new gallery(63735,"821778","Corporate photography and other stuff","gallery",[821778,821789,821799]);galleries[63737]=new gallery(63737,"821862","Non photographs","gallery",[821862]);galleries[60535]=new gallery(60535,"776712","In my hair ...","gallery",[776712]);galleries[58912]=new gallery(58912,"821679","something else","gallery",[821679]);var imageSets=new Object();imageSets[1]="776712";imageSets[2]="821778,821746,821719,821679,821672,776758,776729,776725,776720,776675,776636,776627,776571,776566,769548,769518,760417,760408,760407";imageSets[3]="821878,821862,821799,821789,821778,821757,821751,821746,821740,821738,821734,821726,821719,821679,821674,821673,821672,821670,776792,776780,776768,776758,776739,776736,776735,776729,776726,776725,776724,776720,776712,776686,776675,776657,776639,776636,776627,776571,776566,769553,769551,769548,769547,769535,769532,769531,769528,769526,769522,769518";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 34:b="http://www9.clikpic.com/felevenphotography/images";break}switch(a){case 1:b="http://www1.clikpic.com/felevenphotography/images";break}switch(a){case 2:b="http://admin.clikpic.com/felevenphotography/images";break}switch(a){case 4:b="http://www.clikchurch.com/felevenphotography/images";break}switch(a){case 5:b="http://www2.clikpic.com/felevenphotography/images";break}switch(a){case 15:b="http://www3.clikpic.com/felevenphotography/images";break}switch(a){case 21:b="http://www6.clikpic.com/felevenphotography/images";break}switch(a){case 18:b="http://www4.clikpic.com/felevenphotography/images";break}switch(a){case 19:b="http://www5.clikpic.com/felevenphotography/images";break}switch(a){case 22:b="http://tpc5/clikpic/felevenphotography/images";break}switch(a){case 23:b="http://tpc10/clikpic/felevenphotography/images";break}switch(a){case 24:b="http://tpc15/clikpic/felevenphotography/images";break}switch(a){case 25:b="http://tpc16/clikpic/felevenphotography/images";break}switch(a){case 31:b="http://www7.clikpic.com/felevenphotography/images";break}switch(a){case 32:b="http://admin2.clikpic.com/felevenphotography/images";break}switch(a){case 33:b="http://www8.clikpic.com/felevenphotography/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="f eleven 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").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>copyright Peter Goulding </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> 				&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="effie.leven@btinternet.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="effie.leven@btinternet.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+'")'})}}};