function InitNavigationMenu()
{
	var navigation = $(".navigation.opened");
	if (navigation.length == 0) //if opened navigation is not requested, adds interactivity
	{
		var node = $(".navigation .node").not(".selected"); //for all nodes except selected
		node.addClass("closed");
		var node = $(".navigation .node"); //for all nodes
		node.click(function (e) {
			$($(this).children("ul")[0]).slideToggle("fast");
			$(this).toggleClass("closed");
			e.stopPropagation();
		});
		$("a").click(function (e) {
			e.stopPropagation();
		});
		$(".leaf").click(function (e) {
			e.stopPropagation();
		});
	}
}

$(document).ready(function () {
		InitNavigationMenu();
});	