function menu(id,flag)
{
	if (flag == 1)
	{
	var elements = $('#menu>a');
	//$('#submenu').show(); // show menu-container
	$.each(elements, function(i, n)
	{
		$('#menu>a').css("background-position","0px 0px");
	});
  }
  else
  {
		$('#menu>a').css("background-position","0px -92px");
	}
	$('#bt'+id).css("background-position","0px -46px");

	// close submenues
	$('#sm-content>div').hide();
	$('#bt'+id).css("background-position","0px -138px");
	$('.blueline'+id).show();
	$('#white-cont .whiteline'+id).show();
}
function out(id)
{
	$('#submenu').hide(); // hide menu-container
	$('#bt'+id).css("background-position","0px 0px");
	var elements = $('#menu>a');
	$.each(elements, function(i, n)
	{
		$('#menu>a').css("background-position","0px -92px");
	});
}
function revert()
{
	var elements = $('#menu>a');
	$('#submenu').hide();
	$.each(elements, function(i, n)
	{
		$('#menu>a').css("background-position","0px -92px");
	});
}
function showmenu()
{
	var elements = $('#menu>a');
	$('#submenu').show();
	$.each(elements, function(i, n)
	{
		$('#menu>a').css("background-position","0px 0px");
	});
}
function whitem(id)
{
	$('#white-cont>div').hide();
	$('#white-cont').show();
	$('.whiteline'+id).show();
}


var aquaVrHide = Array ();
var aquaVrShow;
var aquaVrTimer;

function aquaFnTimer (paramVrItem) {

	aquaVrTimer = window.setTimeout (function () {

		$("div#" + paramVrItem).unbind ("mouseenter");
		$("div#" + paramVrItem).unbind ("mouseleave");
		$("div#" + paramVrItem).hide ();

	}, 200);
}

function aquaFnPanel (paramVrItem, paramVrCell, paramVrShow) {

	if (paramVrShow) {

		clearTimeout (aquaVrTimer);

		var funcVrLeft = $(paramVrCell).position ().left - $("div#" + paramVrItem).width () + 8;
		var funcVrTop  = $(paramVrCell).position ().top - 10;

		$("div#" + paramVrItem).unbind ("mouseenter");
		$("div#" + paramVrItem).unbind ("mouseleave");
		$("div#" + paramVrItem).bind ("mouseenter", function () { clearTimeout (aquaVrTimer); });
		$("div#" + paramVrItem).bind ("mouseleave", function () { aquaFnTimer (paramVrItem); });
		$("div#" + paramVrItem).css ("left", (funcVrLeft + "px"));
		$("div#" + paramVrItem).css ("top", (funcVrTop + "px"));
		$("div#" + paramVrItem).show ();

		aquaVrHide.push (aquaVrShow);
		aquaVrShow = paramVrItem;

	} else {

		aquaFnTimer (paramVrItem);
	}

	$.each (aquaVrHide, function () {

		if (aquaVrShow != this) {

			$("div#" + this).unbind ("mouseenter");
			$("div#" + this).unbind ("mouseleave");
			$("div#" + this).hide ();
		}
	});

	aquaVrHide = Array ();
}

function HideSplash () {

	$("#splash").hide();
	$("#container").show();
	$("body").css("background","none");
	
}

function ShowSplash () {

	$("#container").hide();
	$("#splash").show();
	$("body").css("background","url(/img/splash/bg.jpg) left top repeat-x #6A6A6A");
	
}


