window.thumbnails = {};
															thumbnails[4087503] = clik.newPhoto({"id":4087503,"src":"chantrelle_thumb.JPG","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"\"Golden Chantrelles\"","height":195});
															thumbnails[4087506] = clik.newPhoto({"id":4087506,"src":"cobb_nuts_thumb.JPG","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"Kentish Cobb Nuts","height":195});
															thumbnails[4087587] = clik.newPhoto({"id":4087587,"src":"kalabrise_thumb.JPG","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"Kalabrise","height":195});
															thumbnails[4087684] = clik.newPhoto({"id":4087684,"src":"mixed_toms_thumb.JPG","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"\"Tomatoes\"","height":195});
															thumbnails[4087716] = clik.newPhoto({"id":4087716,"src":"russet_apples_thumb.JPG","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"English Russets Coming Soon\"","height":87});
															thumbnails[4087742] = clik.newPhoto({"id":4087742,"src":"RT_158_thumb.JPG","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"Stilton Cheese  & Dips","height":195});
															thumbnails[4087750] = clik.newPhoto({"id":4087750,"src":"RT_159_thumb.JPG","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"Party Food","height":195});
															thumbnails[4087763] = clik.newPhoto({"id":4087763,"src":"IMG_0087_lion_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"Fish & Chips","height":182});
															thumbnails[7255538] = clik.newPhoto({"id":7255538,"src":"lion_nice_thumb.JPG","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"","height":87});
															thumbnails[4087466] = clik.newPhoto({"id":4087466,"src":"20090217_0294_cajun_salad_copy_1_thumb.jpg","galleries_id":245469,"server_id":15,"link":"photo_4087466.html","width":130,"caption":"Free Range Cajun Chicken Salad","height":182});
															thumbnails[4087509] = clik.newPhoto({"id":4087509,"src":"fish_chips_thumb.JPG","galleries_id":245469,"server_id":15,"link":"photo_4087509.html","width":130,"caption":"Mersea Ale Battered Fish & Chips with Homemade Tartare. ","height":195});
															thumbnails[4087578] = clik.newPhoto({"id":4087578,"src":"IMG_0040_fig_frang_1_thumb.jpg","galleries_id":245469,"server_id":15,"link":"photo_4087578.html","width":130,"caption":"Hadleys Vanilla Icecream, Figs, Frangipane Tart","height":195});
															thumbnails[4645272] = clik.newPhoto({"id":4645272,"src":"IMG_0061_use_1_thumb.jpg","galleries_id":245469,"server_id":15,"link":"photo_4645272.html","width":130,"caption":"Public Bar","height":176});
															thumbnails[4645279] = clik.newPhoto({"id":4645279,"src":"IMG_0009_1_thumb.JPG","galleries_id":245469,"server_id":15,"link":"photo_4645279.html","width":130,"caption":"","height":87});
															thumbnails[4087452] = clik.newPhoto({"id":4087452,"src":"_MG_3252_1onions_thumb.JPG","galleries_id":245538,"server_id":15,"link":"photo_4087452.html","width":130,"caption":"","height":195});
															thumbnails[4087453] = clik.newPhoto({"id":4087453,"src":"20080620_0046_1_strawberry_granita_thumb.JPG","galleries_id":245538,"server_id":15,"link":"photo_4087453.html","width":130,"caption":"Strawberry & Pimms Granita","height":195});
															thumbnails[4087459] = clik.newPhoto({"id":4087459,"src":"20090126_0184_lamb_1breast_of_lamb_thumb.JPG","galleries_id":245538,"server_id":15,"link":"photo_4087459.html","width":130,"caption":"Slow Roasted Layer Maney Lamb Creamy Potato, Tomato Chuntey.","height":195});
															thumbnails[4087493] = clik.newPhoto({"id":4087493,"src":"20090217_0295_watercress_1_thumb.jpg","galleries_id":245538,"server_id":15,"link":"photo_4087493.html","width":130,"caption":"Fish Cakes, Lemon Dip & Watercress","height":182});
															thumbnails[4087498] = clik.newPhoto({"id":4087498,"src":"20090217_0309_curried_lamb_chop_1_thumb.jpg","galleries_id":245538,"server_id":15,"link":"photo_4087498.html","width":130,"caption":"Curried Marsh Lamb","height":182});
															thumbnails[4087501] = clik.newPhoto({"id":4087501,"src":"artichokes_thumb.JPG","galleries_id":245538,"server_id":15,"link":"photo_4087501.html","width":130,"caption":"Globe Artichokes","height":195});
															thumbnails[4087515] = clik.newPhoto({"id":4087515,"src":"IMG_0017_1halibut_1_thumb.jpg","galleries_id":245538,"server_id":15,"link":"photo_4087515.html","width":130,"caption":"Hallibut, Herb Oil and Pomegranate","height":195});
															thumbnails[4087526] = clik.newPhoto({"id":4087526,"src":"IMG_0020_beef_beans_1_thumb.jpg","galleries_id":245538,"server_id":15,"link":"photo_4087526.html","width":130,"caption":"Red Poll Fillet Green Beans Tarrogan Sauce","height":182});
															thumbnails[4087540] = clik.newPhoto({"id":4087540,"src":"IMG_0038_2_peach_1_thumb.jpg","galleries_id":245538,"server_id":15,"link":"photo_4087540.html","width":130,"caption":"Peach, Rose Water & Pistachio Mint Yoghurt","height":87});
															thumbnails[4087596] = clik.newPhoto({"id":4087596,"src":"lamb_cous_cous_thumb.JPG","galleries_id":245538,"server_id":15,"link":"photo_4087596.html","width":130,"caption":"New Season Lamb, Cous Cous & Pomigranite dressing","height":195});
															thumbnails[4087657] = clik.newPhoto({"id":4087657,"src":"lobster_head_thumb.JPG","galleries_id":245538,"server_id":15,"link":"photo_4087657.html","width":130,"caption":"Blackwater Lobster","height":182});
															thumbnails[4087666] = clik.newPhoto({"id":4087666,"src":"lobster_tails_thumb.JPG","galleries_id":245538,"server_id":15,"link":"photo_4087666.html","width":130,"caption":"Lobster","height":182});
															thumbnails[4087676] = clik.newPhoto({"id":4087676,"src":"meat_platter_thumb.JPG","galleries_id":245538,"server_id":15,"link":"photo_4087676.html","width":130,"caption":"Cured Meat Platter","height":195});
															thumbnails[4087691] = clik.newPhoto({"id":4087691,"src":"oysters_thumb.JPG","galleries_id":245538,"server_id":15,"link":"photo_4087691.html","width":130,"caption":"\"Colchester Oysters\"","height":195});
															thumbnails[4087702] = clik.newPhoto({"id":4087702,"src":"raspberry_shortbread_1_thumb.JPG","galleries_id":245538,"server_id":15,"link":"photo_4087702.html","width":130,"caption":"Homemade Puddings","height":195});
															thumbnails[4087734] = clik.newPhoto({"id":4087734,"src":"RT_008_thumb.JPG","galleries_id":245538,"server_id":15,"link":"photo_4087734.html","width":130,"caption":"\" A celebration\"","height":195});
															thumbnails[8793808] = clik.newPhoto({"id":8793808,"src":"Taste_Of_France_30-11-2011_thumb.jpg","galleries_id":287225,"server_id":15,"link":"photo_8793808.html","width":130,"caption":"Taste Of France 30-11-2011","height":184});
															thumbnails[8793809] = clik.newPhoto({"id":8793809,"src":"Lion_November_Menu_30-11-2011_thumb.jpg","galleries_id":287225,"server_id":15,"link":"photo_8793809.html","width":130,"caption":"November Menu","height":184});
															thumbnails[8008339] = clik.newPhoto({"id":8008339,"src":"Map_Lion_Location_1_thumb.jpg","galleries_id":430277,"server_id":15,"link":"photo_8008339.html","width":130,"caption":"Where are we? Langenhoe Lion, Mersea Rd, Abberton & Langenhoe Colchester CO5 7LF 01206 735263","height":96});
															thumbnails[8301404] = clik.newPhoto({"id":8301404,"src":"Voucher_Block_thumb.jpg","galleries_id":430277,"server_id":15,"link":"photo_8301404.html","width":130,"caption":"£10 Off A meal For 4 Please print and Present to Your Server","height":183});
															thumbnails[8793895] = clik.newPhoto({"id":8793895,"src":"Web_Steak_Offer_thumb.jpg","galleries_id":430277,"server_id":15,"link":"photo_8793895.html","width":130,"caption":"Steak and Saturdays","height":177});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[430277] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Location & Offers","link":"section465872.html","maxRecords":0.0,"photoIDs":[8008339.0,8301404.0,8793895.0],"skipIndex":0,"section_code":"section465872","featured_images":"8793895,8301404,8008339","id":430277,"singleSection":true});				  						galleries[287225] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Menus","link":"section344529.html","maxRecords":0.0,"photoIDs":[8793808.0,8793809.0],"skipIndex":0,"section_code":"section344529","featured_images":"8793809,8793808","id":287225,"singleSection":true});				  						galleries[245538] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Restaurant","link":"section297932.html","maxRecords":0.0,"photoIDs":[4087452.0,4087453.0,4087459.0,4087493.0,4087498.0,4087501.0,4087515.0,4087526.0,4087540.0,4087596.0,4087657.0,4087666.0,4087676.0,4087691.0,4087702.0,4087734.0],"skipIndex":0,"section_code":"section297932","featured_images":"4087734,4087702,4087691,4087676,4087657,4087596,4087540,4087526,4087498,4087493,4087459,4087453,4087452","id":245538,"singleSection":true});				  						galleries[245469] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Village Bar","link":"section297925.html","maxRecords":0.0,"photoIDs":[4087466.0,4087509.0,4087578.0,4645272.0,4645279.0],"skipIndex":0,"section_code":"section297925","featured_images":"4087578,4087509,4087466","id":245469,"singleSection":true});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '7255538,4087734,4087691,4087676,4087657,4087459,4087453,4087452';
imageSets[2] = '4087734,4087702,4087691,4087676,4087657,4087596,4087578,4087540,4087526,4087509,4087498,4087493,4087466,4087459,4087453,4087452';
imageSets[3] = '4087734,4087691,4087676,4087657,4087459,4087453,4087452';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/carol1977/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/carol1977/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/carol1977/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/carol1977/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/carol1977/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/carol1977/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/carol1977/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/carol1977/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/carol1977/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/carol1977/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/carol1977/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/carol1977/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/carol1977/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/carol1977/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/carol1977/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/carol1977/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/carol1977/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/carol1977/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/carol1977/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/carol1977/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/carol1977/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/carol1977/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/carol1977/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/carol1977/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/carol1977/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/carol1977/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/carol1977/images';
		break;
	}
		return val;
}

/***************************************************************************
* img = reference to image object in which to show image                   *
***************************************************************************/
function showHomeImage(img) {
	imageID = randomListVal('');
	if (!basic) {
		img.src = photos[imageID].src;
		img.width = photos[imageID].width;
		img.height = photos[imageID].height;
		img.parentNode.title = img.alt = photos[imageID].caption;
	} else {
		newImage = new Image(photos[imageID].width,photos[imageID].height);
		newImage.src = photos[imageID].src;
		document.images[img.name] = newImage;
		
	}
}

function getHomeImageLink(imageID) {
  	var href='', photo = (backgrounds || photos || {})[imageID];
	if(photo){
		if (photo && photo.galleries_id != '') {
  			href = photo.fnGalleryLink();
  		}
  		  		else {
  				href += 'section297925.html';
  	  		}
	}
    return href;
}

/***************************************************************************
* Show a random image on home page from featured images                    *
***************************************************************************/
function showHomeImageInline(el, image_sets_id, href) {
	
	var css = {}, imageID,
	    imageSetsId = 1;
	if(image_sets_id){
		imageSetsId = image_sets_id;
	}
	imageID = randomListVal(imageSets[imageSetsId]);
	if (href == null && 'section297925' != '') {
					href = getHomeImageLink(imageID);
	}
	
	updateImage({nextPhoto: backgrounds[imageID], img:el.find('img')[0],
                $photo:el, $title:$('#homeimageTitleContainer'), $detail:$('#homeimageDetailsContainer'),                speed:0, href:href, css:css, onAfter: function(){                  this.closest('.contentsection').doManualAlign({				    inner: 'img',				    crop: 'a'				  });                }              });
}

/***************************************************************************
* Set 'img' to be a new image given its photo() object                     *
***************************************************************************/
function updateImage (options) {
	var defaults = {nextPhoto:'',field:'',img:'',$photo:'',$title:'',$detail:'',$detailContainer:'',
                    updateDocumentTitle:false,speed:0,href:false,css:false,updateHash:false,onAfter:null,onBefore:null},
		op = $.extend({},defaults,options),
		html = '', temp = '',
		photoId = op.nextPhoto.id,
		photoCaption = ''+op.nextPhoto.caption,
		photoSrc = op.nextPhoto.src;
	
	if (op.updateHash && clik.getIDInUrl(location.href,'photo') != op.nextPhoto.id) {
		clik.changeHash('photos_id=' + op.nextPhoto.id, true);
	}
		
	    if (op.$title.length > 0) {
  		op.$title.fadeGalleryDetails(photoCaption, op.speed);
    }
        if (op.updateDocumentTitle) {
						  document.title = 'The Langenhoe Lion 01206 735263 : ' + photoCaption;
			    }
        if (op.$detail.length > 0) {
      	temp = op.nextPhoto.fnGetImageDetails();
	    op.$detail.fadeGalleryDetails(temp, op.speed, function(){
			if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
				toggleAddToCartConfirm(backgrounds, op.$detail);
			} else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
				toggleAddToCartConfirm(photos, op.$detail);
			}
			$('body').trigger('clikUpdate.popup');
	    });
    }
        $(op.$detailContainer).find('.replaceable[class*=replaceable_photo-]').each(function(){
    	var field = clik.getPrefixedClass(this.className, 'replaceable_photo-');
    	if (field in op.nextPhoto) {
    		$(this).fadeGalleryDetails(op.nextPhoto[field], op.speed);
    	}
    }).end().find('.replaceable.photoPayment').fadeGalleryDetails(op.nextPhoto.fnGetPaymentInfo(), op.speed, function(){
		if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
			toggleAddToCartConfirm(backgrounds, op.$detailContainer);
		} else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
			toggleAddToCartConfirm(photos, op.$detailContainer);
		}
		$('body').trigger('clikUpdate.popup');
	});
		if (op.$photo.length > 0) {
		html = $('<img/>',{
			'class': 'mainphoto photo',
			src: photoSrc,
			id: 'mainPic',
			name: 'mainPic',
			width: op.nextPhoto.width,
			height: op.nextPhoto.height,
			alt: photoCaption,
			css: op.css || {}
		});
		if (op.href) {
			if (op.href.match(/<a/)) {
				html = $(op.href).append(html);
			} else {
				html = $('<a/>', {
					href: op.href,
					title: photoCaption
				}).append(html);
			}
		} else {
			html = $('<a/>', {
				title: photoCaption
			}).append(html);
		}
		if (op.speed == 0) {			op.$photo.html(html);			if (op.onBefore) {			  	op.onBefore.apply(op.$photo);			}			if (op.onAfter) {			  	op.onAfter.apply(op.$photo);			}		} else {			op.$photo.stop(true,true).fadeReplaceWith(html,op.speed,'',function(){  				if (op.onAfter) {				  	op.onAfter.apply(this);				}				clik.doColumnResize(false, $(this).add(op.$detail).add(op.$title));			}, op.onBefore);
		}	}
    if (op.field) {
		op.field.value = photoId;
	} else {
		op.$photo.data('image_id', photoId);
    }
        if (!op.speed) {
      	clik.doColumnResize(false, op.$photo.add(op.$detail).add(op.$title));
    }
        
    return html;
	}

/***************************************************************************
* Toggle add to cart confirmation element and set up the click event for   *
* the 'Add to cart' button.                                                *
***************************************************************************/
function toggleAddToCartConfirm(array, root){
	if (typeof(array) !== 'object' || array === null) {
	  	array = photos;
	}
	if (!$(root).length) {		root = $('body');	}	if($('#paymentConfirm', root).length > 0){
		$('#paymentConfirm', root).hide();
		$('#paymentAddButton', root)
		.unbind()
		.click(function(){
						form = $('#paymentForm', root)[0];
			option_id = 0;
			if(form.item_option.value){
				option_id = form.item_option.value;
			}
			if(addItemToBasket(form.item_number.value,array,form.site.value,parseInt(form.quantity.value, 10),option_id)){
				if($.browser.msie){$('#paymentConfirm', root).text('Item added to cart').show();}
				else{
					$('#paymentConfirm', root).text('Item added to cart').fadeIn();
					dspOrderDetails(form.site.value);
				}
			}
			else{
				$('#paymentConfirm', root).text('Item not added - check cookies are enabled in your browser.').fadeIn();
			}
		});
	}
}

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
clik.photo.fnGetImageDetails = function(){
	var temp = '';
	if (this.description != '') {
		temp +=  '<div id="imageDescription">' + this.description + '</div>';
	}
		if (this.photo_ref != '') {
		temp += '<div class="imageinfo" id="imageRef"><strong>Ref: </strong>' + this.photo_ref + '</div>';
	}
		if (this.takendate != '') {
		
		temp += '<div class="imageinfo" id="imageDate"><strong>Date: </strong>' + this.takendate + '</div>';
	}
	
	if (this.location != '') {
		
		temp += '<div class="imageinfo" id="imageLocation"><strong>Location: </strong>' +  this.location + '</div>';
	}
	
	if (this.photographer != '') {
		
		temp += '<div class="imageinfo" id="imagePhotographer"><strong>Photographer: </strong>' + this.photographer + '</div>';
	}
				
				if (temp != '') {
		temp += '<div class="spacer"></div>';
	}
	return temp;
};

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
clik.photo.fnGetPaymentInfo = function(){
	var temp = '';
	if (this.item_price !== '') {
				temp += '<p>Order this print:</p>';
				temp += '<div class="imageinfo" id="imagePrice"><strong>' + this.purchase_instruction + '</strong> ' + (this.item_price).toFixed(2) + '</div>';
		var item_name  = this.purchase_instruction;
		var amount = (this.item_price).toFixed(2);
		var item_option  = 0;
	}
		else {
		
	}
	if (this.item_price !== '') {
			temp += '<div class="clearing">&nbsp;</div>';
	}
	return temp;};

/***************************************************************************
* Pick a photo at random from the featured images of a gallery.            *
* Gallery_id = id of gallery to choose,                                    *
* img = reference to html image in                                         *
* which to show image                                                      *
***************************************************************************/
function showGalleryImage(gallery_id, img, updateLink) {
	
	if(img){
		if (location.hash.match('galleries_id=' + gallery_id) && (imageID = location.hash.match('.*photos_id=(.+)$'))) {
		  	imageID = imageID[1];
		} else {
		  	imageID = randomListVal(galleries[gallery_id].featured_images);
		}
		
		if (imageID != 0) {
			img.src = thumbnails[imageID].src;
			img.width = thumbnails[imageID].width;
			img.height = thumbnails[imageID].height;
			img.alt = galleries[gallery_id].title;
			if (updateLink) {
				$(img).parent().attr({					title: galleries[gallery_id].title				}).filter(function(){return this.href;}).attr({					href: thumbnails[imageID].fnGalleryLink(gallery_id)				});
			}
		}
	}
}

/***************************************************************************
* If we have dynamic HTML, replace the galleries link with a list that     *
* doesn't include thecurrent gallery                                       *
***************************************************************************/
function showGalleries(gallery_id) {
		
	
	if (!basic) {
		temp = '';
		for (i = 0; i < galleries.length; i++) {
						
			
			if (galleries[i].id != gallery_id) {
								
				if (temp != '') {
					temp += ' | ';
				}
								temp += '<a href="' + galleries[i].section_code + '_' + galleries[i].id + '.html">' + galleries[i].title + '</a>';
							}
		}
		document.all.galleryLinks.innerHTML = 'Other galleries: ' + temp;
	}
}

			

