window.thumbnails = {};
															thumbnails[7101552] = clik.newPhoto({"id":7101552,"src":"Time_Lapse_thumb.jpg","galleries_id":53378,"server_id":1,"link":"photo_7101552.html","width":130,"caption":"","height":130});
															thumbnails[7106485] = clik.newPhoto({"id":7106485,"src":"Blue_Valley_thumb.jpg","galleries_id":53378,"server_id":1,"link":"photo_7106485.html","width":130,"caption":"","height":130});
															thumbnails[7106505] = clik.newPhoto({"id":7106505,"src":"Winter_Rust_thumb.jpg","galleries_id":53378,"server_id":1,"link":"photo_7106505.html","width":130,"caption":"","height":130});
															thumbnails[3128278] = clik.newPhoto({"id":3128278,"src":"Evening-Harbour_thumb.jpg","galleries_id":53378,"server_id":1,"link":"photo_3128278.html","width":130,"caption":"","height":130});
															thumbnails[4162575] = clik.newPhoto({"id":4162575,"src":"Hidden-Light-448_thumb.jpg","galleries_id":53378,"server_id":1,"link":"photo_4162575.html","width":130,"caption":"","height":130});
															thumbnails[5112492] = clik.newPhoto({"id":5112492,"src":"Orange-Cliff_thumb.jpg","galleries_id":53378,"server_id":1,"link":"photo_5112492.html","width":130,"caption":"","height":130});
															thumbnails[5835434] = clik.newPhoto({"id":5835434,"src":"Fragmented_plate-2_blue_448_thumb.jpg","galleries_id":330078,"server_id":1,"link":"photo_5835434.html","width":130,"caption":"","height":130});
															thumbnails[5835438] = clik.newPhoto({"id":5835438,"src":"Burnished_sun_448_thumb.jpg","galleries_id":53166,"server_id":1,"link":"photo_5835438.html","width":130,"caption":"","height":130});
															thumbnails[8789768] = clik.newPhoto({"id":8789768,"src":"IMG_5436_448_thumb.jpg","galleries_id":384282,"server_id":1,"link":"photo_8789768.html","width":130,"caption":"","height":130});
															thumbnails[2059376] = clik.newPhoto({"id":2059376,"src":"Ocean_fresco_thumb.jpg","galleries_id":53166,"server_id":1,"link":"photo_2059376.html","width":130,"caption":"","height":130});
															thumbnails[3128280] = clik.newPhoto({"id":3128280,"src":"Summer_thumb.jpg","galleries_id":53378,"server_id":1,"link":"photo_3128280.html","width":130,"caption":"","height":130});
															thumbnails[3128288] = clik.newPhoto({"id":3128288,"src":"Sea_study_1_thumb.jpg","galleries_id":53378,"server_id":1,"link":"photo_3128288.html","width":130,"caption":"","height":130});
															thumbnails[5112456] = clik.newPhoto({"id":5112456,"src":"Orange-Remaining-448_thumb.jpg","galleries_id":53378,"server_id":1,"link":"photo_5112456.html","width":130,"caption":"","height":130});
															thumbnails[5833882] = clik.newPhoto({"id":5833882,"src":"Fragmented_plate-3_red_448_thumb.jpg","galleries_id":330078,"server_id":1,"link":"photo_5833882.html","width":130,"caption":"","height":130});
															thumbnails[8789771] = clik.newPhoto({"id":8789771,"src":"IMG_5442_448_thumb.jpg","galleries_id":384282,"server_id":1,"link":"photo_8789771.html","width":130,"caption":"","height":130});
															thumbnails[3128279] = clik.newPhoto({"id":3128279,"src":"Sea_study_2_thumb.jpg","galleries_id":53378,"server_id":1,"link":"photo_3128279.html","width":130,"caption":"","height":130});
															thumbnails[3128286] = clik.newPhoto({"id":3128286,"src":"Broken-Land-II-no-1_thumb.jpg","galleries_id":53166,"server_id":1,"link":"photo_3128286.html","width":130,"caption":"","height":131});
															thumbnails[5112460] = clik.newPhoto({"id":5112460,"src":"Ripped-Sky-448_thumb.jpg","galleries_id":53378,"server_id":1,"link":"photo_5112460.html","width":130,"caption":"","height":131});
															thumbnails[5835431] = clik.newPhoto({"id":5835431,"src":"Fragmented_plate-1_purple_thumb.jpg","galleries_id":330078,"server_id":1,"link":"photo_5835431.html","width":130,"caption":"","height":130});
															thumbnails[8789772] = clik.newPhoto({"id":8789772,"src":"IMG_5395_448_thumb.jpg","galleries_id":384282,"server_id":1,"link":"photo_8789772.html","width":130,"caption":"","height":130});
															thumbnails[1609648] = clik.newPhoto({"id":1609648,"src":"Aerial_View_thumb.jpg","galleries_id":53166,"server_id":1,"link":"photo_1609648.html","width":130,"caption":"","height":129});
															thumbnails[3128291] = clik.newPhoto({"id":3128291,"src":"Burning-Lands_thumb.jpg","galleries_id":53378,"server_id":1,"link":"photo_3128291.html","width":130,"caption":"","height":130});
															thumbnails[5835415] = clik.newPhoto({"id":5835415,"src":"Fragmented_plate-5-blue_448_thumb.jpg","galleries_id":330078,"server_id":1,"link":"photo_5835415.html","width":130,"caption":"","height":130});
															thumbnails[8789773] = clik.newPhoto({"id":8789773,"src":"IMG_5392_448_thumb.jpg","galleries_id":384282,"server_id":1,"link":"photo_8789773.html","width":130,"caption":"","height":130});
															thumbnails[5835384] = clik.newPhoto({"id":5835384,"src":"Fragmented_plate-6-blue-2_4_thumb.jpg","galleries_id":330078,"server_id":1,"link":"photo_5835384.html","width":130,"caption":"","height":130});
															thumbnails[8789774] = clik.newPhoto({"id":8789774,"src":"IMG_5445_448_thumb.jpg","galleries_id":384282,"server_id":1,"link":"photo_8789774.html","width":130,"caption":"","height":130});
															thumbnails[1609642] = clik.newPhoto({"id":1609642,"src":"Blue_Day_thumb.jpg","galleries_id":53378,"server_id":1,"link":"photo_1609642.html","width":130,"caption":"","height":130});
															thumbnails[4138607] = clik.newPhoto({"id":4138607,"src":"Submerged_thumb.jpg","galleries_id":53378,"server_id":1,"link":"photo_4138607.html","width":130,"caption":"","height":129});
															thumbnails[5835421] = clik.newPhoto({"id":5835421,"src":"fragmented_plate-4_orange_4_thumb.jpg","galleries_id":330078,"server_id":1,"link":"photo_5835421.html","width":130,"caption":"","height":130});
															thumbnails[8789776] = clik.newPhoto({"id":8789776,"src":"IMG_5425_448_thumb.jpg","galleries_id":384282,"server_id":1,"link":"photo_8789776.html","width":130,"caption":"","height":130});
															thumbnails[4138640] = clik.newPhoto({"id":4138640,"src":"Deluge_thumb.jpg","galleries_id":53378,"server_id":1,"link":"photo_4138640.html","width":130,"caption":"","height":130});
															thumbnails[5835407] = clik.newPhoto({"id":5835407,"src":"Fragmented_plate-7-blue_448_thumb.jpg","galleries_id":330078,"server_id":1,"link":"photo_5835407.html","width":130,"caption":"","height":130});
															thumbnails[8822566] = clik.newPhoto({"id":8822566,"src":"Flooded_2_448_thumb.jpg","galleries_id":384282,"server_id":1,"link":"photo_8822566.html","width":130,"caption":"","height":130});
															thumbnails[5835424] = clik.newPhoto({"id":5835424,"src":"Fragmented_plate-2_red_448_thumb.jpg","galleries_id":330078,"server_id":1,"link":"photo_5835424.html","width":130,"caption":"","height":130});
															thumbnails[8789777] = clik.newPhoto({"id":8789777,"src":"IMG_5393_448_thumb.jpg","galleries_id":384282,"server_id":1,"link":"photo_8789777.html","width":130,"caption":"","height":130});
															thumbnails[5835420] = clik.newPhoto({"id":5835420,"src":"Fragmented_plate-1_blue_448_thumb.jpg","galleries_id":330078,"server_id":1,"link":"photo_5835420.html","width":130,"caption":"","height":130});
															thumbnails[8789779] = clik.newPhoto({"id":8789779,"src":"IMG_5383_448_thumb.jpg","galleries_id":384282,"server_id":1,"link":"photo_8789779.html","width":130,"caption":"","height":130});
															thumbnails[4497344] = clik.newPhoto({"id":4497344,"src":"Saddleback-Ridge2_thumb.jpg","galleries_id":53378,"server_id":1,"link":"photo_4497344.html","width":130,"caption":"","height":130});
															thumbnails[5835388] = clik.newPhoto({"id":5835388,"src":"Fragmented_plate-6-blue_448_thumb.jpg","galleries_id":330078,"server_id":1,"link":"photo_5835388.html","width":130,"caption":"","height":130});
															thumbnails[8789780] = clik.newPhoto({"id":8789780,"src":"IMG_5399_448_thumb.jpg","galleries_id":384282,"server_id":1,"link":"photo_8789780.html","width":130,"caption":"","height":130});
															thumbnails[5837400] = clik.newPhoto({"id":5837400,"src":"Fragmented_plate-7-mauve_44_thumb.jpg","galleries_id":330078,"server_id":1,"link":"photo_5837400.html","width":130,"caption":"","height":130});
															thumbnails[8789781] = clik.newPhoto({"id":8789781,"src":"IMG_5421_448_thumb.jpg","galleries_id":384282,"server_id":1,"link":"photo_8789781.html","width":130,"caption":"","height":130});
															thumbnails[5835436] = clik.newPhoto({"id":5835436,"src":"Fragmented_plate-3_blue_448_thumb.jpg","galleries_id":330078,"server_id":1,"link":"photo_5835436.html","width":130,"caption":"","height":130});
															thumbnails[8789782] = clik.newPhoto({"id":8789782,"src":"IMG_5387_448_thumb.jpg","galleries_id":384282,"server_id":1,"link":"photo_8789782.html","width":130,"caption":"","height":130});
															thumbnails[5835418] = clik.newPhoto({"id":5835418,"src":"Fragmented_plate-5_orange_4_thumb.jpg","galleries_id":330078,"server_id":1,"link":"photo_5835418.html","width":130,"caption":"","height":130});
															thumbnails[5835433] = clik.newPhoto({"id":5835433,"src":"Fragmented_plate-4_blue_448_thumb.jpg","galleries_id":330078,"server_id":1,"link":"photo_5835433.html","width":130,"caption":"","height":130});
															thumbnails[5835390] = clik.newPhoto({"id":5835390,"src":"Fragmented_plate-6-mauve_44_thumb.jpg","galleries_id":330078,"server_id":1,"link":"photo_5835390.html","width":130,"caption":"","height":130});
															thumbnails[5837411] = clik.newPhoto({"id":5837411,"src":"Fragmented_plate-5-blue_4481_thumb.jpg","galleries_id":330078,"server_id":1,"link":"photo_5837411.html","width":130,"caption":"","height":130});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[384282] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"New Paintings","link":"gallery_384282.html","maxRecords":0.0,"photoIDs":[8789768.0,8789771.0,8789772.0,8789773.0,8789774.0,8789776.0,8822566.0,8789777.0,8789779.0,8789780.0,8789781.0,8789782.0],"skipIndex":0,"section_code":"gallery","featured_images":"8822566,8789782,8789781,8789780,8789779,8789777,8789776,8789774,8789773,8789772","id":384282,"singleSection":false});				  						galleries[330078] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Fragmented Collagraph Series","link":"gallery_330078.html","maxRecords":0.0,"photoIDs":[5835434.0,5833882.0,5835431.0,5835415.0,5835384.0,5835421.0,5835407.0,5835424.0,5835420.0,5835388.0,5837400.0,5835436.0,5835418.0,5835433.0,5835390.0,5837411.0],"skipIndex":0,"section_code":"gallery","featured_images":"5837411,5837400,5835436,5835434,5835433,5835431,5835424,5835421,5835420,5835418","id":330078,"singleSection":false});				  						galleries[53166] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Collagraphs and Graphic Work","link":"gallery_53166.html","maxRecords":0.0,"photoIDs":[5835438.0,2059376.0,3128286.0,1609648.0],"skipIndex":0,"section_code":"gallery","featured_images":"5835438,3128286,2059376,1609648","id":53166,"singleSection":false});				  						galleries[53378] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Paintings","link":"gallery_53378.html","maxRecords":0.0,"photoIDs":[7101552.0,7106485.0,7106505.0,3128278.0,4162575.0,5112492.0,3128280.0,3128288.0,5112456.0,3128279.0,5112460.0,3128291.0,1609642.0,4138607.0,4138640.0,4497344.0],"skipIndex":0,"section_code":"gallery","featured_images":3128288.0,"id":53378,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '3128288,3128279,3128291,4138607,4138640,4497344';
imageSets[2] = '3128288';
imageSets[3] = '8822566,8789782,8789781,8789780,8789779,8789777,8789776,8789774,8789773,8789772,8789771,8789768,7106505,7106485,7101552,5837411,5837400,5835438,5835436,5835434,5835433,5835431,5835424,5835421,5835420,5835418,5835415,5835407,5835390,5835388,5835384,5833882,5112492,5112460,5112456,4497344,4162575,4138640,4138607,3128291,3128288,3128286,3128280,3128279,3128278,2059376,1609648,1609642';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/stevedesign/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/stevedesign/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/stevedesign/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/stevedesign/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/stevedesign/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/stevedesign/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/stevedesign/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/stevedesign/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/stevedesign/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/stevedesign/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/stevedesign/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/stevedesign/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/stevedesign/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/stevedesign/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/stevedesign/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/stevedesign/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/stevedesign/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/stevedesign/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/stevedesign/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/stevedesign/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/stevedesign/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/stevedesign/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/stevedesign/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/stevedesign/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/stevedesign/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/stevedesign/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/stevedesign/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 = 'Jenny McGee Painter Printmaker: ' + 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;
	}
}

			

