window.thumbnails = {};
															thumbnails[6581949] = clik.newPhoto({"id":6581949,"src":"rubicund_thumb.gif","galleries_id":337959,"server_id":5,"link":"photo_6581949.html","width":130,"caption":"Rubicund Moon","height":84});
															thumbnails[6581982] = clik.newPhoto({"id":6581982,"src":"oriental-island26by29222_thumb.gif","galleries_id":337959,"server_id":5,"link":"photo_6581982.html","width":130,"caption":"Orchid Island","height":146});
															thumbnails[4944123] = clik.newPhoto({"id":4944123,"src":"butterfly_head_thumb.jpg","galleries_id":281230,"server_id":5,"link":"photo_4944123.html","width":130,"caption":"Blue Oyster Cult","height":108});
															thumbnails[4944132] = clik.newPhoto({"id":4944132,"src":"rhapsody_in_blue_thumb.jpg","galleries_id":281230,"server_id":5,"link":"photo_4944132.html","width":130,"caption":"Delight","height":108});
															thumbnails[4944175] = clik.newPhoto({"id":4944175,"src":"117_13039531001_thumb.jpg","galleries_id":281230,"server_id":5,"link":"photo_4944175.html","width":130,"caption":"Farfalle Man","height":240});
															thumbnails[4944185] = clik.newPhoto({"id":4944185,"src":"117_92877478532_thumb.jpg","galleries_id":281230,"server_id":5,"link":"photo_4944185.html","width":130,"caption":"Peacock king","height":229});
															thumbnails[4944190] = clik.newPhoto({"id":4944190,"src":"chalice_thumb.jpg","galleries_id":281230,"server_id":5,"link":"photo_4944190.html","width":130,"caption":"Chalice","height":188});
															thumbnails[4944257] = clik.newPhoto({"id":4944257,"src":"deepbluecirc_bottom_crop_a_thumb.jpg","galleries_id":281230,"server_id":5,"link":"photo_4944257.html","width":130,"caption":"Space Invader","height":108});
															thumbnails[4944264] = clik.newPhoto({"id":4944264,"src":"erewjpgqqq_thumb.jpg","galleries_id":281230,"server_id":5,"link":"photo_4944264.html","width":130,"caption":"","height":211});
															thumbnails[4944376] = clik.newPhoto({"id":4944376,"src":"firworks_3_bits2_thumb.jpg","galleries_id":281230,"server_id":5,"link":"photo_4944376.html","width":130,"caption":"","height":93});
															thumbnails[4944421] = clik.newPhoto({"id":4944421,"src":"elfin_thumb.jpg","galleries_id":281230,"server_id":5,"link":"photo_4944421.html","width":130,"caption":"Ellfin","height":195});
															thumbnails[4944535] = clik.newPhoto({"id":4944535,"src":"totem_temple_thumb.jpg","galleries_id":281230,"server_id":5,"link":"photo_4944535.html","width":130,"caption":"Inner Sanctum","height":208});
															thumbnails[4952433] = clik.newPhoto({"id":4952433,"src":"2009_091809maymid0498_thumb.JPG","galleries_id":281231,"server_id":5,"link":"photo_4952433.html","width":130,"caption":"Cheeky lady (Does mybum look big in this?)","height":183});
															thumbnails[4952442] = clik.newPhoto({"id":4952442,"src":"2009_091809maymid0240a_thumb.jpg","galleries_id":281231,"server_id":5,"link":"photo_4952442.html","width":130,"caption":"Woo Hoo","height":199});
															thumbnails[4952456] = clik.newPhoto({"id":4952456,"src":"pigs_fairies_and_fish_039_reduction_manipulation_thumb.jpg","galleries_id":281231,"server_id":5,"link":"photo_4952456.html","width":130,"caption":"Breeze","height":121});
															thumbnails[4952457] = clik.newPhoto({"id":4952457,"src":"pigs_fairies_and_fish_top_left_crop_effect_thumb.jpg","galleries_id":281231,"server_id":5,"link":"photo_4952457.html","width":130,"caption":"","height":82});
															thumbnails[4952460] = clik.newPhoto({"id":4952460,"src":"2009_091809maymid0356_thumb.JPG","galleries_id":281231,"server_id":5,"link":"photo_4952460.html","width":130,"caption":"","height":173});
															thumbnails[4952462] = clik.newPhoto({"id":4952462,"src":"2009_091809maymid0351e_thumb.jpg","galleries_id":281231,"server_id":5,"link":"photo_4952462.html","width":130,"caption":"","height":173});
															thumbnails[4952466] = clik.newPhoto({"id":4952466,"src":"shadow2_thumb.jpg","galleries_id":281703,"server_id":5,"link":"photo_4952466.html","width":130,"caption":"","height":173});
															thumbnails[4952469] = clik.newPhoto({"id":4952469,"src":"rose1dd_2_thumb.jpg","galleries_id":281703,"server_id":5,"link":"photo_4952469.html","width":130,"caption":"","height":122});
															thumbnails[4952473] = clik.newPhoto({"id":4952473,"src":"mask1_reduction2_thumb.jpg","galleries_id":281703,"server_id":5,"link":"photo_4952473.html","width":130,"caption":"","height":99});
															thumbnails[4952476] = clik.newPhoto({"id":4952476,"src":"hidden_from_plain_sighta_thumb.jpg","galleries_id":281703,"server_id":5,"link":"photo_4952476.html","width":130,"caption":"","height":93});
															thumbnails[4952479] = clik.newPhoto({"id":4952479,"src":"374_mask_solo_reduction_thumb.jpg","galleries_id":281703,"server_id":5,"link":"photo_4952479.html","width":130,"caption":"","height":141});
															thumbnails[4952480] = clik.newPhoto({"id":4952480,"src":"374_solo_2_bwmet_thumb.jpg","galleries_id":281703,"server_id":5,"link":"photo_4952480.html","width":130,"caption":"","height":138});
															thumbnails[4952482] = clik.newPhoto({"id":4952482,"src":"blue_rose_thumb.jpg","galleries_id":337959,"server_id":5,"link":"photo_4952482.html","width":130,"caption":"","height":98});
															thumbnails[4952487] = clik.newPhoto({"id":4952487,"src":"2009_0808endfeb090043_thumb.JPG","galleries_id":281231,"server_id":5,"link":"photo_4952487.html","width":130,"caption":"","height":173});
															thumbnails[4952491] = clik.newPhoto({"id":4952491,"src":"2009_0808endfeb090050_thumb.JPG","galleries_id":281231,"server_id":5,"link":"photo_4952491.html","width":130,"caption":"","height":98});
															thumbnails[4952494] = clik.newPhoto({"id":4952494,"src":"night_bird1_thumb.jpg","galleries_id":281231,"server_id":5,"link":"photo_4952494.html","width":130,"caption":"","height":173});
															thumbnails[4952499] = clik.newPhoto({"id":4952499,"src":"mask1_reduced_thumb.jpg","galleries_id":281703,"server_id":5,"link":"photo_4952499.html","width":130,"caption":"","height":85});
															thumbnails[4952505] = clik.newPhoto({"id":4952505,"src":"butterflies_magic2_thumb.jpg","galleries_id":281231,"server_id":5,"link":"photo_4952505.html","width":130,"caption":"","height":98});
															thumbnails[4953063] = clik.newPhoto({"id":4953063,"src":"viral1_thumb.jpg","galleries_id":281230,"server_id":5,"link":"photo_4953063.html","width":130,"caption":"Viral 1.","height":157});
															thumbnails[4953067] = clik.newPhoto({"id":4953067,"src":"viral2_thumb.jpg","galleries_id":281230,"server_id":5,"link":"photo_4953067.html","width":130,"caption":"Viral 2","height":157});
															thumbnails[4953071] = clik.newPhoto({"id":4953071,"src":"qbutterchalice_2jpg_thumb.jpg","galleries_id":281230,"server_id":5,"link":"photo_4953071.html","width":130,"caption":"Lord palenchuk  (Totem Rae)","height":211});
															thumbnails[4953075] = clik.newPhoto({"id":4953075,"src":"qbutterlotus_thumb.jpg","galleries_id":281230,"server_id":5,"link":"photo_4953075.html","width":130,"caption":"","height":269});
															thumbnails[4966308] = clik.newPhoto({"id":4966308,"src":"cruxgoldforweb_thumb.jpg","galleries_id":281230,"server_id":5,"link":"photo_4966308.html","width":130,"caption":"","height":171});
															thumbnails[4966630] = clik.newPhoto({"id":4966630,"src":"flowergarden1web_thumb.jpg","galleries_id":281230,"server_id":5,"link":"photo_4966630.html","width":130,"caption":"","height":139});
															thumbnails[4966663] = clik.newPhoto({"id":4966663,"src":"firework811web_thumb.jpg","galleries_id":281230,"server_id":5,"link":"photo_4966663.html","width":130,"caption":"","height":173});
															thumbnails[4966754] = clik.newPhoto({"id":4966754,"src":"dogandtongueweb_thumb.jpg","galleries_id":281230,"server_id":5,"link":"photo_4966754.html","width":130,"caption":"Good Boy","height":150});
															thumbnails[4966758] = clik.newPhoto({"id":4966758,"src":"mouseyjpgweb_thumb.jpg","galleries_id":281230,"server_id":5,"link":"photo_4966758.html","width":130,"caption":"Squeek","height":101});
															thumbnails[4966763] = clik.newPhoto({"id":4966763,"src":"dogandrabbiwebt_thumb.jpg","galleries_id":281230,"server_id":5,"link":"photo_4966763.html","width":130,"caption":"The fox, the dog and the rabbit.","height":136});
															thumbnails[4966765] = clik.newPhoto({"id":4966765,"src":"stuffedpigweb_thumb.jpg","galleries_id":281230,"server_id":5,"link":"photo_4966765.html","width":130,"caption":"Pigs might fly","height":152});
															thumbnails[4966804] = clik.newPhoto({"id":4966804,"src":"fireworkindiafloweryellowweb3_thumb.jpg","galleries_id":281230,"server_id":5,"link":"photo_4966804.html","width":130,"caption":"India","height":175});
															thumbnails[4966859] = clik.newPhoto({"id":4966859,"src":"spaceweb_thumb.jpg","galleries_id":281230,"server_id":5,"link":"photo_4966859.html","width":130,"caption":"","height":192});
															thumbnails[4966866] = clik.newPhoto({"id":4966866,"src":"pussyweb2_thumb.jpg","galleries_id":281230,"server_id":5,"link":"photo_4966866.html","width":130,"caption":"","height":126});
															thumbnails[4966886] = clik.newPhoto({"id":4966886,"src":"flowergarden1aaweb_thumb.jpg","galleries_id":281230,"server_id":5,"link":"photo_4966886.html","width":130,"caption":"","height":139});
															thumbnails[4966889] = clik.newPhoto({"id":4966889,"src":"deepbluecircforweb1_thumb.jpg","galleries_id":281230,"server_id":5,"link":"photo_4966889.html","width":130,"caption":"","height":176});
															thumbnails[5995514] = clik.newPhoto({"id":5995514,"src":"2006_0106lakeandstudiomarch100003bottom_2FPA5_thumb.jpg","galleries_id":337959,"server_id":5,"link":"photo_5995514.html","width":130,"caption":"Close to the Ground","height":41});
															thumbnails[5998676] = clik.newPhoto({"id":5998676,"src":"mauve_haze_thumb.jpg","galleries_id":337959,"server_id":5,"link":"photo_5998676.html","width":130,"caption":"","height":130});
															thumbnails[6000135] = clik.newPhoto({"id":6000135,"src":"odilon_thumb.jpg","galleries_id":281231,"server_id":5,"link":"photo_6000135.html","width":130,"caption":"","height":98});
															thumbnails[6581991] = clik.newPhoto({"id":6581991,"src":"blue-night60by20_thumb.gif","galleries_id":337959,"server_id":5,"link":"photo_6581991.html","width":130,"caption":"Midnight","height":42});
															thumbnails[6582017] = clik.newPhoto({"id":6582017,"src":"2006_0106lakeandstudiomarch_thumb.gif","galleries_id":337959,"server_id":5,"link":"photo_6582017.html","width":130,"caption":"March On Heron Pond","height":63});
															thumbnails[6582031] = clik.newPhoto({"id":6582031,"src":"2006_0106lakeandstudiomarch1_thumb.gif","galleries_id":337959,"server_id":5,"link":"photo_6582031.html","width":130,"caption":"","height":51});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[281230] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Digital Prints","link":"gallery_281230.html","maxRecords":0.0,"photoIDs":[4944123.0,4944132.0,4944175.0,4944185.0,4944190.0,4944257.0,4944264.0,4944376.0,4944421.0,4944535.0,4953063.0,4953067.0,4953071.0,4953075.0,4966308.0,4966630.0,4966663.0,4966754.0,4966758.0,4966763.0,4966765.0,4966804.0,4966859.0,4966866.0,4966886.0,4966889.0],"skipIndex":0,"section_code":"gallery","featured_images":"4966889,4966886,4966866,4966859,4966804,4966765,4966763,4966758,4966754,4966663","id":281230,"singleSection":false});				  						galleries[281231] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Original art work","link":"gallery_281231.html","maxRecords":0.0,"photoIDs":[4952433.0,4952442.0,4952456.0,4952457.0,4952460.0,4952462.0,4952487.0,4952491.0,4952494.0,4952505.0,6000135.0],"skipIndex":0,"section_code":"gallery","featured_images":"6000135,4952505,4952494,4952491,4952487,4952462,4952460,4952457,4952456,4952442","id":281231,"singleSection":false});				  						galleries[281703] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Black and white","link":"gallery_281703.html","maxRecords":0.0,"photoIDs":[4952466.0,4952469.0,4952473.0,4952476.0,4952479.0,4952480.0,4952499.0],"skipIndex":0,"section_code":"gallery","featured_images":"4952499,4952480,4952479,4952476,4952473,4952469,4952466","id":281703,"singleSection":false});				  						galleries[337959] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Landscapes","link":"gallery_337959.html","maxRecords":0.0,"photoIDs":[6581949.0,6581982.0,4952482.0,5995514.0,5998676.0,6581991.0,6582017.0,6582031.0],"skipIndex":0,"section_code":"gallery","featured_images":"6582031,6582017,6581991,6581982,6581949,5998676,5995514,4952482","id":337959,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '4966866,4966859,4966804,4966758,4966663,4953071,4953063,4952505,4952499,4952491,4952473,4952462,4952456,4944421,4944376,4944190,4944123';
