var tempContent;
var thumbInfo = true;

$(document).ready(function() {
	$(".thumbnail").hover(
	    thumbnailHover,
	    thumbnailRelease
	);

	$('#history_navigation a').removeAttr('href');
	$('#history_navigation a').click(function () {
		parent.frames[1].history.back();
	});

	$("a.fancybox").fancybox();
});

thumbnailHover = function () {
	if (!$(this).hasClass('no_thumbnail_info')) {
		tempContent = $('#footer_content').children();
		$('#footer_content').empty();
		$('#footer_content').append($(this).attr('title'));
		$(this).removeAttr('title');
	}

	$('.thumbnail').not('#' +  $(this).attr('id')).fadeTo(1, 0.5);
}

thumbnailRelease = function () {
	$('.thumbnail').not('#' +  $(this).attr('id')).fadeTo(1, 1);

	if (!$(this).hasClass('no_thumbnail_info')) {
		$(this).attr('title', $('#footer_content').html());
		$('#footer_content').empty();
		$('#footer_content').append(tempContent);
	}
}
