window.thumbnails = {};
															thumbnails[5000639] = clik.newPhoto({"id":5000639,"src":"morningweb2_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"Morning","height":127});
															thumbnails[5101197] = clik.newPhoto({"id":5101197,"src":"akimono_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"Kimono","height":182});
															thumbnails[5101214] = clik.newPhoto({"id":5101214,"src":"dress_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"One of my dresses.","height":98});
															thumbnails[5101221] = clik.newPhoto({"id":5101221,"src":"dressorshoes_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"Dress or Shoes.","height":174});
															thumbnails[5101229] = clik.newPhoto({"id":5101229,"src":"happydresses_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"Happy Dresses.","height":68});
															thumbnails[6717385] = clik.newPhoto({"id":6717385,"src":"Mary_Kemp_Afternoon_Walberswick_thumb_6AE275AD-24E8-5EC4-4F717C3A66279E31.jpg","galleries_id":282648,"server_id":18,"link":"photo_6717385.html","width":130,"caption":"Afternoon in Walberswick","height":95});
															thumbnails[6717525] = clik.newPhoto({"id":6717525,"src":"Mary_Kemp-_Mother_and_Child_at_Southwold_thumb.jpg","galleries_id":282648,"server_id":18,"link":"photo_6717525.html","width":130,"caption":"Mother and Child. ","height":127});
															thumbnails[6717560] = clik.newPhoto({"id":6717560,"src":"marykempontheroada47_thumb.jpg","galleries_id":282648,"server_id":18,"link":"photo_6717560.html","width":130,"caption":"On the Road","height":99});
															thumbnails[7052573] = clik.newPhoto({"id":7052573,"src":"xrain_thumb.jpg","galleries_id":282648,"server_id":18,"link":"photo_7052573.html","width":130,"caption":"It Looks Like Rain","height":124});
															thumbnails[7052580] = clik.newPhoto({"id":7052580,"src":"xsouthwoldd_thumb.jpg","galleries_id":282648,"server_id":18,"link":"photo_7052580.html","width":130,"caption":"Black Hut in Walberswick","height":124});
															thumbnails[7603793] = clik.newPhoto({"id":7603793,"src":"boatttt_copy_thumb.jpg","galleries_id":336600,"server_id":18,"link":"photo_7603793.html","width":130,"caption":"Boat Amongst the Samphire","height":131});
															thumbnails[7603827] = clik.newPhoto({"id":7603827,"src":"motherandchild_thumb.jpg","galleries_id":282648,"server_id":18,"link":"photo_7603827.html","width":130,"caption":"Mother and Child at Southwold","height":128});
															thumbnails[7603900] = clik.newPhoto({"id":7603900,"src":"00001_copy_thumb.jpg","galleries_id":282648,"server_id":18,"link":"photo_7603900.html","width":130,"caption":"Towards Blakeney Church, across the Marshes.","height":111});
															thumbnails[7603901] = clik.newPhoto({"id":7603901,"src":"sn850051_copy_thumb.jpg","galleries_id":336600,"server_id":18,"link":"photo_7603901.html","width":130,"caption":"Beach Huts, Old Hunstanton","height":131});
															thumbnails[7773477] = clik.newPhoto({"id":7773477,"src":"manandchild_thumb_6ABBD494-24E8-5EC4-4FDA8BE975928F60.jpg","galleries_id":336600,"server_id":18,"link":"photo_7773477.html","width":130,"caption":"Man, Running with Child, on Southwold Beach.","height":130});
															thumbnails[7773547] = clik.newPhoto({"id":7773547,"src":"manwomanchildl_thumb_6ACFE0F0-24E8-5EC4-4F375C2433828B06.jpg","galleries_id":336600,"server_id":18,"link":"photo_7773547.html","width":130,"caption":"Family on Southwold Beach","height":130});
															thumbnails[7773747] = clik.newPhoto({"id":7773747,"src":"blakeney2._thumb.jpg","galleries_id":336600,"server_id":18,"link":"photo_7773747.html","width":130,"caption":"Blakeney Church","height":128});
															thumbnails[8018116] = clik.newPhoto({"id":8018116,"src":"MarykempBurnhamOveryStaithe_thumb_6AD83794-24E8-5EC4-4FB28B9DAF00E4C9.jpg","galleries_id":336600,"server_id":18,"link":"photo_8018116.html","width":130,"caption":"Black Cloud Over Burnham Overy Staithe","height":130});
															thumbnails[8018139] = clik.newPhoto({"id":8018139,"src":"MaryKemp-WeareaFamily_thumb_6A942C3F-24E8-5EC4-4FB31848E08B52C0.jpg","galleries_id":336600,"server_id":18,"link":"photo_8018139.html","width":130,"caption":"We are a Family - Southwold Beach","height":120});
															thumbnails[8018311] = clik.newPhoto({"id":8018311,"src":"dscn0095_copy_thumb.jpg","galleries_id":282648,"server_id":18,"link":"photo_8018311.html","width":130,"caption":"Eventide, Brancaster Staithe","height":98});
															thumbnails[8018549] = clik.newPhoto({"id":8018549,"src":"dscn0068_copy_thumb.jpg","galleries_id":336600,"server_id":18,"link":"photo_8018549.html","width":130,"caption":"Sunset on a Windy Day -Burnham Overy Mill","height":96});
															thumbnails[8432478] = clik.newPhoto({"id":8432478,"src":"dscn1069web_thumb.jpg","galleries_id":336600,"server_id":18,"link":"photo_8432478.html","width":130,"caption":"Oh, the Joy of the Seaside.","height":98});
															thumbnails[8432495] = clik.newPhoto({"id":8432495,"src":"dscn1079web_thumb.jpg","galleries_id":336600,"server_id":18,"link":"photo_8432495.html","width":130,"caption":"Windy Walk - Hunstanton","height":130});
															thumbnails[8560409] = clik.newPhoto({"id":8560409,"src":"dscn1105.small_thumb.jpg","galleries_id":336600,"server_id":18,"link":"photo_8560409.html","width":130,"caption":"Eventide, Hunstanton Cliffs","height":94});
															thumbnails[8560415] = clik.newPhoto({"id":8560415,"src":"dscn1109.small_thumb.jpg","galleries_id":336600,"server_id":18,"link":"photo_8560415.html","width":130,"caption":"Oh, the Joy of the Seaside","height":102});
															thumbnails[8945428] = clik.newPhoto({"id":8945428,"src":"Blown_Away.small_thumb.jpg","galleries_id":336600,"server_id":18,"link":"photo_8945428.html","width":130,"caption":"Blown Away","height":130});
															thumbnails[8945433] = clik.newPhoto({"id":8945433,"src":"Mary_Kemp_-_In_the_Heat_of_the_Day.small_thumb.jpg","galleries_id":336600,"server_id":18,"link":"photo_8945433.html","width":130,"caption":"Mary Kemp In the Heat of the Day","height":130});
															thumbnails[8958594] = clik.newPhoto({"id":8958594,"src":"Before_thee_Picnic_small._thumb.jpg","galleries_id":336600,"server_id":18,"link":"photo_8958594.html","width":130,"caption":"Mary Kemp Before the Picnic","height":130});
															thumbnails[8958621] = clik.newPhoto({"id":8958621,"src":"pic_nic_.small_thumb.jpg","galleries_id":336600,"server_id":18,"link":"photo_8958621.html","width":130,"caption":"Beach Scene","height":130});
															thumbnails[8958632] = clik.newPhoto({"id":8958632,"src":"Place_for_the_picnic.small_thumb.jpg","galleries_id":336600,"server_id":18,"link":"photo_8958632.html","width":130,"caption":"Before the Picnic II","height":130});
															thumbnails[8961301] = clik.newPhoto({"id":8961301,"src":"framed_2_thumb.jpg","galleries_id":282648,"server_id":18,"link":"photo_8961301.html","width":130,"caption":"Modern framing of Blakeney Project","height":130});
															thumbnails[5000101] = clik.newPhoto({"id":5000101,"src":"wreck2_thumb.jpg","galleries_id":282648,"server_id":18,"link":"photo_5000101.html","width":130,"caption":"Wreck on Blakeney Marshes","height":122});
															thumbnails[4973951] = clik.newPhoto({"id":4973951,"src":"coastalstudy_thumb.jpg","galleries_id":282648,"server_id":18,"link":"photo_4973951.html","width":130,"caption":"Project on Blakeney Marshes","height":98});
															thumbnails[4974914] = clik.newPhoto({"id":4974914,"src":"cabbageandtulipsweb_thumb.jpg","galleries_id":282647,"server_id":18,"link":"photo_4974914.html","width":130,"caption":"cabbage and tulips","height":95});
															thumbnails[5965918] = clik.newPhoto({"id":5965918,"src":"Mary_Kemp-Hampshire_Sky_w__thumb.jpg","galleries_id":282648,"server_id":18,"link":"photo_5965918.html","width":130,"caption":"Hampshire Sky","height":98});
															thumbnails[4974781] = clik.newPhoto({"id":4974781,"src":"frenchjug_thumb.jpg","galleries_id":282647,"server_id":18,"link":"photo_4974781.html","width":130,"caption":"French Jug","height":105});
															thumbnails[4973989] = clik.newPhoto({"id":4973989,"src":"whitbycrest_thumb.jpg","galleries_id":282648,"server_id":18,"link":"photo_4973989.html","width":130,"caption":"The Whitby  Crest at Brancaster","height":122});
															thumbnails[5965846] = clik.newPhoto({"id":5965846,"src":"Mary_Kemp-_Changeable_Day_Norfolk_w__thumb.jpg","galleries_id":282648,"server_id":18,"link":"photo_5965846.html","width":130,"caption":"Changeable Day","height":98});
															thumbnails[5101208] = clik.newPhoto({"id":5101208,"src":"beachwalking_thumb.jpg","galleries_id":282648,"server_id":18,"link":"photo_5101208.html","width":130,"caption":"Walking on the Beach, Hunstanton","height":100});
															thumbnails[5101407] = clik.newPhoto({"id":5101407,"src":"RhubarbandShed_thumb.jpg","galleries_id":282647,"server_id":18,"link":"photo_5101407.html","width":130,"caption":"Rhubarb and Shed","height":98});
															thumbnails[5965891] = clik.newPhoto({"id":5965891,"src":"Mary_Kemp-_thumb.jpg","galleries_id":282648,"server_id":18,"link":"photo_5965891.html","width":130,"caption":"Sunset over Norfolk","height":98});
															thumbnails[4974279] = clik.newPhoto({"id":4974279,"src":"yatchs_thumb.jpg","galleries_id":282648,"server_id":18,"link":"photo_4974279.html","width":130,"caption":"Yachts at Brancaster","height":126});
															thumbnails[5101190] = clik.newPhoto({"id":5101190,"src":"beachone_thumb.jpg","galleries_id":282648,"server_id":18,"link":"photo_5101190.html","width":130,"caption":"TThe Beach Hunstanton","height":106});
															thumbnails[5965948] = clik.newPhoto({"id":5965948,"src":"Mary_Kemp_Blakeney_Churchw_thumb.JPG","galleries_id":282648,"server_id":18,"link":"photo_5965948.html","width":130,"caption":"Blakeney Church","height":98});
															thumbnails[5101442] = clik.newPhoto({"id":5101442,"src":"seatsun_thumb.jpg","galleries_id":282647,"server_id":18,"link":"photo_5101442.html","width":130,"caption":"Seat in the Sun","height":97});
															thumbnails[5101423] = clik.newPhoto({"id":5101423,"src":"rhubarbtree_thumb.jpg","galleries_id":282647,"server_id":18,"link":"photo_5101423.html","width":130,"caption":"Rhubarb and Tree","height":98});
															thumbnails[5101406] = clik.newPhoto({"id":5101406,"src":"greenhouse_thumb.jpg","galleries_id":282647,"server_id":18,"link":"photo_5101406.html","width":130,"caption":"The Greenhouse","height":98});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[336600] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"LATEST WORK","link":"gallery_336600.html","maxRecords":0.0,"photoIDs":[7603793.0,7603901.0,7773477.0,7773547.0,7773747.0,8018116.0,8018139.0,8018549.0,8432478.0,8432495.0,8560409.0,8560415.0,8945428.0,8945433.0,8958594.0,8958621.0,8958632.0],"skipIndex":0,"section_code":"gallery","featured_images":"8958594,8018139","id":336600,"singleSection":false});				  						galleries[282648] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Coastal Studies , North Norfolk.","link":"gallery_282648.html","maxRecords":0.0,"photoIDs":[6717385.0,6717525.0,6717560.0,7052573.0,7052580.0,7603827.0,7603900.0,8018311.0,8961301.0,5000101.0,4973951.0,5965918.0,4973989.0,5965846.0,5101208.0,5965891.0,4974279.0,5101190.0,5965948.0],"skipIndex":0,"section_code":"gallery","featured_images":8018311.0,"id":282648,"singleSection":false});				  						galleries[282647] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Garden and Allotment","link":"gallery_282647.html","maxRecords":0.0,"photoIDs":[4974914.0,4974781.0,5101407.0,5101442.0,5101423.0,5101406.0],"skipIndex":0,"section_code":"gallery","featured_images":"5101442,5101423,5101407,5101406,4974914,4974781","id":282647,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '8958632,8958621,8958594,8945433,8945428,8560415,8432478,8018139,8018116,7773547,7773477,7052573,6717525,6717385,5000101,4973989,4974279';
imageSets[2] = '8958594,8018311,8018139';
imageSets[3] = '8018549';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/marykemp/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/marykemp/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/marykemp/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/marykemp/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/marykemp/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/marykemp/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/marykemp/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/marykemp/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/marykemp/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/marykemp/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/marykemp/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/marykemp/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/marykemp/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/marykemp/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/marykemp/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/marykemp/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/marykemp/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/marykemp/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/marykemp/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/marykemp/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/marykemp/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/marykemp/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/marykemp/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/marykemp/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/marykemp/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/marykemp/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/marykemp/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 = 'Mary Kemp Artist: ' + 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;
	}
}

			

