window.thumbnails = {};
															thumbnails[4015309] = clik.newPhoto({"id":4015309,"src":"body_13_2_new_721_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":291});
															thumbnails[255433] = clik.newPhoto({"id":255433,"src":"sweat final web72_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"sweat oil on canvas 50x46","height":103});
															thumbnails[255534] = clik.newPhoto({"id":255534,"src":"shower final web72_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"shower oil on canvas 46x56inches","height":188});
															thumbnails[255015] = clik.newPhoto({"id":255015,"src":"red 1 web72_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"red 1 oil on canvas 48x52inches","height":141});
															thumbnails[254715] = clik.newPhoto({"id":254715,"src":"grey 1 web72_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"grey 1 oil on canvas 48x46inches","height":124});
															thumbnails[255308] = clik.newPhoto({"id":255308,"src":"red 2 web72_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"red 2 oil on canvas 40x58","height":184});
															thumbnails[255316] = clik.newPhoto({"id":255316,"src":"green 1 web72_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"green 1 vinyl, mixed media on canvas 70x60","height":111});
															thumbnails[1866590] = clik.newPhoto({"id":1866590,"src":"feb08 paintings 002 adjust 72 2_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"brown body oil on canvas 40x48inches","height":156});
															thumbnails[3766289] = clik.newPhoto({"id":3766289,"src":"body_drawing_april_005_adjust72_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"body 4 charcoal and ink on paper 32x60inches","height":247});
															thumbnails[1473552] = clik.newPhoto({"id":1473552,"src":"drawings 006 crop 72_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"leg 1 charcoal on paper 27x39inches","height":89});
															thumbnails[832245] = clik.newPhoto({"id":832245,"src":"leg 1 (2) 70_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"leg 1 pencil on linin 50x58inches","height":112});
															thumbnails[4009166] = clik.newPhoto({"id":4009166,"src":"painting_4_72_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"body with cloth oil on canvas 36x38inches","height":139});
															thumbnails[1473561] = clik.newPhoto({"id":1473561,"src":"drawings 003 crop 72_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"stomach charcoal on paper 27x32inches","height":105});
															thumbnails[1473560] = clik.newPhoto({"id":1473560,"src":"drawings 005 crop 72_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"arm charcoal on paper 27x39inches","height":190});
															thumbnails[422486] = clik.newPhoto({"id":422486,"src":"pink 1 web72_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"pink 1 oil on canvas<br>\r\n40x50 inches","height":163});
															thumbnails[1222425] = clik.newPhoto({"id":1222425,"src":"foot paintings 002 adjust 72_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"leg 3 oil on linin 13x17inches","height":101});
															thumbnails[4791635] = clik.newPhoto({"id":4791635,"src":"paintings_sep_09_007_adjust72_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"figure 1 oil on canvas 42x66inches","height":203});
															thumbnails[3982168] = clik.newPhoto({"id":3982168,"src":"body_10_721_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"body 13 ink on paper 26x60 inches","height":352});
															thumbnails[2182330] = clik.newPhoto({"id":2182330,"src":"may08 007 adjust 72_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"body\/attachment oil on canvas 34x44incnes","height":168});
															thumbnails[3111340] = clik.newPhoto({"id":3111340,"src":"ulser 3 adjust 72_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"leg 2 charcoal on paper 24x36inches","height":196});
															thumbnails[7986326] = clik.newPhoto({"id":7986326,"src":"seizure_1_72_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"figure-descent 3 oil on canvas 48x68inches","height":185});
															thumbnails[3198907] = clik.newPhoto({"id":3198907,"src":"empyema new 002 adjust 72_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"side charcoal and ink on paper 48x50inches","height":136});
															thumbnails[3427163] = clik.newPhoto({"id":3427163,"src":"empyema new 001 adjust 72_thumb.jpg","galleries_id":216856,"server_id":1,"link":"photo_3427163.html","width":130,"caption":"body 3 charcoal on paper 32x60inches","height":236});
															thumbnails[4009126] = clik.newPhoto({"id":4009126,"src":"painting_1_72_thumb.jpg","galleries_id":242226,"server_id":1,"link":"photo_4009126.html","width":130,"caption":"bodies 1 oil on canvas 40x48inches","height":155});
															thumbnails[5447631] = clik.newPhoto({"id":5447631,"src":"hanging_figure_1_adjust72_thumb.jpg","galleries_id":308025,"server_id":1,"link":"photo_5447631.html","width":130,"caption":"hanging figure 1 oil on canvas 54x60inches","height":144});
															thumbnails[7896480] = clik.newPhoto({"id":7896480,"src":"monoprint_adjust_72_thumb.jpg","galleries_id":434690,"server_id":1,"link":"photo_7896480.html","width":130,"caption":"figure-descent monoprint 4x6inches","height":194});
															thumbnails[6779410] = clik.newPhoto({"id":6779410,"src":"drawings_810_004adjust2_72_thumb.jpg","galleries_id":216856,"server_id":1,"link":"photo_6779410.html","width":130,"caption":"back 2 charcoal on paper 40x60inches","height":187});
															thumbnails[3541269] = clik.newPhoto({"id":3541269,"src":"obese_1_adjust_72_thumb.jpg","galleries_id":216856,"server_id":1,"link":"photo_3541269.html","width":130,"caption":"body 1 charcoal and ink on paper 48x57inches","height":155});
															thumbnails[4009127] = clik.newPhoto({"id":4009127,"src":"painting_2_72_thumb.jpg","galleries_id":242226,"server_id":1,"link":"photo_4009127.html","width":130,"caption":"body animal oil on canvas 46x52inches","height":147});
															thumbnails[5447637] = clik.newPhoto({"id":5447637,"src":"hanging_figure_2_adjust72_thumb.jpg","galleries_id":308025,"server_id":1,"link":"photo_5447637.html","width":130,"caption":"hanging figure 2 oil on canvas 50x52inches","height":135});
															thumbnails[4009165] = clik.newPhoto({"id":4009165,"src":"painting_3_72_thumb.jpg","galleries_id":242226,"server_id":1,"link":"photo_4009165.html","width":130,"caption":"body\/attachment oil on canvas 34x44incnes","height":167});
															thumbnails[3982071] = clik.newPhoto({"id":3982071,"src":"body_13_2_new_72_thumb.jpg","galleries_id":216856,"server_id":1,"link":"photo_3982071.html","width":130,"caption":"body 10 ink on paper 26x60inches","height":291});
															thumbnails[1473562] = clik.newPhoto({"id":1473562,"src":"drawings 002crop clean 72_thumb.jpg","galleries_id":173065,"server_id":1,"link":"photo_1473562.html","width":130,"caption":"body charcoal on paper 27x30inches","height":117});
															thumbnails[3982074] = clik.newPhoto({"id":3982074,"src":"body_11_721_thumb.jpg","galleries_id":216856,"server_id":1,"link":"photo_3982074.html","width":130,"caption":"body 11 ink on paper 32x60inches","height":234});
															thumbnails[4009386] = clik.newPhoto({"id":4009386,"src":"painting_5_72_thumb.jpg","galleries_id":242226,"server_id":1,"link":"photo_4009386.html","width":130,"caption":"body animal 2 oil on canvas 44x60inches","height":174});
															thumbnails[1508267] = clik.newPhoto({"id":1508267,"src":"back_1_bw_72_thumb.jpg","galleries_id":173065,"server_id":1,"link":"photo_1508267.html","width":130,"caption":"back 1 charcoal on paper 35x60inches","height":223});
															thumbnails[3982118] = clik.newPhoto({"id":3982118,"src":"body12_721_thumb.jpg","galleries_id":216856,"server_id":1,"link":"photo_3982118.html","width":130,"caption":"body 12 ink on paper 28x60inches","height":269});
															thumbnails[5638789] = clik.newPhoto({"id":5638789,"src":"hanging_figure_2_march_72_thumb.jpg","galleries_id":308025,"server_id":1,"link":"photo_5638789.html","width":130,"caption":"hanging figure 10 oil on canvas 42x66inches","height":206});
															thumbnails[3006440] = clik.newPhoto({"id":3006440,"src":"HERNIA adjust 72_thumb.jpg","galleries_id":173065,"server_id":1,"link":"photo_3006440.html","width":130,"caption":"stomach 1 charcoal on paper 46x60inches","height":104});
															thumbnails[1589205] = clik.newPhoto({"id":1589205,"src":"nov 07 028 adjust 72 2_thumb.jpg","galleries_id":173065,"server_id":1,"link":"photo_1589205.html","width":130,"caption":"stomach 2 charcoal and ink on paper 46x60inches","height":99});
															thumbnails[6051827] = clik.newPhoto({"id":6051827,"src":"may_10_011adjust_no_red72_thumb.jpg","galleries_id":308025,"server_id":1,"link":"photo_6051827.html","width":130,"caption":"hanging figure 11 oil on canvas 40x70inches","height":227});
															thumbnails[7896426] = clik.newPhoto({"id":7896426,"src":"figure_12_721_thumb.jpg","galleries_id":308025,"server_id":1,"link":"photo_7896426.html","width":130,"caption":"hanging figure 12 oil on canvas 40x68inches","height":193});
															thumbnails[7896455] = clik.newPhoto({"id":7896455,"src":"figure-_descent_1_72_thumb.jpg","galleries_id":308025,"server_id":1,"link":"photo_7896455.html","width":130,"caption":"figure-descent 1 oil on canvas 40x68inches","height":237});
															thumbnails[7896461] = clik.newPhoto({"id":7896461,"src":"figure-descent_2_bright_72_thumb.jpg","galleries_id":308025,"server_id":1,"link":"photo_7896461.html","width":130,"caption":"figure-descent 2 oil on canvas 54x60inches","height":162});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[242226] = clik.newGallery({"parentGallery":"","usePopups":false,"title":2007.0,"link":"gallery_242226.html","maxRecords":0.0,"photoIDs":[4009126.0,4009127.0,4009165.0,4009386.0],"skipIndex":0,"section_code":"gallery","featured_images":4009165.0,"id":242226,"singleSection":false});				  						galleries[173065] = clik.newGallery({"parentGallery":"","usePopups":false,"title":2008.0,"link":"gallery_173065.html","maxRecords":0.0,"photoIDs":[1473562.0,1508267.0,3006440.0,1589205.0],"skipIndex":0,"section_code":"gallery","featured_images":1473562.0,"id":173065,"singleSection":false});				  						galleries[216856] = clik.newGallery({"parentGallery":"","usePopups":false,"title":2009.0,"link":"gallery_216856.html","maxRecords":0.0,"photoIDs":[3427163.0,6779410.0,3541269.0,3982071.0,3982074.0,3982118.0],"skipIndex":0,"section_code":"gallery","featured_images":3982118.0,"id":216856,"singleSection":false});				  						galleries[308025] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"2010\/11","link":"gallery_308025.html","maxRecords":0.0,"photoIDs":[5447631.0,5447637.0,5638789.0,6051827.0,7896426.0,7896455.0,7896461.0],"skipIndex":0,"section_code":"gallery","featured_images":"7896461,7896455,7896426,6051827,5638789,5447637,5447631","id":308025,"singleSection":false});				  						galleries[362651] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"new","link":"gallery_362651.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"gallery","featured_images":"","id":362651,"singleSection":false});				  						galleries[434690] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"prints","link":"gallery_434690.html","maxRecords":0.0,"photoIDs":[7896480.0],"skipIndex":0,"section_code":"gallery","featured_images":7896480.0,"id":434690,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '6051827';
imageSets[2] = '255433,254715,255316,4009165,1473562,3982118';
imageSets[3] = '7986326,7896480,7896461,7896455,7896426,6779410,6051827,5638789,5447637,5447631,4791635,4015309,4009386,4009166,4009165,4009127,4009126,3982168,3982118,3982074,3982071,3766289,3541269,3427163,3198907,3111340,3006440,2182330,1866590,1589205,1508267,1473562,1473561,1473560,1473552,1222425,832245,422486,255534,255433,255316,255308,255015,254715';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/stevedixon/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/stevedixon/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/stevedixon/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/stevedixon/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/stevedixon/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/stevedixon/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/stevedixon/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/stevedixon/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/stevedixon/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/stevedixon/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/stevedixon/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/stevedixon/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/stevedixon/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/stevedixon/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/stevedixon/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/stevedixon/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/stevedixon/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/stevedixon/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/stevedixon/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/stevedixon/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/stevedixon/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/stevedixon/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/stevedixon/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/stevedixon/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/stevedixon/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/stevedixon/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/stevedixon/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 = 'steve dixon : ' + 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;
	}
}

			

