window.thumbnails = {};
															thumbnails[7741061] = clik.newPhoto({"id":7741061,"src":"homepageAPR11_copy12_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":160,"caption":"","height":99});
															thumbnails[8066222] = clik.newPhoto({"id":8066222,"src":"Bridal_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":160,"caption":"","height":49});
															thumbnails[8090883] = clik.newPhoto({"id":8090883,"src":"Tutorial_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":160,"caption":"","height":43});
															thumbnails[8186613] = clik.newPhoto({"id":8186613,"src":"special_occasion_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":160,"caption":"","height":41});
															thumbnails[9017746] = clik.newPhoto({"id":9017746,"src":"MariaOW_copy_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":160,"caption":"","height":225});
															thumbnails[9062673] = clik.newPhoto({"id":9062673,"src":"Tutorial_Page_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":160,"caption":"","height":55});
															thumbnails[9058708] = clik.newPhoto({"id":9058708,"src":"Jade_on_the_webb2_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":160,"caption":"","height":225});
															thumbnails[7840324] = clik.newPhoto({"id":7840324,"src":"AOFM_Black_fv_thumb.jpg","galleries_id":245496,"server_id":15,"link":"photo_7840324.html","width":160,"caption":"","height":112});
															thumbnails[7840734] = clik.newPhoto({"id":7840734,"src":"LFW_Feb_10_thumb.jpg","galleries_id":250372,"server_id":15,"link":"photo_7840734.html","width":160,"caption":"","height":111});
															thumbnails[7851244] = clik.newPhoto({"id":7851244,"src":"Chelsea_Show_thumb.jpg","galleries_id":250372,"server_id":15,"link":"photo_7851244.html","width":160,"caption":"","height":111});
															thumbnails[7851387] = clik.newPhoto({"id":7851387,"src":"Chelsea_Show_1_thumb.jpg","galleries_id":250372,"server_id":15,"link":"photo_7851387.html","width":160,"caption":"","height":107});
															thumbnails[7856086] = clik.newPhoto({"id":7856086,"src":"CSLJ10-1_thumb.jpg","galleries_id":250372,"server_id":15,"link":"photo_7856086.html","width":160,"caption":"","height":111});
															thumbnails[7856114] = clik.newPhoto({"id":7856114,"src":"CSLJ10-2_thumb.jpg","galleries_id":250372,"server_id":15,"link":"photo_7856114.html","width":160,"caption":"","height":111});
															thumbnails[7856136] = clik.newPhoto({"id":7856136,"src":"CSLJ10-3_thumb.jpg","galleries_id":250372,"server_id":15,"link":"photo_7856136.html","width":160,"caption":"","height":110});
															thumbnails[7856158] = clik.newPhoto({"id":7856158,"src":"Karen_Karmody_thumb.jpg","galleries_id":250372,"server_id":15,"link":"photo_7856158.html","width":160,"caption":"","height":111});
															thumbnails[7856250] = clik.newPhoto({"id":7856250,"src":"Karen_Karmody2_thumb.jpg","galleries_id":250372,"server_id":15,"link":"photo_7856250.html","width":160,"caption":"","height":109});
															thumbnails[7856451] = clik.newPhoto({"id":7856451,"src":"Amy_White_thumb.jpg","galleries_id":245496,"server_id":15,"link":"photo_7856451.html","width":160,"caption":"","height":110});
															thumbnails[7856621] = clik.newPhoto({"id":7856621,"src":"Idlewild_London_thumb.jpg","galleries_id":245496,"server_id":15,"link":"photo_7856621.html","width":160,"caption":"","height":110});
															thumbnails[7856659] = clik.newPhoto({"id":7856659,"src":"Idlewild_London2_thumb.jpg","galleries_id":245496,"server_id":15,"link":"photo_7856659.html","width":160,"caption":"","height":108});
															thumbnails[7924119] = clik.newPhoto({"id":7924119,"src":"Hospice1_thumb.jpg","galleries_id":250372,"server_id":15,"link":"photo_7924119.html","width":160,"caption":"","height":108});
															thumbnails[7924126] = clik.newPhoto({"id":7924126,"src":"Hospice2_thumb.jpg","galleries_id":250372,"server_id":15,"link":"photo_7924126.html","width":160,"caption":"","height":109});
															thumbnails[7930608] = clik.newPhoto({"id":7930608,"src":"Clothes_Show_London_2009_thumb.jpg","galleries_id":250372,"server_id":15,"link":"photo_7930608.html","width":160,"caption":"","height":109});
															thumbnails[8065932] = clik.newPhoto({"id":8065932,"src":"20090915-DSC_7851_thumb.jpg","galleries_id":245496,"server_id":15,"link":"photo_8065932.html","width":160,"caption":"","height":107});
															thumbnails[7851162] = clik.newPhoto({"id":7851162,"src":"Catherine_Shoot1_thumb.jpg","galleries_id":250370,"server_id":15,"link":"photo_7851162.html","width":160,"caption":"","height":110});
															thumbnails[5886432] = clik.newPhoto({"id":5886432,"src":"Jades_Make_up_thumb.jpg","galleries_id":250370,"server_id":15,"link":"photo_5886432.html","width":160,"caption":"","height":108});
															thumbnails[4221731] = clik.newPhoto({"id":4221731,"src":"Clothes_Show_LondonKP_thumb.jpg","galleries_id":250372,"server_id":15,"link":"photo_4221731.html","width":160,"caption":"","height":108});
															thumbnails[7840651] = clik.newPhoto({"id":7840651,"src":"Sam_Wedding_fv_thumb.jpg","galleries_id":250370,"server_id":15,"link":"photo_7840651.html","width":160,"caption":"","height":109});
															thumbnails[7840686] = clik.newPhoto({"id":7840686,"src":"Sam_Wedding_D1_thumb.jpg","galleries_id":250370,"server_id":15,"link":"photo_7840686.html","width":160,"caption":"","height":111});
															thumbnails[4221766] = clik.newPhoto({"id":4221766,"src":"Clothes_show_london_men_thumb.jpg","galleries_id":250372,"server_id":15,"link":"photo_4221766.html","width":160,"caption":"","height":108});
															thumbnails[7840703] = clik.newPhoto({"id":7840703,"src":"Sam_wedding_D2_thumb.jpg","galleries_id":250370,"server_id":15,"link":"photo_7840703.html","width":160,"caption":"","height":110});
															thumbnails[4087698] = clik.newPhoto({"id":4087698,"src":"AmyRed1_thumb.jpg","galleries_id":245496,"server_id":15,"link":"photo_4087698.html","width":160,"caption":"","height":107});
															thumbnails[4221821] = clik.newPhoto({"id":4221821,"src":"Emma_Bell_thumb.jpg","galleries_id":250372,"server_id":15,"link":"photo_4221821.html","width":160,"caption":"","height":106});
															thumbnails[7930686] = clik.newPhoto({"id":7930686,"src":"Sams_wedding_thumb.jpg","galleries_id":250370,"server_id":15,"link":"photo_7930686.html","width":160,"caption":"","height":108});
															thumbnails[4087706] = clik.newPhoto({"id":4087706,"src":"AmyRed2_thumb.jpg","galleries_id":245496,"server_id":15,"link":"photo_4087706.html","width":160,"caption":"","height":107});
															thumbnails[4221824] = clik.newPhoto({"id":4221824,"src":"Emma_Bell_2_thumb.jpg","galleries_id":250372,"server_id":15,"link":"photo_4221824.html","width":160,"caption":"","height":107});
															thumbnails[7840415] = clik.newPhoto({"id":7840415,"src":"Maria_Wedding_fv_thumb.jpg","galleries_id":250370,"server_id":15,"link":"photo_7840415.html","width":160,"caption":"","height":111});
															thumbnails[7930477] = clik.newPhoto({"id":7930477,"src":"Marias_Wedding__thumb.jpg","galleries_id":250370,"server_id":15,"link":"photo_7930477.html","width":160,"caption":"","height":107});
															thumbnails[7851471] = clik.newPhoto({"id":7851471,"src":"Shonas_Wedding_thumb.jpg","galleries_id":250370,"server_id":15,"link":"photo_7851471.html","width":160,"caption":"","height":109});
															thumbnails[4346246] = clik.newPhoto({"id":4346246,"src":"Jade_09_thumb.jpg","galleries_id":250370,"server_id":15,"link":"photo_4346246.html","width":160,"caption":"","height":107});
															thumbnails[7840561] = clik.newPhoto({"id":7840561,"src":"makeover_fv_thumb.jpg","galleries_id":250370,"server_id":15,"link":"photo_7840561.html","width":160,"caption":"","height":109});
															thumbnails[7930362] = clik.newPhoto({"id":7930362,"src":"Pippa_thumb.jpg","galleries_id":250370,"server_id":15,"link":"photo_7930362.html","width":160,"caption":"","height":107});
															thumbnails[8123859] = clik.newPhoto({"id":8123859,"src":"hannahlewis_wed_11_thumb.jpg","galleries_id":250370,"server_id":15,"link":"photo_8123859.html","width":160,"caption":"","height":106});
															thumbnails[8123864] = clik.newPhoto({"id":8123864,"src":"hannahlewis_wed_11_3_thumb.jpg","galleries_id":250370,"server_id":15,"link":"photo_8123864.html","width":160,"caption":"","height":107});
															thumbnails[7930385] = clik.newPhoto({"id":7930385,"src":"Marys_wedding_thumb.jpg","galleries_id":250370,"server_id":15,"link":"photo_7930385.html","width":160,"caption":"","height":108});
															thumbnails[7930407] = clik.newPhoto({"id":7930407,"src":"Leanne_Wedding_thumb.jpg","galleries_id":250370,"server_id":15,"link":"photo_7930407.html","width":160,"caption":"","height":109});
															thumbnails[4818296] = clik.newPhoto({"id":4818296,"src":"Beauty1_thumb.jpg","galleries_id":245496,"server_id":15,"link":"photo_4818296.html","width":160,"caption":"","height":107});
															thumbnails[7262432] = clik.newPhoto({"id":7262432,"src":"Kate_thumb.jpg","galleries_id":250370,"server_id":15,"link":"photo_7262432.html","width":160,"caption":"","height":107});
															thumbnails[7262435] = clik.newPhoto({"id":7262435,"src":"kate_and_partner_thumb.jpg","galleries_id":250370,"server_id":15,"link":"photo_7262435.html","width":160,"caption":"","height":107});
															thumbnails[8065893] = clik.newPhoto({"id":8065893,"src":"pressmenmg003_thumb.jpg","galleries_id":250370,"server_id":15,"link":"photo_8065893.html","width":160,"caption":"","height":107});
															thumbnails[8065895] = clik.newPhoto({"id":8065895,"src":"pressmenmg022_thumb.jpg","galleries_id":250370,"server_id":15,"link":"photo_8065895.html","width":160,"caption":"","height":107});
															thumbnails[8065898] = clik.newPhoto({"id":8065898,"src":"pressmenmg148_thumb.jpg","galleries_id":250370,"server_id":15,"link":"photo_8065898.html","width":160,"caption":"","height":107});
															thumbnails[8065897] = clik.newPhoto({"id":8065897,"src":"pressmenmg031_thumb.jpg","galleries_id":250370,"server_id":15,"link":"photo_8065897.html","width":160,"caption":"","height":107});
															thumbnails[8136366] = clik.newPhoto({"id":8136366,"src":"john__helen_440a_thumb.jpg","galleries_id":250370,"server_id":15,"link":"photo_8136366.html","width":160,"caption":"","height":107});
															thumbnails[8136409] = clik.newPhoto({"id":8136409,"src":"Helens_wedding_thumb.jpg","galleries_id":250370,"server_id":15,"link":"photo_8136409.html","width":160,"caption":"","height":107});
															thumbnails[8736059] = clik.newPhoto({"id":8736059,"src":"Amy_Pointing_thumb.jpg","galleries_id":250370,"server_id":15,"link":"photo_8736059.html","width":160,"caption":"","height":107});
															thumbnails[8791155] = clik.newPhoto({"id":8791155,"src":"Lucy_French_2011_thumb.jpg","galleries_id":250370,"server_id":15,"link":"photo_8791155.html","width":160,"caption":"","height":110});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[250370] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Bridal & Special Occasion","link":"gallery_250370.html","maxRecords":0.0,"photoIDs":[7851162.0,5886432.0,7840651.0,7840686.0,7840703.0,7930686.0,7840415.0,7930477.0,7851471.0,4346246.0,7840561.0,7930362.0,8123859.0,8123864.0,7930385.0,7930407.0,7262432.0,7262435.0,8065893.0,8065895.0,8065898.0,8065897.0,8136366.0,8136409.0,8736059.0,8791155.0],"skipIndex":0,"section_code":"gallery","featured_images":7851162.0,"id":250370,"singleSection":false});				  						galleries[250372] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Fashion Shows","link":"gallery_250372.html","maxRecords":0.0,"photoIDs":[7840734.0,7851244.0,7851387.0,7856086.0,7856114.0,7856136.0,7856158.0,7856250.0,7924119.0,7924126.0,7930608.0,4221731.0,4221766.0,4221821.0,4221824.0],"skipIndex":0,"section_code":"gallery","featured_images":7924119.0,"id":250372,"singleSection":false});				  						galleries[245496] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Photo Shoots","link":"gallery_245496.html","maxRecords":0.0,"photoIDs":[7840324.0,7856451.0,7856621.0,7856659.0,8065932.0,4087698.0,4087706.0,4818296.0],"skipIndex":0,"section_code":"gallery","featured_images":4087706.0,"id":245496,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[3] = '9062673,9058708,9017746,8791155,8736059,8186613,8136409,8136366,8123864,8123859,8090883,8066222,8065932,8065898,8065897,8065895,8065893,7930686,7930608,7930477,7930407,7930385,7930362,7924126,7924119,7856659,7856621,7856451,7856250,7856158,7856136,7856114,7856086,7851471,7851387,7851244,7851162,7840734,7840703,7840686,7840651,7840561,7840415,7840324,7741061,7262435,7262432,5886432,4818296,4346246';
imageSets[243803] = '9058708';
imageSets[1] = '7741061';
imageSets[2] = '7924119,7851162,4087706';
imageSets[243270] = '9017746';
imageSets[243377] = '9062673,8090883';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/HollandLaura/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/HollandLaura/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/HollandLaura/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/HollandLaura/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/HollandLaura/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/HollandLaura/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/HollandLaura/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/HollandLaura/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/HollandLaura/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/HollandLaura/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/HollandLaura/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/HollandLaura/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/HollandLaura/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/HollandLaura/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/HollandLaura/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/HollandLaura/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/HollandLaura/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/HollandLaura/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/HollandLaura/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/HollandLaura/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/HollandLaura/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/HollandLaura/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/HollandLaura/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/HollandLaura/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/HollandLaura/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/HollandLaura/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/HollandLaura/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 = 'Laura Holland Make-up Artist based in Sevenoaks: ' + 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;
	}
}

			

