/*
* Add style to hide the gallery items, as we are being parsed as Javascript
*/
document.write('<style type="text/css">#gallery-area {display: none;}</style>');
/*
* Let the image gallery link do the magic work of displaying the gallery
*/
$(document).ready(function() {
	$('#image-gallery').click(function(event) {
		event.preventDefault();
		event.stopPropagation();
		var firstImage = $('#image-1');
		if (!firstImage) {
			// Do something to say there are no images?
			return;
		}
		var firstLink = firstImage.get(0).parentNode;
		/**
		* thickbox.js could use a small hack for the captions so that URLs
		* can be clickable: default behaviour is to use the caption as
		* the alt tag for the image too, but this means the alt tag has a
		* HTML tag within it
		*/
		tb_show(firstLink.title, firstLink.href, firstLink.rel);
	});
});
