window.thumbnails = {};
															thumbnails[8901948] = clik.newPhoto({"id":8901948,"src":"sunflower_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"Sunflower","height":184});
															thumbnails[8654656] = clik.newPhoto({"id":8654656,"src":"Spike_thumb.JPG","galleries_id":243024,"server_id":15,"link":"photo_8654656.html","width":130,"caption":"Spike","height":119});
															thumbnails[8654662] = clik.newPhoto({"id":8654662,"src":"Telescopic_View_1_thumb.jpg","galleries_id":243024,"server_id":15,"link":"photo_8654662.html","width":130,"caption":"Telescopic View","height":173});
															thumbnails[8654674] = clik.newPhoto({"id":8654674,"src":"_DSC5583BDOtter1CAMBOIS_COMP_thumb.jpg","galleries_id":243024,"server_id":15,"link":"photo_8654674.html","width":130,"caption":"Otter","height":98});
															thumbnails[8654676] = clik.newPhoto({"id":8654676,"src":"DSC_7124_036BDWaxwings2010SMALL_thumb.jpg","galleries_id":243024,"server_id":15,"link":"photo_8654676.html","width":130,"caption":"Waxwings","height":98});
															thumbnails[8654679] = clik.newPhoto({"id":8654679,"src":"_DSC2843_122BDSwallow1SMALL_thumb.jpg","galleries_id":243024,"server_id":15,"link":"photo_8654679.html","width":130,"caption":"Swallows","height":98});
															thumbnails[8654684] = clik.newPhoto({"id":8654684,"src":"Beach_Huts_thumb.jpg","galleries_id":243024,"server_id":15,"link":"photo_8654684.html","width":130,"caption":"Beach Huts","height":54});
															thumbnails[8654685] = clik.newPhoto({"id":8654685,"src":"In_safe_hands_thumb.jpg","galleries_id":243024,"server_id":15,"link":"photo_8654685.html","width":130,"caption":"In Safe Hands","height":85});
															thumbnails[8654686] = clik.newPhoto({"id":8654686,"src":"The_Kite_Surfer_thumb.jpg","galleries_id":243024,"server_id":15,"link":"photo_8654686.html","width":130,"caption":"","height":68});
															thumbnails[8654687] = clik.newPhoto({"id":8654687,"src":"Best_Foot_Forward_thumb.jpg","galleries_id":243024,"server_id":15,"link":"photo_8654687.html","width":130,"caption":"Best Foot Forward","height":90});
															thumbnails[8654688] = clik.newPhoto({"id":8654688,"src":"Making_Memories_thumb.jpg","galleries_id":243024,"server_id":15,"link":"photo_8654688.html","width":130,"caption":"Making Memories","height":58});
															thumbnails[8654689] = clik.newPhoto({"id":8654689,"src":"All_is_Revealed_thumb.jpg","galleries_id":243024,"server_id":15,"link":"photo_8654689.html","width":130,"caption":"All is Revealed","height":195});
															thumbnails[8654691] = clik.newPhoto({"id":8654691,"src":"Oil_Planets_thumb.jpg","galleries_id":243024,"server_id":15,"link":"photo_8654691.html","width":130,"caption":"Oil Planets","height":87});
															thumbnails[8654692] = clik.newPhoto({"id":8654692,"src":"Enchanting_thumb.jpg","galleries_id":243024,"server_id":15,"link":"photo_8654692.html","width":130,"caption":"Enchanting","height":195});
															thumbnails[8654695] = clik.newPhoto({"id":8654695,"src":"Take_me_for_a_Ride_thumb.jpg","galleries_id":243024,"server_id":15,"link":"photo_8654695.html","width":130,"caption":"Take me for a Ride","height":97});
															thumbnails[8654697] = clik.newPhoto({"id":8654697,"src":"Rocky_4_thumb.jpg","galleries_id":243024,"server_id":15,"link":"photo_8654697.html","width":130,"caption":"Rocky 4","height":72});
															thumbnails[8654701] = clik.newPhoto({"id":8654701,"src":"any_old_iron_thumb.jpg","galleries_id":243024,"server_id":15,"link":"photo_8654701.html","width":130,"caption":"Any Old Iron","height":165});
															thumbnails[8654703] = clik.newPhoto({"id":8654703,"src":"Avoch_Harbour_thumb.jpg","galleries_id":243024,"server_id":15,"link":"photo_8654703.html","width":130,"caption":"Avoch Harbour","height":86});
															thumbnails[8654706] = clik.newPhoto({"id":8654706,"src":"Backward_Going_Forward_thumb.jpg","galleries_id":243024,"server_id":15,"link":"photo_8654706.html","width":130,"caption":"Backward Going Forward","height":92});
															thumbnails[8654708] = clik.newPhoto({"id":8654708,"src":"Down__Out_thumb.jpg","galleries_id":243024,"server_id":15,"link":"photo_8654708.html","width":130,"caption":"Down and Out","height":87});
															thumbnails[8654709] = clik.newPhoto({"id":8654709,"src":"The_Entertainer_thumb.jpg","galleries_id":243024,"server_id":15,"link":"photo_8654709.html","width":130,"caption":"The Entertainer","height":184});
															thumbnails[8901589] = clik.newPhoto({"id":8901589,"src":"Leek_Show1_thumb.jpg","galleries_id":243024,"server_id":15,"link":"photo_8901589.html","width":130,"caption":"Leek Show","height":86});
															thumbnails[8901607] = clik.newPhoto({"id":8901607,"src":"The_Border_Terrier_thumb.jpg","galleries_id":243024,"server_id":15,"link":"photo_8901607.html","width":130,"caption":"The Border Terrier","height":109});
															thumbnails[8901652] = clik.newPhoto({"id":8901652,"src":"Moody_Dunstanburgh_-_Places.jpg_thumb.jpg","galleries_id":243024,"server_id":15,"link":"photo_8901652.html","width":130,"caption":"Moody Dunstanburgh","height":73});
															thumbnails[8901667] = clik.newPhoto({"id":8901667,"src":"_DSC0119_This_is_not_Franks_flooring_thumb.jpg","galleries_id":243024,"server_id":15,"link":"photo_8901667.html","width":130,"caption":"This is not Frank's Flooring!","height":127});
															thumbnails[8901669] = clik.newPhoto({"id":8901669,"src":"_DSC0009_An_industrail_sunset_thumb.jpg","galleries_id":243024,"server_id":15,"link":"photo_8901669.html","width":130,"caption":"An Industial Sunset","height":90});
															thumbnails[8901672] = clik.newPhoto({"id":8901672,"src":"_The_Nightwatchman_thumb.JPG","galleries_id":243024,"server_id":15,"link":"photo_8901672.html","width":130,"caption":"The Nightwatchman","height":87});
															thumbnails[8901683] = clik.newPhoto({"id":8901683,"src":"ellington_miner_a_shadow_of_his_former_self_2_thumb.jpg","galleries_id":243024,"server_id":15,"link":"photo_8901683.html","width":130,"caption":"ellington miner a shadow of his former self ","height":80});
															thumbnails[8901685] = clik.newPhoto({"id":8901685,"src":"a_ruined_picture_thumb.jpg","galleries_id":243024,"server_id":15,"link":"photo_8901685.html","width":130,"caption":"A Ruined Picture","height":78});
															thumbnails[8901691] = clik.newPhoto({"id":8901691,"src":"DSC_2837_085Kingfisher2011PDI_thumb.jpg","galleries_id":243024,"server_id":15,"link":"photo_8901691.html","width":130,"caption":"Kingfisher","height":98});
															thumbnails[8901693] = clik.newPhoto({"id":8901693,"src":"DSC_3144Fallowinthemist2011PDI_thumb.jpg","galleries_id":243024,"server_id":15,"link":"photo_8901693.html","width":130,"caption":"Fallow in the Mist","height":98});
															thumbnails[8901696] = clik.newPhoto({"id":8901696,"src":"DSC_3568_158Redstagandhind2011PDI_thumb.jpg","galleries_id":243024,"server_id":15,"link":"photo_8901696.html","width":130,"caption":"Red Stag & Hind","height":173});
															thumbnails[8901726] = clik.newPhoto({"id":8901726,"src":"Early_Morning_at_Bothal_thumb.jpg","galleries_id":243024,"server_id":15,"link":"photo_8901726.html","width":130,"caption":"Early Morning at Bothal","height":85});
															thumbnails[8901736] = clik.newPhoto({"id":8901736,"src":"A_warm_Welcome_thumb.jpg","galleries_id":243024,"server_id":15,"link":"photo_8901736.html","width":130,"caption":"A Warm Welcome","height":195});
															thumbnails[8901749] = clik.newPhoto({"id":8901749,"src":"Dapple_light_thumb.jpg","galleries_id":243024,"server_id":15,"link":"photo_8901749.html","width":130,"caption":"Dappled Light","height":94});
															thumbnails[8901762] = clik.newPhoto({"id":8901762,"src":"Carpet_of_leaves_thumb.jpg","galleries_id":243024,"server_id":15,"link":"photo_8901762.html","width":130,"caption":"Carpet of leaves","height":86});
															thumbnails[8901766] = clik.newPhoto({"id":8901766,"src":"IMG_6045_thumb.jpg","galleries_id":243024,"server_id":15,"link":"photo_8901766.html","width":130,"caption":"","height":144});
															thumbnails[8901767] = clik.newPhoto({"id":8901767,"src":"IMG_7894_thumb.jpg","galleries_id":243024,"server_id":15,"link":"photo_8901767.html","width":130,"caption":"","height":87});
															thumbnails[8901768] = clik.newPhoto({"id":8901768,"src":"greyP4-S2_thumb.jpg","galleries_id":243024,"server_id":15,"link":"photo_8901768.html","width":130,"caption":"","height":104});
															thumbnails[8901777] = clik.newPhoto({"id":8901777,"src":"pic005_edited-2_thumb.jpg","galleries_id":243024,"server_id":15,"link":"photo_8901777.html","width":130,"caption":"Winter's Gibbet","height":97});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[243024] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Members' Photos","link":"gallery.html","maxRecords":0.0,"photoIDs":[8654656.0,8654662.0,8654674.0,8654676.0,8654679.0,8654684.0,8654685.0,8654686.0,8654687.0,8654688.0,8654689.0,8654691.0,8654692.0,8654695.0,8654697.0,8654701.0,8654703.0,8654706.0,8654708.0,8654709.0,8901589.0,8901607.0,8901652.0,8901667.0,8901669.0,8901672.0,8901683.0,8901685.0,8901691.0,8901693.0,8901696.0,8901726.0,8901736.0,8901749.0,8901762.0,8901766.0,8901767.0,8901768.0,8901777.0],"skipIndex":0,"section_code":"gallery","featured_images":"8901777,8901768,8901767,8901766,8901762,8901749,8901736,8901726,8901693,8901691,8901685,8901683,8901672,8901669,8901667,8901652,8901607,8901589,8654709,8654708,8654706,8654703,8654701,8654697,8654695,8654692,8654691,8654689,8654688,8654687,8654686,8654685,8654684,8654676,8654662,8654656","id":243024,"singleSection":true});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '8901948,8901777,8901768,8901767,8901766,8901762,8901749,8901736,8901726,8901693,8901691,8901685,8901683,8901672,8901669,8901667,8901652,8901607,8901589,8654709,8654708,8654706,8654703,8654701,8654697,8654695,8654692,8654691,8654689,8654688,8654687,8654686,8654685,8654684,8654676,8654662,8654656';
imageSets[2] = '8901948,8901777,8901768,8901767,8901766,8901762,8901749,8901736,8901726,8901693,8901691,8901685,8901683,8901672,8901669,8901667,8901652,8901607,8901589,8654709,8654708,8654706,8654703,8654701,8654697,8654695,8654692,8654691,8654689,8654688,8654687,8654686,8654685,8654684,8654676,8654662,8654656';
imageSets[3] = '8901948,8901777,8901768,8901767,8901766,8901762,8901749,8901736,8901726,8901693,8901691,8901685,8901683,8901672,8901669,8901667,8901652,8901607,8901589,8654709,8654708,8654706,8654703,8654701,8654697,8654695,8654692,8654691,8654689,8654688,8654687,8654686,8654685,8654684,8654676,8654662,8654656';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/moffitt/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/moffitt/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/moffitt/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/moffitt/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/moffitt/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/moffitt/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/moffitt/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/moffitt/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/moffitt/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/moffitt/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/moffitt/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/moffitt/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/moffitt/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/moffitt/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/moffitt/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/moffitt/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/moffitt/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/moffitt/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/moffitt/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/moffitt/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/moffitt/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/moffitt/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/moffitt/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/moffitt/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/moffitt/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/moffitt/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/moffitt/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 = 'Ashington Coop Camera Club: ' + 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;
	}
}

			

