window.thumbnails = {};
															thumbnails[4448470] = clik.newPhoto({"id":4448470,"src":"image-1_thumb.jpg","galleries_id":260042,"server_id":5,"link":"photo_4448470.html","width":130,"caption":"Blickling Hall, Norfolk","height":90});
															thumbnails[4448533] = clik.newPhoto({"id":4448533,"src":"image-2_thumb.jpg","galleries_id":260042,"server_id":5,"link":"photo_4448533.html","width":130,"caption":"Mason's Home","height":94});
															thumbnails[4448572] = clik.newPhoto({"id":4448572,"src":"image-3_thumb.jpg","galleries_id":260042,"server_id":5,"link":"photo_4448572.html","width":130,"caption":"Tractor Cultivating","height":88});
															thumbnails[4448586] = clik.newPhoto({"id":4448586,"src":"image_thumb.jpg","galleries_id":260042,"server_id":5,"link":"photo_4448586.html","width":130,"caption":"Tractor Cultivating part two","height":89});
															thumbnails[4448598] = clik.newPhoto({"id":4448598,"src":"image-4_thumb.jpg","galleries_id":260042,"server_id":5,"link":"photo_4448598.html","width":130,"caption":"Shelley Bacon","height":132});
															thumbnails[6179008] = clik.newPhoto({"id":6179008,"src":"Topbmp_thumb.jpg","galleries_id":260042,"server_id":5,"link":"photo_6179008.html","width":130,"caption":"Hoste Arms, Burnham Market, Norfolk","height":132});
															thumbnails[6179057] = clik.newPhoto({"id":6179057,"src":"Top-1bmp_thumb.jpg","galleries_id":306684,"server_id":5,"link":"photo_6179057.html","width":130,"caption":"ChefChaouen Square Edition of 10","height":101});
															thumbnails[6179060] = clik.newPhoto({"id":6179060,"src":"Top-2bmp_thumb.jpg","galleries_id":306684,"server_id":5,"link":"photo_6179060.html","width":130,"caption":"ChefChaouen Kasbah Edition of 10","height":169});
															thumbnails[6179061] = clik.newPhoto({"id":6179061,"src":"Top-3bmp_thumb.jpg","galleries_id":306684,"server_id":5,"link":"photo_6179061.html","width":130,"caption":"ChefChaouren Men Edition of 10","height":91});
															thumbnails[8986025] = clik.newPhoto({"id":8986025,"src":"392710_10150467590350687_514430686_9085212_1345268188_n1_thumb.jpg","galleries_id":"","server_id":5,"link":"#","width":130,"caption":"","height":73});
															thumbnails[8997719] = clik.newPhoto({"id":8997719,"src":"COLLINS_Chiswick_thumb.jpg","galleries_id":473883,"server_id":5,"link":"photo_8997719.html","width":130,"caption":"Chiswick","height":95});
															thumbnails[9031715] = clik.newPhoto({"id":9031715,"src":"DSC_0074.JPG.opt605x584o00s605x584_thumb.JPG","galleries_id":"","server_id":5,"link":"#","width":130,"caption":"Verdigris I ","height":126});
															thumbnails[9034825] = clik.newPhoto({"id":9034825,"src":"P1012735_thumb.JPG","galleries_id":475863,"server_id":5,"link":"photo_9034825.html","width":130,"caption":"Verdigris I  ","height":130});
															thumbnails[2378015] = clik.newPhoto({"id":2378015,"src":"A3_thumb.jpg","galleries_id":152336,"server_id":5,"link":"photo_2378015.html","width":130,"caption":"A is for Animal","height":129});
															thumbnails[2378020] = clik.newPhoto({"id":2378020,"src":"B_thumb.jpg","galleries_id":152336,"server_id":5,"link":"photo_2378020.html","width":130,"caption":"B is for Britten House","height":132});
															thumbnails[2378070] = clik.newPhoto({"id":2378070,"src":"C_thumb.jpg","galleries_id":152336,"server_id":5,"link":"photo_2378070.html","width":130,"caption":"C is for Classic Civilisation","height":131});
															thumbnails[2378311] = clik.newPhoto({"id":2378311,"src":"D_thumb.jpg","galleries_id":152336,"server_id":5,"link":"photo_2378311.html","width":130,"caption":"D is for Daddy","height":134});
															thumbnails[2390175] = clik.newPhoto({"id":2390175,"src":"E_thumb.jpg","galleries_id":152336,"server_id":5,"link":"photo_2390175.html","width":130,"caption":"E is for Earring","height":130});
															thumbnails[2390325] = clik.newPhoto({"id":2390325,"src":"F_thumb.jpg","galleries_id":152336,"server_id":5,"link":"photo_2390325.html","width":130,"caption":"F is for Friends","height":134});
															thumbnails[2390396] = clik.newPhoto({"id":2390396,"src":"G_thumb.jpg","galleries_id":152336,"server_id":5,"link":"photo_2390396.html","width":130,"caption":"G is for Gunton","height":122});
															thumbnails[2390427] = clik.newPhoto({"id":2390427,"src":"H_thumb.jpg","galleries_id":152336,"server_id":5,"link":"photo_2390427.html","width":130,"caption":"H is for Home","height":129});
															thumbnails[2390435] = clik.newPhoto({"id":2390435,"src":"I_thumb.jpg","galleries_id":152336,"server_id":5,"link":"photo_2390435.html","width":130,"caption":"I is for Ice Cream","height":131});
															thumbnails[2390463] = clik.newPhoto({"id":2390463,"src":"J_thumb.jpg","galleries_id":152336,"server_id":5,"link":"photo_2390463.html","width":130,"caption":"J is for Jack Braka","height":135});
															thumbnails[2390471] = clik.newPhoto({"id":2390471,"src":"K_thumb.jpg","galleries_id":152336,"server_id":5,"link":"photo_2390471.html","width":130,"caption":"K is for Kitten","height":127});
															thumbnails[2390479] = clik.newPhoto({"id":2390479,"src":"L_thumb.jpg","galleries_id":152336,"server_id":5,"link":"photo_2390479.html","width":130,"caption":"L is for London","height":129});
															thumbnails[2390892] = clik.newPhoto({"id":2390892,"src":"M_thumb.jpg","galleries_id":152336,"server_id":5,"link":"photo_2390892.html","width":130,"caption":"M is for Mungo","height":128});
															thumbnails[2397919] = clik.newPhoto({"id":2397919,"src":"N_thumb.jpg","galleries_id":152336,"server_id":5,"link":"photo_2397919.html","width":130,"caption":"N is for Nutella","height":129});
															thumbnails[2397931] = clik.newPhoto({"id":2397931,"src":"O_thumb.jpg","galleries_id":152336,"server_id":5,"link":"photo_2397931.html","width":130,"caption":"O is for Oriental ","height":128});
															thumbnails[2397995] = clik.newPhoto({"id":2397995,"src":"P_thumb.jpg","galleries_id":152336,"server_id":5,"link":"photo_2397995.html","width":130,"caption":"P is for Polo","height":129});
															thumbnails[2397996] = clik.newPhoto({"id":2397996,"src":"Q_thumb.jpg","galleries_id":152336,"server_id":5,"link":"photo_2397996.html","width":130,"caption":"Q is for dramaQueen","height":128});
															thumbnails[2398017] = clik.newPhoto({"id":2398017,"src":"R_thumb.jpg","galleries_id":152336,"server_id":5,"link":"photo_2398017.html","width":130,"caption":"R is for Running","height":131});
															thumbnails[2398023] = clik.newPhoto({"id":2398023,"src":"S_thumb.jpg","galleries_id":152336,"server_id":5,"link":"photo_2398023.html","width":130,"caption":"S is for Sisters, Sarah and Sophie","height":131});
															thumbnails[2398077] = clik.newPhoto({"id":2398077,"src":"T_thumb.jpg","galleries_id":152336,"server_id":5,"link":"photo_2398077.html","width":130,"caption":"T is for Teazel","height":129});
															thumbnails[2398109] = clik.newPhoto({"id":2398109,"src":"U_thumb.jpg","galleries_id":152336,"server_id":5,"link":"photo_2398109.html","width":130,"caption":"U is for Underground","height":129});
															thumbnails[2398608] = clik.newPhoto({"id":2398608,"src":"V_thumb.jpg","galleries_id":152336,"server_id":5,"link":"photo_2398608.html","width":130,"caption":"V is for Venice","height":129});
															thumbnails[2398620] = clik.newPhoto({"id":2398620,"src":"W_thumb.jpg","galleries_id":152336,"server_id":5,"link":"photo_2398620.html","width":130,"caption":"W is for Wimbledon, School of Art","height":125});
															thumbnails[2398630] = clik.newPhoto({"id":2398630,"src":"X_thumb.jpg","galleries_id":152336,"server_id":5,"link":"photo_2398630.html","width":130,"caption":"X is for XC (cross country)","height":133});
															thumbnails[2398637] = clik.newPhoto({"id":2398637,"src":"Y_thumb.jpg","galleries_id":152336,"server_id":5,"link":"photo_2398637.html","width":130,"caption":"Y is for Youth","height":125});
															thumbnails[2398669] = clik.newPhoto({"id":2398669,"src":"Z_thumb.jpg","galleries_id":152336,"server_id":5,"link":"photo_2398669.html","width":130,"caption":"Z is for Zuleika","height":133});
															thumbnails[2398675] = clik.newPhoto({"id":2398675,"src":"London_thumb.jpg","galleries_id":154509,"server_id":5,"link":"photo_2398675.html","width":130,"caption":"London Skyline","height":45});
															thumbnails[2398691] = clik.newPhoto({"id":2398691,"src":"Boy_thumb.jpg","galleries_id":154509,"server_id":5,"link":"photo_2398691.html","width":130,"caption":"Boy Standing","height":127});
															thumbnails[2398698] = clik.newPhoto({"id":2398698,"src":"Hall_thumb.jpg","galleries_id":154509,"server_id":5,"link":"photo_2398698.html","width":130,"caption":"Gunton Hall, West Wing","height":87});
															thumbnails[2398705] = clik.newPhoto({"id":2398705,"src":"ladd and Lake_thumb.jpg","galleries_id":154509,"server_id":5,"link":"photo_2398705.html","width":130,"caption":"Alan Ladd and Veronica Lake","height":168});
															thumbnails[2398757] = clik.newPhoto({"id":2398757,"src":"ladd and Lake 2_thumb.jpg","galleries_id":154509,"server_id":5,"link":"photo_2398757.html","width":130,"caption":"The Blue Dahlia","height":112});
															thumbnails[2398814] = clik.newPhoto({"id":2398814,"src":"Little Zebra blue_thumb.jpg","galleries_id":154509,"server_id":5,"link":"photo_2398814.html","width":130,"caption":"Little Zebra blue","height":101});
															thumbnails[2398818] = clik.newPhoto({"id":2398818,"src":"Little Zebra_thumb.jpg","galleries_id":154509,"server_id":5,"link":"photo_2398818.html","width":130,"caption":"Little Zebra","height":102});
															thumbnails[2398822] = clik.newPhoto({"id":2398822,"src":"The glass key_thumb.jpg","galleries_id":154509,"server_id":5,"link":"photo_2398822.html","width":130,"caption":"The Glass Key","height":85});
															thumbnails[2398827] = clik.newPhoto({"id":2398827,"src":"Zebra Close up_thumb.jpg","galleries_id":154509,"server_id":5,"link":"photo_2398827.html","width":130,"caption":"Zebra Close Up","height":187});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[154509] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"2008 - Exploration","link":"gallery_154509.html","maxRecords":0.0,"photoIDs":[2398675.0,2398691.0,2398698.0,2398705.0,2398757.0,2398814.0,2398818.0,2398822.0,2398827.0],"skipIndex":0,"section_code":"gallery","featured_images":"2398827,2398757","id":154509,"singleSection":false});				  						galleries[260042] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"2009\/10 - Norfolk and beyond","link":"gallery_260042.html","maxRecords":0.0,"photoIDs":[4448470.0,4448533.0,4448572.0,4448586.0,4448598.0,6179008.0],"skipIndex":0,"section_code":"gallery","featured_images":6179008.0,"id":260042,"singleSection":false});				  						galleries[306684] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"2010 - Morocco","link":"gallery_306684.html","maxRecords":0.0,"photoIDs":[6179057.0,6179060.0,6179061.0],"skipIndex":0,"section_code":"gallery","featured_images":6179060.0,"id":306684,"singleSection":false});				  						galleries[473887] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"2011\/12 mix","link":"gallery_473887.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"gallery","featured_images":"","id":473887,"singleSection":false});				  						galleries[475863] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Eleanor Stimpson","link":"section576295_475863.html","maxRecords":0.0,"photoIDs":[9034825.0],"skipIndex":0,"section_code":"section576295","featured_images":9034825.0,"id":475863,"singleSection":false});				  						galleries[473883] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Roland Collins","link":"section576295_473883.html","maxRecords":0.0,"photoIDs":[8997719.0],"skipIndex":0,"section_code":"section576295","featured_images":8997719.0,"id":473883,"singleSection":false});				  						galleries[152336] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"A to Zuleika","link":"gallery_152336.html","maxRecords":0.0,"photoIDs":[2378015.0,2378020.0,2378070.0,2378311.0,2390175.0,2390325.0,2390396.0,2390427.0,2390435.0,2390463.0,2390471.0,2390479.0,2390892.0,2397919.0,2397931.0,2397995.0,2397996.0,2398017.0,2398023.0,2398077.0,2398109.0,2398608.0,2398620.0,2398630.0,2398637.0,2398669.0],"skipIndex":0,"section_code":"gallery","featured_images":2398669.0,"id":152336,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '8986025';
