window.thumbnails = {};
															thumbnails[1532881] = clik.newPhoto({"id":1532881,"src":"schier1_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":98});
															thumbnails[7071110] = clik.newPhoto({"id":7071110,"src":"yasmine4_thumb.jpg","galleries_id":105086,"server_id":1,"link":"photo_7071110.html","width":130,"caption":"yasmine","height":98});
															thumbnails[7072282] = clik.newPhoto({"id":7072282,"src":"katharina6_thumb.jpg","galleries_id":193049,"server_id":1,"link":"photo_7072282.html","width":130,"caption":"n.t.","height":173});
															thumbnails[7990443] = clik.newPhoto({"id":7990443,"src":"naarden4_thumb.jpg","galleries_id":105085,"server_id":1,"link":"photo_7990443.html","width":130,"caption":"naarden","height":86});
															thumbnails[7071660] = clik.newPhoto({"id":7071660,"src":"nienke5_thumb.jpg","galleries_id":105086,"server_id":1,"link":"photo_7071660.html","width":130,"caption":"nienke","height":98});
															thumbnails[7080104] = clik.newPhoto({"id":7080104,"src":"bed_thumb.jpg","galleries_id":193049,"server_id":1,"link":"photo_7080104.html","width":130,"caption":"n.t.","height":173});
															thumbnails[7990445] = clik.newPhoto({"id":7990445,"src":"naarden6_thumb.jpg","galleries_id":105085,"server_id":1,"link":"photo_7990445.html","width":130,"caption":"naarden","height":86});
															thumbnails[7071377] = clik.newPhoto({"id":7071377,"src":"just5_thumb.jpg","galleries_id":105086,"server_id":1,"link":"photo_7071377.html","width":130,"caption":"just","height":98});
															thumbnails[7081428] = clik.newPhoto({"id":7081428,"src":"katharina9_thumb.jpg","galleries_id":193049,"server_id":1,"link":"photo_7081428.html","width":130,"caption":"stuff","height":173});
															thumbnails[7990446] = clik.newPhoto({"id":7990446,"src":"bommel2_thumb.jpg","galleries_id":105085,"server_id":1,"link":"photo_7990446.html","width":130,"caption":"bommelerwaard","height":86});
															thumbnails[7071404] = clik.newPhoto({"id":7071404,"src":"bruno1_thumb.jpg","galleries_id":105086,"server_id":1,"link":"photo_7071404.html","width":130,"caption":"bruno","height":98});
															thumbnails[7086216] = clik.newPhoto({"id":7086216,"src":"kristine2_thumb.jpg","galleries_id":193049,"server_id":1,"link":"photo_7086216.html","width":130,"caption":"kristine","height":173});
															thumbnails[7990447] = clik.newPhoto({"id":7990447,"src":"winnietrein_thumb.jpg","galleries_id":105085,"server_id":1,"link":"photo_7990447.html","width":130,"caption":"schiphollijn","height":87});
															thumbnails[7071576] = clik.newPhoto({"id":7071576,"src":"mette_thumb.jpg","galleries_id":105086,"server_id":1,"link":"photo_7071576.html","width":130,"caption":"mette","height":98});
															thumbnails[7606378] = clik.newPhoto({"id":7606378,"src":"bethany6_thumb.jpg","galleries_id":193049,"server_id":1,"link":"photo_7606378.html","width":130,"caption":"bethany","height":175});
															thumbnails[7991854] = clik.newPhoto({"id":7991854,"src":"nickyroom2_thumb.jpg","galleries_id":105085,"server_id":1,"link":"photo_7991854.html","width":130,"caption":"den haag","height":86});
															thumbnails[7086141] = clik.newPhoto({"id":7086141,"src":"kristine1_thumb.jpg","galleries_id":105086,"server_id":1,"link":"photo_7086141.html","width":130,"caption":"kristine","height":98});
															thumbnails[8447352] = clik.newPhoto({"id":8447352,"src":"frankrijk201121_thumb.jpg","galleries_id":105085,"server_id":1,"link":"photo_8447352.html","width":130,"caption":"emallevile","height":86});
															thumbnails[7544695] = clik.newPhoto({"id":7544695,"src":"brunoraam4_thumb.jpg","galleries_id":105086,"server_id":1,"link":"photo_7544695.html","width":130,"caption":"bruno","height":98});
															thumbnails[7763082] = clik.newPhoto({"id":7763082,"src":"katharina201_thumb.jpg","galleries_id":193049,"server_id":1,"link":"photo_7763082.html","width":130,"caption":"n.t.","height":173});
															thumbnails[8447360] = clik.newPhoto({"id":8447360,"src":"hamburg1_thumb.jpg","galleries_id":105085,"server_id":1,"link":"photo_8447360.html","width":130,"caption":"hamburg","height":78});
															thumbnails[8441086] = clik.newPhoto({"id":8441086,"src":"Oerni7-a25729549_thumb.jpg","galleries_id":193049,"server_id":1,"link":"photo_8441086.html","width":130,"caption":"oerni","height":174});
															thumbnails[8451051] = clik.newPhoto({"id":8451051,"src":"monumenten3_thumb.jpg","galleries_id":105085,"server_id":1,"link":"photo_8451051.html","width":130,"caption":"den haag","height":79});
															thumbnails[8444320] = clik.newPhoto({"id":8444320,"src":"oerni8_thumb.jpg","galleries_id":193049,"server_id":1,"link":"photo_8444320.html","width":130,"caption":"oerni","height":173});
															thumbnails[7544702] = clik.newPhoto({"id":7544702,"src":"justbrunofight3_thumb.jpg","galleries_id":105086,"server_id":1,"link":"photo_7544702.html","width":130,"caption":"just","height":98});
															thumbnails[8498458] = clik.newPhoto({"id":8498458,"src":"oerni11_thumb.jpg","galleries_id":193049,"server_id":1,"link":"photo_8498458.html","width":130,"caption":"oerni","height":195});
															thumbnails[8508854] = clik.newPhoto({"id":8508854,"src":"prinsjesdag1_thumb.jpg","galleries_id":105085,"server_id":1,"link":"photo_8508854.html","width":130,"caption":"den haag","height":70});
															thumbnails[7544703] = clik.newPhoto({"id":7544703,"src":"justraam5_thumb.jpg","galleries_id":105086,"server_id":1,"link":"photo_7544703.html","width":130,"caption":"just","height":98});
															thumbnails[8653554] = clik.newPhoto({"id":8653554,"src":"oerni19a_thumb.jpg","galleries_id":193049,"server_id":1,"link":"photo_8653554.html","width":130,"caption":"oerni","height":90});
															thumbnails[7575507] = clik.newPhoto({"id":7575507,"src":"bethany2_thumb.jpg","galleries_id":105086,"server_id":1,"link":"photo_7575507.html","width":130,"caption":"bethany","height":98});
															thumbnails[8752121] = clik.newPhoto({"id":8752121,"src":"lux4_thumb.jpg","galleries_id":193049,"server_id":1,"link":"photo_8752121.html","width":130,"caption":"lux","height":98});
															thumbnails[7583250] = clik.newPhoto({"id":7583250,"src":"bethany-a24211014_thumb.jpg","galleries_id":105086,"server_id":1,"link":"photo_7583250.html","width":130,"caption":"bethany","height":98});
															thumbnails[7583243] = clik.newPhoto({"id":7583243,"src":"colleague2-a23779017_thumb.jpg","galleries_id":105086,"server_id":1,"link":"photo_7583243.html","width":130,"caption":"veronica","height":98});
															thumbnails[8752123] = clik.newPhoto({"id":8752123,"src":"lux1_thumb.jpg","galleries_id":193049,"server_id":1,"link":"photo_8752123.html","width":130,"caption":"lux","height":98});
															thumbnails[7608225] = clik.newPhoto({"id":7608225,"src":"vriendindavid1_thumb.jpg","galleries_id":105086,"server_id":1,"link":"photo_7608225.html","width":130,"caption":"friend","height":98});
															thumbnails[8752126] = clik.newPhoto({"id":8752126,"src":"lux6_thumb.jpg","galleries_id":193049,"server_id":1,"link":"photo_8752126.html","width":130,"caption":"lux","height":130});
															thumbnails[7608455] = clik.newPhoto({"id":7608455,"src":"nicky_thumb.jpg","galleries_id":105086,"server_id":1,"link":"photo_7608455.html","width":130,"caption":"nicky","height":98});
															thumbnails[7608884] = clik.newPhoto({"id":7608884,"src":"david_thumb.jpg","galleries_id":105086,"server_id":1,"link":"photo_7608884.html","width":130,"caption":"david","height":97});
															thumbnails[8812586] = clik.newPhoto({"id":8812586,"src":"lux2_thumb.jpg","galleries_id":193049,"server_id":1,"link":"photo_8812586.html","width":130,"caption":"lux","height":98});
															thumbnails[7723480] = clik.newPhoto({"id":7723480,"src":"winnie6_thumb.jpg","galleries_id":105086,"server_id":1,"link":"photo_7723480.html","width":130,"caption":"winnie","height":98});
															thumbnails[7832659] = clik.newPhoto({"id":7832659,"src":"winnie7bw_thumb.jpg","galleries_id":105086,"server_id":1,"link":"photo_7832659.html","width":130,"caption":"winnie","height":98});
															thumbnails[7832661] = clik.newPhoto({"id":7832661,"src":"yasmine6_thumb.jpg","galleries_id":105086,"server_id":1,"link":"photo_7832661.html","width":130,"caption":"yasmine","height":99});
															thumbnails[7544700] = clik.newPhoto({"id":7544700,"src":"jeanettecantaloup1_thumb.jpg","galleries_id":105086,"server_id":1,"link":"photo_7544700.html","width":130,"caption":"jeanette","height":98});
															thumbnails[7840954] = clik.newPhoto({"id":7840954,"src":"brunotijmen_thumb.jpg","galleries_id":105086,"server_id":1,"link":"photo_7840954.html","width":130,"caption":"bruno+tijmen","height":98});
															thumbnails[7840970] = clik.newPhoto({"id":7840970,"src":"tijmen_thumb.jpg","galleries_id":105086,"server_id":1,"link":"photo_7840970.html","width":130,"caption":"tijmen","height":98});
															thumbnails[7960071] = clik.newPhoto({"id":7960071,"src":"brunoraamzw_thumb.jpg","galleries_id":105086,"server_id":1,"link":"photo_7960071.html","width":130,"caption":"bruno","height":98});
															thumbnails[7960060] = clik.newPhoto({"id":7960060,"src":"charlottefuji1_thumb.jpg","galleries_id":105086,"server_id":1,"link":"photo_7960060.html","width":130,"caption":"charlotte","height":87});
															thumbnails[7985043] = clik.newPhoto({"id":7985043,"src":"brunomuurfuji2_thumb.jpg","galleries_id":105086,"server_id":1,"link":"photo_7985043.html","width":130,"caption":"bruno","height":87});
															thumbnails[7990438] = clik.newPhoto({"id":7990438,"src":"nickyfuji1_thumb.jpg","galleries_id":105086,"server_id":1,"link":"photo_7990438.html","width":130,"caption":"nicky","height":87});
															thumbnails[8441075] = clik.newPhoto({"id":8441075,"src":"Oerni6-a25705941_thumb.jpg","galleries_id":105086,"server_id":1,"link":"photo_8441075.html","width":130,"caption":"oerni","height":90});
															thumbnails[8447374] = clik.newPhoto({"id":8447374,"src":"emmajust5_thumb.jpg","galleries_id":105086,"server_id":1,"link":"photo_8447374.html","width":130,"caption":"emma en just","height":87});
															thumbnails[8590107] = clik.newPhoto({"id":8590107,"src":"marlo6_thumb.jpg","galleries_id":105086,"server_id":1,"link":"photo_8590107.html","width":130,"caption":"marlo","height":98});
															thumbnails[8590118] = clik.newPhoto({"id":8590118,"src":"brunomatrozen2_thumb.jpg","galleries_id":105086,"server_id":1,"link":"photo_8590118.html","width":130,"caption":"bruno and jeanette","height":86});
															thumbnails[8687024] = clik.newPhoto({"id":8687024,"src":"oerni23_thumb.jpg","galleries_id":105086,"server_id":1,"link":"photo_8687024.html","width":130,"caption":"oerni","height":98});
															thumbnails[8653534] = clik.newPhoto({"id":8653534,"src":"oerni20_thumb.jpg","galleries_id":105086,"server_id":1,"link":"photo_8653534.html","width":130,"caption":"oerni","height":173});
															thumbnails[8752127] = clik.newPhoto({"id":8752127,"src":"senna1_thumb.jpg","galleries_id":105086,"server_id":1,"link":"photo_8752127.html","width":130,"caption":"o.t.","height":98});
															thumbnails[8812565] = clik.newPhoto({"id":8812565,"src":"nienke8_thumb.jpg","galleries_id":105086,"server_id":1,"link":"photo_8812565.html","width":130,"caption":"nienke 2011","height":98});
															thumbnails[9009446] = clik.newPhoto({"id":9009446,"src":"farida1_thumb.jpg","galleries_id":105086,"server_id":1,"link":"photo_9009446.html","width":130,"caption":"farida","height":177});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[111204] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"robino","link":"section146438.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"section146438","featured_images":"","id":111204,"singleSection":true});				  						galleries[105086] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"portrait","link":"gallery_105086.html","maxRecords":0.0,"photoIDs":[7071110.0,7071660.0,7071377.0,7071404.0,7071576.0,7086141.0,7544695.0,7544702.0,7544703.0,7575507.0,7583250.0,7583243.0,7608225.0,7608455.0,7608884.0,7723480.0,7832659.0,7832661.0,7544700.0,7840954.0,7840970.0,7960071.0,7960060.0,7985043.0,7990438.0,8441075.0,8447374.0,8590107.0,8590118.0,8687024.0,8653534.0,8752127.0,8812565.0,9009446.0],"skipIndex":0,"section_code":"gallery","featured_images":"8812565,7608225","id":105086,"singleSection":false});				  						galleries[193049] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"body","link":"gallery_193049.html","maxRecords":0.0,"photoIDs":[7072282.0,7080104.0,7081428.0,7086216.0,7606378.0,7763082.0,8441086.0,8444320.0,8498458.0,8653554.0,8752121.0,8752123.0,8752126.0,8812586.0],"skipIndex":0,"section_code":"gallery","featured_images":8812586.0,"id":193049,"singleSection":false});				  						galleries[105085] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"street","link":"gallery_105085.html","maxRecords":0.0,"photoIDs":[7990443.0,7990445.0,7990446.0,7990447.0,7991854.0,8447352.0,8447360.0,8451051.0,8508854.0],"skipIndex":0,"section_code":"gallery","featured_images":7990445.0,"id":105085,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '1532881';
imageSets[2] = '7990445,7608225,8812586,8812565';
imageSets[3] = '9009446,8812586,8812565,8752127,8752126,8752123,8752121,8687024,8653554,8653534,8590118,8590107,8508854,8498458,8451051,8447374,8447360,8447352,8444320,8441086,8441075,7991854,7990447,7990446,7990445,7990443,7990438,7985043,7960071,7960060,7840970,7840954,7832661,7832659,7763082,7723480,7608884,7608455,7608225,7606378,7583250,7583243,7575507,7544703,7544702,7544700,7544695,7086216,7086141,7081428';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/robino/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/robino/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/robino/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/robino/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/robino/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/robino/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/robino/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/robino/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/robino/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/robino/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/robino/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/robino/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/robino/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/robino/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/robino/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/robino/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/robino/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/robino/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/robino/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/robino/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/robino/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/robino/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/robino/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/robino/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/robino/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/robino/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/robino/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 = 'ROBINO: ' + 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;
	}
}

			

