function initgallery() {
	$('a').each(function() {
		if (this.getAttribute('href') && (this.getAttribute('rel') == 'slide')){
			this.onclick = function () {
				$(".med").toggle();
				$(".med").html('<a href="img/hb_lg'+this.getAttribute("id")+'.jpg"><img src="'+this.href+'" alt="'+this.getAttribute("title")+'" title="'+this.getAttribute("title")+' >> Click for full size" /></a>');
				setTimeout("$('.med').fadeIn('slow')", 2000);
				return false;
			}
		}
	});
	
	var allThumbs = $("#thumbs a").get();
	thumbLength = allThumbs.length;
	tOffset = 0;
}

// Script adapted from www.kellishaver.com/slideshow2


	
	 
	