if (window.location.hash != '') {
	article_id = parseInt(window.location.hash.substr(1));
	window.location.href = '/gallery/'+article_id+'.html';
}

/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */

$(document).ready(function(){
	
	var current = "selected";
	
	/* - - - - - - - - - - - - - - - - - - - - - */
	
	$("ul.thumbnails li a").mouseover(
		function () {
			var thumbid = $(this).parent().get(0).id;
			if (current != thumbid) {
				$("div.main div#"+current).fadeOut("slow");
				$("div.main div#"+thumbid).fadeIn("slow");
				current = thumbid;
			}
		}
	);
	
	/* - - - - - - - - - - - - - - - - - - - - - */
	
	$("body.gallery ul.thumbnails li a").click(
		function () {
			var linkid = this.id;
			window.location.hash = linkid;
			return false;
		}
	);
	
	/* - - - - - - - - - - - - - - - - - - - - - */
});