imageSets[3] = '4952499,4952482,4952480,4952479,4952476,4952473,4952469';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'www12.clikpic.com/mckbort/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/mckbort/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/mckbort/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/mckbort/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/mckbort/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/mckbort/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/mckbort/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/mckbort/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/mckbort/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/mckbort/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/mckbort/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/mckbort/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/mckbort/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/mckbort/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/mckbort/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/mckbort/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/mckbort/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/mckbort/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/mckbort/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/mckbort/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/mckbort/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/mckbort/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/mckbort/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/mckbort/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/mckbort/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 && backgrounds[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 = 'Jacqueline Mckenzie: ' + 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.payment_groups_id !== '') {
		temp += '<p>Buy this print online:</p>';
				temp += '<form id="paymentOptions" style="margin:0px;border:0px;" name="paymentOptions">';
		 									temp += '<select class="paymentlink" name="payment_options_id" onchange="updateCartValue($(this.form).next(\'#paymentForm\')[0],this.form.payment_options_id.options[this.form.payment_options_id.options.selectedIndex].value); if(divShowing(\'paymentConfirm\')){fadeOut(\'paymentConfirm\', 3)};">';
		
		temp += getPaymentOptions(this.payment_groups_id);
		temp += '</select>';
		temp += '</form>';
				var item_option  = paymentGroups[this.payment_groups_id].options[0];
		if(paymentOptions[item_option]){
			var item_name  = paymentOptions[item_option].payment_option;
			var amount =  paymentOptions[item_option].price;
		}
			}
	else {
		
	}
	if (this.item_price !== '' || this.payment_groups_id !== '') {
											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="MCKBORT">';
			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;
	}
}

			

