﻿Event.observe(window,"load",function () {
	$$("#event-articles-menu li").each(function (item) {
		var last=null;
		item.observe("mouseover",function (e) {
			if (last) out(last);
			over(item,e);
			last=item;
		});
		item.observe("mouseout",function (e) {
			if (last) out(last);
		});
	});
	function over(item,e) {
		item.addClassName("over");
	}
	function out(item) {
		item.removeClassName("over");
	}
});
function setShadows() {
	Mantis.Reut.Client.OuterShadow.Apply($("contentMain"),4,8);
	if ($("contentBanners")) Mantis.Reut.Client.OuterShadow.Apply($("contentBanners"),6,8);
}
function finishFlash() {
	if (finishFlash.called) return;
	finishFlash.called=true;
	$("flash-intro").hide();
	$("header").removeClassName("hidden");
	$("textual-content").removeClassName("hidden").setOpacity(0);
	new Effect.Appear($("textual-content"),{duration:.5,afterFinish:function () {
		Cookies.set("events-flash-"+Mantis.Reut.Client.Language.Culture,1);
	}});
	setShadows();
}
$dl(function () {
	if (Cookies.get("events-flash-"+Mantis.Reut.Client.Language.Culture)) finishFlash();
});
function needToDrawFlash() {
	return !Cookies.get("events-flash-"+Mantis.Reut.Client.Language.Culture);
}
