window.thumbnails = {};
															thumbnails[8942214] = clik.newPhoto({"id":8942214,"src":"DSC_8010_small_thumb.jpg","galleries_id":471122,"server_id":32,"link":"photo_8942214.html","width":130,"caption":"","height":86});
															thumbnails[8942263] = clik.newPhoto({"id":8942263,"src":"DSC_8025_small_thumb.jpg","galleries_id":471122,"server_id":32,"link":"photo_8942263.html","width":130,"caption":"","height":196});
															thumbnails[8942272] = clik.newPhoto({"id":8942272,"src":"DSC_8047_small_thumb.jpg","galleries_id":471122,"server_id":32,"link":"photo_8942272.html","width":130,"caption":"","height":86});
															thumbnails[8942288] = clik.newPhoto({"id":8942288,"src":"DSC_8063_small_thumb.jpg","galleries_id":471122,"server_id":32,"link":"photo_8942288.html","width":130,"caption":"","height":86});
															thumbnails[8942332] = clik.newPhoto({"id":8942332,"src":"claire_64_thumb.jpg","galleries_id":471117,"server_id":32,"link":"photo_8942332.html","width":130,"caption":"","height":86});
															thumbnails[8942548] = clik.newPhoto({"id":8942548,"src":"DSC_6855_1a_thumb.jpg","galleries_id":471117,"server_id":32,"link":"photo_8942548.html","width":130,"caption":"","height":86});
															thumbnails[8951984] = clik.newPhoto({"id":8951984,"src":"DSC_78931_thumb.jpg","galleries_id":334152,"server_id":32,"link":"photo_8951984.html","width":130,"caption":"","height":196});
															thumbnails[8951985] = clik.newPhoto({"id":8951985,"src":"DSC_7667_thumb.jpg","galleries_id":471119,"server_id":32,"link":"photo_8951985.html","width":130,"caption":"","height":196});
															thumbnails[8952034] = clik.newPhoto({"id":8952034,"src":"DSC_6739_thumb.jpg","galleries_id":471117,"server_id":32,"link":"photo_8952034.html","width":130,"caption":"","height":196});
															thumbnails[8952080] = clik.newPhoto({"id":8952080,"src":"A_67-2_small_thumb.jpg","galleries_id":471117,"server_id":32,"link":"photo_8952080.html","width":130,"caption":"","height":196});
															thumbnails[8952082] = clik.newPhoto({"id":8952082,"src":"c_11_thumb.jpg","galleries_id":471119,"server_id":32,"link":"photo_8952082.html","width":130,"caption":"","height":86});
															thumbnails[8952107] = clik.newPhoto({"id":8952107,"src":"DSC_7829_small_thumb.jpg","galleries_id":471122,"server_id":32,"link":"photo_8952107.html","width":130,"caption":"","height":196});
															thumbnails[8952112] = clik.newPhoto({"id":8952112,"src":"DSC_7847_small_thumb.jpg","galleries_id":471122,"server_id":32,"link":"photo_8952112.html","width":130,"caption":"","height":86});
															thumbnails[8952210] = clik.newPhoto({"id":8952210,"src":"DSC_7930_thumb.jpg","galleries_id":334152,"server_id":32,"link":"photo_8952210.html","width":130,"caption":"","height":86});
															thumbnails[8966019] = clik.newPhoto({"id":8966019,"src":"_DSC0005_small_thumb.jpg","galleries_id":334152,"server_id":32,"link":"photo_8966019.html","width":130,"caption":"","height":196});
															thumbnails[8966022] = clik.newPhoto({"id":8966022,"src":"_DSC0048_small_thumb.jpg","galleries_id":334152,"server_id":32,"link":"photo_8966022.html","width":130,"caption":"","height":196});
															thumbnails[8966024] = clik.newPhoto({"id":8966024,"src":"CP_5_thumb.jpg","galleries_id":334152,"server_id":32,"link":"photo_8966024.html","width":130,"caption":"","height":196});
															thumbnails[8966049] = clik.newPhoto({"id":8966049,"src":"DSC_0060EA_small_thumb.jpg","galleries_id":334152,"server_id":32,"link":"photo_8966049.html","width":130,"caption":"","height":163});
															thumbnails[8966067] = clik.newPhoto({"id":8966067,"src":"jpg_1-11-2_E_2_small_thumb.jpg","galleries_id":334152,"server_id":32,"link":"photo_8966067.html","width":130,"caption":"","height":163});
															thumbnails[8966151] = clik.newPhoto({"id":8966151,"src":"NL_177_small_thumb.jpg","galleries_id":471887,"server_id":32,"link":"photo_8966151.html","width":130,"caption":"","height":196});
															thumbnails[8966174] = clik.newPhoto({"id":8966174,"src":"NL_68_thumb.jpg","galleries_id":471887,"server_id":32,"link":"photo_8966174.html","width":130,"caption":"","height":196});
															thumbnails[8966175] = clik.newPhoto({"id":8966175,"src":"NL_255_small_thumb.jpg","galleries_id":471887,"server_id":32,"link":"photo_8966175.html","width":130,"caption":"","height":86});
															thumbnails[8966177] = clik.newPhoto({"id":8966177,"src":"RJ_106_small_thumb.jpg","galleries_id":471887,"server_id":32,"link":"photo_8966177.html","width":130,"caption":"","height":86});
															thumbnails[8966181] = clik.newPhoto({"id":8966181,"src":"RJ_68_small_thumb.jpg","galleries_id":471887,"server_id":32,"link":"photo_8966181.html","width":130,"caption":"","height":86});
															thumbnails[8966226] = clik.newPhoto({"id":8966226,"src":"DSC_5893_thumb.jpg","galleries_id":334152,"server_id":32,"link":"photo_8966226.html","width":130,"caption":"","height":196});
															thumbnails[8966228] = clik.newPhoto({"id":8966228,"src":"_DSC0067_small_thumb.jpg","galleries_id":471887,"server_id":32,"link":"photo_8966228.html","width":130,"caption":"","height":196});
															thumbnails[8966232] = clik.newPhoto({"id":8966232,"src":"_DSC0217_small_thumb.jpg","galleries_id":471887,"server_id":32,"link":"photo_8966232.html","width":130,"caption":"","height":86});
															thumbnails[8966237] = clik.newPhoto({"id":8966237,"src":"_DSC0223_small_thumb.jpg","galleries_id":471887,"server_id":32,"link":"photo_8966237.html","width":130,"caption":"","height":86});
															thumbnails[8969118] = clik.newPhoto({"id":8969118,"src":"NL_269_SMALL_thumb.jpg","galleries_id":471887,"server_id":32,"link":"photo_8969118.html","width":130,"caption":"","height":86});
															thumbnails[8972586] = clik.newPhoto({"id":8972586,"src":"boat_scene_1_1_of_1_small_thumb.jpg","galleries_id":472426,"server_id":32,"link":"photo_8972586.html","width":130,"caption":"","height":86});
															thumbnails[8972589] = clik.newPhoto({"id":8972589,"src":"20110504-_DSC0007_small_thumb.jpg","galleries_id":472426,"server_id":32,"link":"photo_8972589.html","width":130,"caption":"","height":87});
															thumbnails[8972593] = clik.newPhoto({"id":8972593,"src":"20110504-_DSC0001_small_thumb.jpg","galleries_id":472426,"server_id":32,"link":"photo_8972593.html","width":130,"caption":"","height":86});
															thumbnails[8972596] = clik.newPhoto({"id":8972596,"src":"jpg_1-12_small_thumb.jpg","galleries_id":472426,"server_id":32,"link":"photo_8972596.html","width":130,"caption":"","height":104});
															thumbnails[8972597] = clik.newPhoto({"id":8972597,"src":"jpg_1-18_small_thumb.jpg","galleries_id":472426,"server_id":32,"link":"photo_8972597.html","width":130,"caption":"","height":104});
															thumbnails[8972611] = clik.newPhoto({"id":8972611,"src":"_DSC0024_small_thumb.jpg","galleries_id":472426,"server_id":32,"link":"photo_8972611.html","width":130,"caption":"","height":196});
															thumbnails[8972613] = clik.newPhoto({"id":8972613,"src":"jpg_1-19_small_thumb.jpg","galleries_id":472426,"server_id":32,"link":"photo_8972613.html","width":130,"caption":"","height":104});
															thumbnails[8972623] = clik.newPhoto({"id":8972623,"src":"jpg_1-23_thumb.jpg","galleries_id":472426,"server_id":32,"link":"photo_8972623.html","width":130,"caption":"","height":104});
															thumbnails[8972627] = clik.newPhoto({"id":8972627,"src":"jpg_1-22_thumb.jpg","galleries_id":472426,"server_id":32,"link":"photo_8972627.html","width":130,"caption":"","height":104});
															thumbnails[9012722] = clik.newPhoto({"id":9012722,"src":"DSC_9183_small_thumb.jpg","galleries_id":471117,"server_id":32,"link":"photo_9012722.html","width":130,"caption":"Bex","height":196});
															thumbnails[9012731] = clik.newPhoto({"id":9012731,"src":"DSC_9187_small_thumb.jpg","galleries_id":471117,"server_id":32,"link":"photo_9012731.html","width":130,"caption":"Bex","height":196});
															thumbnails[9012745] = clik.newPhoto({"id":9012745,"src":"DSC_9572_small_thumb.jpg","galleries_id":471117,"server_id":32,"link":"photo_9012745.html","width":130,"caption":"Darshana","height":196});
															thumbnails[9012767] = clik.newPhoto({"id":9012767,"src":"DSC_9671_smal_thumb.jpg","galleries_id":471117,"server_id":32,"link":"photo_9012767.html","width":130,"caption":"Darshana","height":196});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[471119] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Christenings","link":"gallery_471119.html","maxRecords":0.0,"photoIDs":[8951985.0,8952082.0],"skipIndex":0,"section_code":"gallery","featured_images":"8952082,8951985","id":471119,"singleSection":false});				  						galleries[471122] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Couples","link":"gallery_471122.html","maxRecords":0.0,"photoIDs":[8942214.0,8942263.0,8942272.0,8942288.0,8952107.0,8952112.0],"skipIndex":0,"section_code":"gallery","featured_images":"8952112,8952107,8942288,8942272,8942263,8942214","id":471122,"singleSection":false});				  						galleries[471117] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Models","link":"gallery_471117.html","maxRecords":0.0,"photoIDs":[8942332.0,8942548.0,8952034.0,8952080.0,9012722.0,9012731.0,9012745.0,9012767.0],"skipIndex":0,"section_code":"gallery","featured_images":"9012767,9012745,9012731,9012722,8952080,8952034,8942548,8942332","id":471117,"singleSection":false});				  						galleries[334152] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Portraits","link":"gallery_334152.html","maxRecords":0.0,"photoIDs":[8951984.0,8952210.0,8966019.0,8966022.0,8966024.0,8966049.0,8966067.0,8966226.0],"skipIndex":0,"section_code":"gallery","featured_images":"8966226,8966067,8966049,8966024,8966022,8966019,8952210,8951984","id":334152,"singleSection":false});				  						galleries[472426] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Product Photography","link":"gallery_472426.html","maxRecords":0.0,"photoIDs":[8972586.0,8972589.0,8972593.0,8972596.0,8972597.0,8972611.0,8972613.0,8972623.0,8972627.0],"skipIndex":0,"section_code":"gallery","featured_images":"8972627,8972623,8972613,8972611,8972597,8972596,8972593,8972589,8972586","id":472426,"singleSection":false});				  						galleries[471887] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Weddings","link":"gallery_471887.html","maxRecords":0.0,"photoIDs":[8966151.0,8966174.0,8966175.0,8966177.0,8966181.0,8966228.0,8966232.0,8966237.0,8969118.0],"skipIndex":0,"section_code":"gallery","featured_images":"8969118,8966237,8966232,8966228,8966181,8966177,8966175,8966174,8966151","id":471887,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '9012731,8966175,8952210,8942548,8942332,8942288';
imageSets[3] = '8952210,8942332,8942288';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/timmy/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/timmy/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/timmy/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/timmy/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/timmy/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/timmy/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/timmy/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/timmy/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/timmy/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/timmy/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/timmy/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/timmy/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/timmy/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/timmy/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/timmy/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/timmy/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/timmy/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/timmy/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/timmy/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/timmy/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/timmy/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/timmy/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/timmy/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/timmy/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/timmy/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/timmy/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/timmy/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 = 'www.tim mitchell photography.com: ' + 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>Tim Mitchell </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;
	}
}

			

