window.thumbnails = {};
															thumbnails[8582982] = clik.newPhoto({"id":8582982,"src":"IMG_1800_thumb.JPG","galleries_id":152334,"server_id":5,"link":"photo_8582982.html","width":130,"caption":"Amy Winehouse II","height":161});
															thumbnails[8582995] = clik.newPhoto({"id":8582995,"src":"IMG_18011_thumb.JPG","galleries_id":152334,"server_id":5,"link":"photo_8582995.html","width":130,"caption":"Amy Winehouse IV","height":156});
															thumbnails[4438093] = clik.newPhoto({"id":4438093,"src":"IMG_29691_thumb.JPG","galleries_id":152334,"server_id":5,"link":"photo_4438093.html","width":130,"caption":"The Man in the mirror (A Portrait of Michael Jackson)","height":234});
															thumbnails[2533215] = clik.newPhoto({"id":2533215,"src":"splash[1]2_thumb.jpg","galleries_id":152334,"server_id":5,"link":"photo_2533215.html","width":130,"caption":"Lighten up, it's just homework","height":128});
															thumbnails[2533356] = clik.newPhoto({"id":2533356,"src":"IMG_0864_edited1_thumb.jpg","galleries_id":152334,"server_id":5,"link":"photo_2533356.html","width":130,"caption":"Lilly Pads","height":172});
															thumbnails[2533601] = clik.newPhoto({"id":2533601,"src":"Acrylic on Board,_thumb. 24cm x 28cm.jpg","galleries_id":152334,"server_id":5,"link":"photo_2533601.html","width":130,"caption":"Reach for the Sky","height":156});
															thumbnails[2533716] = clik.newPhoto({"id":2533716,"src":"tu4d5Wdo[1]_thumb.jpg","galleries_id":152334,"server_id":5,"link":"photo_2533716.html","width":130,"caption":"A Crying World","height":111});
															thumbnails[2533717] = clik.newPhoto({"id":2533717,"src":"Sunst 3 by Patricia Ogundero_thumb.jpg","galleries_id":152334,"server_id":5,"link":"photo_2533717.html","width":130,"caption":"Sunset II","height":147});
															thumbnails[2533729] = clik.newPhoto({"id":2533729,"src":"dMxZtPQo[1]_thumb.jpg","galleries_id":152334,"server_id":5,"link":"photo_2533729.html","width":130,"caption":"Valley of Dreams I","height":151});
															thumbnails[2533978] = clik.newPhoto({"id":2533978,"src":"2VATJyQK[1]_thumb.jpg","galleries_id":162152,"server_id":5,"link":"photo_2533978.html","width":130,"caption":"Mother and Child","height":123});
															thumbnails[2533988] = clik.newPhoto({"id":2533988,"src":"5iVfDfsT[1]_thumb.jpg","galleries_id":162152,"server_id":5,"link":"photo_2533988.html","width":130,"caption":"Couples","height":238});
															thumbnails[2533999] = clik.newPhoto({"id":2533999,"src":"FmYpj5fC[1]_thumb.jpg","galleries_id":152334,"server_id":5,"link":"photo_2533999.html","width":130,"caption":"Valley of Dreams II","height":153});
															thumbnails[2534089] = clik.newPhoto({"id":2534089,"src":"IMG_0783_edited_thumb.jpg","galleries_id":152334,"server_id":5,"link":"photo_2534089.html","width":130,"caption":"Standing Tall","height":275});
															thumbnails[2534141] = clik.newPhoto({"id":2534141,"src":"IMG_0771_edited_thumb.jpg","galleries_id":162152,"server_id":5,"link":"photo_2534141.html","width":130,"caption":"Street Light","height":265});
															thumbnails[2534145] = clik.newPhoto({"id":2534145,"src":"IMG_0805_edited_thumb.jpg","galleries_id":162152,"server_id":5,"link":"photo_2534145.html","width":130,"caption":"Dreamer ","height":276});
															thumbnails[2534203] = clik.newPhoto({"id":2534203,"src":"IMG_0841_edited_thumb.jpg","galleries_id":152334,"server_id":5,"link":"photo_2534203.html","width":130,"caption":"Rhythm of the Drummer","height":205});
															thumbnails[2534204] = clik.newPhoto({"id":2534204,"src":"IMG_0843_edited_thumb.jpg","galleries_id":152334,"server_id":5,"link":"photo_2534204.html","width":130,"caption":"Escape to the City","height":197});
															thumbnails[2534370] = clik.newPhoto({"id":2534370,"src":"IMG_0868_edited_thumb.jpg","galleries_id":152334,"server_id":5,"link":"photo_2534370.html","width":130,"caption":"fruit bowl II","height":179});
															thumbnails[2534395] = clik.newPhoto({"id":2534395,"src":"IMG_0870_edited_thumb.jpg","galleries_id":152334,"server_id":5,"link":"photo_2534395.html","width":130,"caption":"fruit bowl I","height":178});
															thumbnails[2534721] = clik.newPhoto({"id":2534721,"src":"IMG_1110_edited_thumb.JPG","galleries_id":152334,"server_id":5,"link":"photo_2534721.html","width":130,"caption":"Sea and Sand, fishes in the sky","height":129});
															thumbnails[2534760] = clik.newPhoto({"id":2534760,"src":"IMG_1120_edited_thumb.JPG","galleries_id":152334,"server_id":5,"link":"photo_2534760.html","width":130,"caption":"Salo's Mountains","height":88});
															thumbnails[2534774] = clik.newPhoto({"id":2534774,"src":"IMG_1147_edited_thumb.JPG","galleries_id":152334,"server_id":5,"link":"photo_2534774.html","width":130,"caption":"The Lion King","height":178});
															thumbnails[2534778] = clik.newPhoto({"id":2534778,"src":"IMG_1151_edited_thumb.JPG","galleries_id":152334,"server_id":5,"link":"photo_2534778.html","width":130,"caption":"Thinker","height":169});
															thumbnails[2534780] = clik.newPhoto({"id":2534780,"src":"IMG_1153_edited_thumb.JPG","galleries_id":152334,"server_id":5,"link":"photo_2534780.html","width":130,"caption":"Beauty of Youth","height":155});
															thumbnails[2534790] = clik.newPhoto({"id":2534790,"src":"IMG_1157_edited_thumb.JPG","galleries_id":152334,"server_id":5,"link":"photo_2534790.html","width":130,"caption":"Cycle for Life","height":37});
															thumbnails[2534838] = clik.newPhoto({"id":2534838,"src":"IMG_1166_edited_thumb.JPG","galleries_id":152334,"server_id":5,"link":"photo_2534838.html","width":130,"caption":"Like Matured Wine","height":156});
															thumbnails[2534843] = clik.newPhoto({"id":2534843,"src":"IMG_1179_edited_thumb.JPG","galleries_id":152334,"server_id":5,"link":"photo_2534843.html","width":130,"caption":"Living","height":61});
															thumbnails[2534844] = clik.newPhoto({"id":2534844,"src":"IMG_1182_edited_thumb.JPG","galleries_id":162152,"server_id":5,"link":"photo_2534844.html","width":130,"caption":"Girls Allowed","height":273});
															thumbnails[2534847] = clik.newPhoto({"id":2534847,"src":"IMG_1192_edited_thumb.JPG","galleries_id":152334,"server_id":5,"link":"photo_2534847.html","width":130,"caption":"Reflections II","height":133});
															thumbnails[2577953] = clik.newPhoto({"id":2577953,"src":"4DM3UObd[1]_thumb.jpg","galleries_id":152334,"server_id":5,"link":"photo_2577953.html","width":130,"caption":"Three Little friends at the Park","height":132});
															thumbnails[2577962] = clik.newPhoto({"id":2577962,"src":"IMG_0731_edited_thumb.jpg","galleries_id":152334,"server_id":5,"link":"photo_2577962.html","width":130,"caption":"Ocean's Blues","height":85});
															thumbnails[2577969] = clik.newPhoto({"id":2577969,"src":"IMG_0757_edited_thumb.jpg","galleries_id":152334,"server_id":5,"link":"photo_2577969.html","width":130,"caption":"Love the world's greatest Poverty","height":91});
															thumbnails[2577971] = clik.newPhoto({"id":2577971,"src":"IMG_0769_edited_thumb.jpg","galleries_id":152334,"server_id":5,"link":"photo_2577971.html","width":130,"caption":"Animal Kingdom II","height":86});
															thumbnails[2577973] = clik.newPhoto({"id":2577973,"src":"IMG_0754_edited_thumb.jpg","galleries_id":152334,"server_id":5,"link":"photo_2577973.html","width":130,"caption":"Polo Tournament","height":103});
															thumbnails[2577976] = clik.newPhoto({"id":2577976,"src":"IMG_0852_edited_thumb.jpg","galleries_id":152334,"server_id":5,"link":"photo_2577976.html","width":130,"caption":"Life cycle","height":131});
															thumbnails[2577979] = clik.newPhoto({"id":2577979,"src":"IMG_1104_edited_thumb.JPG","galleries_id":152334,"server_id":5,"link":"photo_2577979.html","width":130,"caption":"The New Dinosaurs? I","height":122});
															thumbnails[2577982] = clik.newPhoto({"id":2577982,"src":"IMG_1102_edited_thumb.JPG","galleries_id":152334,"server_id":5,"link":"photo_2577982.html","width":130,"caption":"The New Dinousaurs? II","height":123});
															thumbnails[2577983] = clik.newPhoto({"id":2577983,"src":"IMG_1113_edited_thumb.JPG","galleries_id":152334,"server_id":5,"link":"photo_2577983.html","width":130,"caption":"The New Dinousaurs? III","height":124});
															thumbnails[2577987] = clik.newPhoto({"id":2577987,"src":"Oil on Board, 24cm x 28cm_thumb.jpg","galleries_id":152334,"server_id":5,"link":"photo_2577987.html","width":130,"caption":"Reflections of Stoneage","height":111});
															thumbnails[2577989] = clik.newPhoto({"id":2577989,"src":"Ny5aFUSC[1]_thumb.jpg","galleries_id":152334,"server_id":5,"link":"photo_2577989.html","width":130,"caption":"Fishes in the Sky","height":62});
															thumbnails[2577991] = clik.newPhoto({"id":2577991,"src":"1kwHpybW[1]1_thumb.jpg","galleries_id":152334,"server_id":5,"link":"photo_2577991.html","width":130,"caption":"Valley of Dreams III","height":174});
															thumbnails[2577994] = clik.newPhoto({"id":2577994,"src":"splash 11_thumb.jpg","galleries_id":162152,"server_id":5,"link":"photo_2577994.html","width":130,"caption":"Splash","height":50});
															thumbnails[2577997] = clik.newPhoto({"id":2577997,"src":"Turbulence, Oil painting by Patricia Ogundero_thumb.jpg","galleries_id":152334,"server_id":5,"link":"photo_2577997.html","width":130,"caption":"Turbulent Love","height":111});
															thumbnails[2578013] = clik.newPhoto({"id":2578013,"src":"IMG_1038_edited_thumb.JPG","galleries_id":152334,"server_id":5,"link":"photo_2578013.html","width":130,"caption":"  Joy<br>\r\n","height":153});
															thumbnails[2578019] = clik.newPhoto({"id":2578019,"src":"IMG_0771_edited1_thumb.jpg","galleries_id":152334,"server_id":5,"link":"photo_2578019.html","width":130,"caption":"Street Light","height":265});
															thumbnails[2578022] = clik.newPhoto({"id":2578022,"src":"IMG_0775_edited_thumb.jpg","galleries_id":152334,"server_id":5,"link":"photo_2578022.html","width":130,"caption":"Doorways","height":245});
															thumbnails[2578025] = clik.newPhoto({"id":2578025,"src":"IMG_0742_edited_thumb.jpg","galleries_id":152334,"server_id":5,"link":"photo_2578025.html","width":130,"caption":"Michael","height":154});
															thumbnails[2578028] = clik.newPhoto({"id":2578028,"src":"IMG_0748_edited_thumb.jpg","galleries_id":152334,"server_id":5,"link":"photo_2578028.html","width":130,"caption":"Deji","height":159});
															thumbnails[2578030] = clik.newPhoto({"id":2578030,"src":"IMG_0780_edited_thumb.jpg","galleries_id":152334,"server_id":5,"link":"photo_2578030.html","width":130,"caption":"Flower vase","height":245});
															thumbnails[2578033] = clik.newPhoto({"id":2578033,"src":"IMG_0801_edited_thumb.jpg","galleries_id":152334,"server_id":5,"link":"photo_2578033.html","width":130,"caption":"Starburst","height":99});
															thumbnails[2578035] = clik.newPhoto({"id":2578035,"src":"IMG_0826_edited1_thumb.jpg","galleries_id":152334,"server_id":5,"link":"photo_2578035.html","width":130,"caption":"Street Hawkers","height":167});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[152334] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Paintings","link":"gallery_152334.html","maxRecords":0.0,"photoIDs":[8582982.0,8582995.0,4438093.0,2533215.0,2533356.0,2533601.0,2533716.0,2533717.0,2533729.0,2533999.0,2534089.0,2534203.0,2534204.0,2534370.0,2534395.0,2534721.0,2534760.0,2534774.0,2534778.0,2534780.0,2534790.0,2534838.0,2534843.0,2534847.0,2577953.0,2577962.0,2577969.0,2577971.0,2577973.0,2577976.0,2577979.0,2577982.0,2577983.0,2577987.0,2577989.0,2577991.0,2577997.0,2578013.0,2578019.0,2578022.0,2578025.0,2578028.0,2578030.0,2578033.0,2578035.0],"skipIndex":0,"section_code":"gallery","featured_images":"4438093,2578033,2578030,2578022,2578019,2577991,2577989,2577987,2577983,2577982,2577979,2577973,2577971,2577969,2577953,2534843,2534838,2534780,2534778,2534774,2534760,2534721,2534395,2534370,2534204,2534203,2534089,2533999,2533729,2533717,2533716,2533601,2533356,2533215","id":152334,"singleSection":false});				  						galleries[162152] = clik.newGallery({"parentGallery":"","usePopups":false,"title":" Limited Edition Prints ","link":"gallery_162152.html","maxRecords":0.0,"photoIDs":[2533978.0,2533988.0,2534141.0,2534145.0,2534844.0,2577994.0],"skipIndex":0,"section_code":"gallery","featured_images":"2577994,2534844,2534145,2534141,2533988,2533978","id":162152,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '4438093,2578033,2578030,2578022,2578019,2577994,2577987,2577983,2577982,2577979,2577973,2577969,2577953,2534844,2534843,2534838,2534790,2534780,2534778,2534774,2534760,2534721,2534145,2534141,2533999,2533978,2533729,2533716,2533215';
imageSets[2] = '4438093,2578033,2578030,2578022,2578019,2577994,2577991,2577989,2577987,2577983,2577982,2577979,2577973,2577971,2577969,2577953,2534844,2534843,2534838,2534780,2534778,2534774,2534760,2534721,2534395,2534370,2534204,2534203,2534145,2534141,2534089,2533999,2533988,2533978,2533729,2533717,2533716,2533601,2533356,2533215';
imageSets[3] = '4438093';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'www12.clikpic.com/patogu/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/patogu/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/patogu/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/patogu/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/patogu/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/patogu/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/patogu/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/patogu/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/patogu/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/patogu/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/patogu/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/patogu/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/patogu/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/patogu/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/patogu/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/patogu/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/patogu/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/patogu/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/patogu/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/patogu/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/patogu/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/patogu/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/patogu/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/patogu/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/patogu/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 = 'Patricia Ogundero Art: ' + 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>Artist </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> &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="updateItemValues($(this.form).next(\'#paymentForm\')[0],this.form.payment_options_id.options[this.form.payment_options_id.options.selectedIndex].value);">';
		
		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 += '<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;
	}
}

			