imageSets[2] = '6179060,6179008,2398669,2398757,2398827';
imageSets[3] = '8986025';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/zuleika/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/zuleika/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/zuleika/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/zuleika/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/zuleika/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/zuleika/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/zuleika/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/zuleika/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/zuleika/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/zuleika/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/zuleika/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/zuleika/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/zuleika/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/zuleika/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/zuleika/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/zuleika/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/zuleika/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/zuleika/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/zuleika/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/zuleika/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/zuleika/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/zuleika/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/zuleika/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/zuleika/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/zuleika/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/zuleika/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/zuleika/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 += 'gallery.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 && 'gallery' != '') {
					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 = 'ZULEIKA PARKIN: ' + 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>';
	}
				
	temp += this.fnGetPaymentInfo();
				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>Buy now using PayPal:</p>';
				temp += '<div class="imageinfo" id="imagePrice"><strong>' + this.purchase_instruction + '</strong> &pound;' + (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 += '<form id="paymentForm" style="margin:0px;border:0px;" name="paymentForm">';
			temp += '	<input type="hidden" name="item_option" value="' + item_option + '">';
			temp += '	<input type="hidden" name="site" value="ZULEIKA">';
			temp += '	<input type="hidden" name="item_number" value="'+ this.id +'">';
			temp += '	<input type="hidden" name="quantity" value="1">';
						temp += '	<input value="Add to cart" id="paymentAddButton" class="button" onmouseover="this.className=\'buttonHi\'\;" onmouseout="this.className=\'button\'\;" type="Button">';
							temp += '	<input value="View cart" id="paymentViewButton" class="button" onmouseover="this.className=\'buttonHi\';" onmouseout="this.className=\'button\';" type="Button" onclick="javascript:window.location=\'cart.html\'">';
			temp += '</form>';
						temp += '<div class="clearing">&nbsp;</div>';
			temp += '<div id="confirmContainer">';
			temp += '<div id="paymentConfirm">Item added to cart</div>';
			temp += '</div>';
			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;
	}
}

			

