jQuery(function() {
	$("#content a.zoomable, #content div.figure a.image:has(.zoom)").fancybox({
		zoomOpacity: true,
		overlayShow: false,
		zoomSpeedIn: 500,
		zoomSpeedOut: 500
	});

	$("#content a.presentation").addClass("iframe").fancybox({
		zoomOpacity: false,
		overlayShow: false,
		zoomSpeedIn: 0,
		zoomSpeedOut: 0,
		frameWidth: 600,
		frameHeight: 394,
		callbackOnClose: function () {
			$("#fancy_content").empty()
		}
	});

	$.fn.hoverClass = function (className) {
		return this.each(function () {
			$(this).hover(
				function () { $(this).addClass(className) },
				function () { $(this).removeClass(className) }
			);
		})
	}

	if ($.browser.msie && parseInt($.browser.version) <= 6) {
		$("#menu li.d1").hoverClass("d1-hover")
		$("#menu li.d1 ul.d2 li.d2:first-child").addClass("d2-first-child")
		$("#menu a.d1 img").pngFixImage()
		$("#content div.figure img.zoom").pngFixImage()
	}
});

