(new Image()).src = "/images/menu-documents-active.png";
(new Image()).src = "/images/menu-main-active.png";
(new Image()).src = "/images/menu-price-active.png";
(new Image()).src = "/images/menu-exams-active.png";
(new Image()).src = "/images/menu-medcentr-active.png";
(new Image()).src = "/images/menu-schools-active.png";

var hashCache = null;

function anchorTimer() {
	if (location.hash != hashCache) {
		$(".currentAnchor").removeClass("currentAnchor");
		$(location.hash).addClass("currentAnchor");
		hashCache = location.hash;
	}
}

$(function() {
	setInterval(anchorTimer, 500);
	
	$(".branch_search select").each(function() {
		$(this).selectbox();
	});
	
	$(".feedback-form select").each(function() {
		$(this).selectbox();
	});
	
	//$("a.lightbox").lightBox();
	$("a[href*=_big.]").lightBox();
	
	$(".clock").each(function() {
		insertFlash(this, "/flash/clock.swf", 121, 116, {"wmode": "transparent"});
	});
	$(".menu img:not(.menu img.selected)").hover(function() {
		this.src = this.src.replace(".png", "-active.png");
	},
	function() {
		this.src = this.src.replace("-active.png", ".png");
	});
	
	$(".banner-top").each(function() {
		insertFlash(this, "/flash/sedova.swf", 239, 148, {"wmode": "transparent"});
	});
	$(".banner-bottom").each(function() {
		insertFlash(this, "/flash/med.swf", 242, 148, {"wmode": "transparent"});
	});
	
	$(".notify").fadeOut(0);
	$(".clock").mouseover(function() {
		if (jQuery.browser.msie)
			$(".notify").fadeIn(0);
		else
			$(".notify").fadeIn(1500);
	});
})

function showAnnotation() {
		if (jQuery.browser.msie)
			$(".notify").fadeIn(0);
		else
			$(".notify").fadeIn(1500);
}

