﻿$(function () {
	// hide subnavigation if main navi is hovered
	$("#mainNavi > ul > li > a")
		.mouseenter(function () {
			$("#subNavi").addClass("invisible");
		})
		.mouseleave(function () {
			$("#subNavi").removeClass("invisible");
		});

	// size = width of upload fields (does not take css in firefox)
	$(".indentPartner .EditingFormTable input[type=file]").attr("size", 50);

	// rotating banner
	(function () {
		var bannerCount = $(".g-3 .rotatingBanner ul li").length,
			newBanner = oldBanner = 0;
		if (bannerCount > 1) {
			setInterval(function () {
				oldBanner = newBanner;
				newBanner = parseInt(bannerCount * Math.random());
				$(".g-3 .rotatingBanner ul li").eq(oldBanner).slideUp();
				$(".g-3 .rotatingBanner ul li").eq(newBanner).slideDown();
			}, 4000);
		}
	})();
});

// return scrollTop of page to silverlight
function getY() {
	return $(window).scrollTop();
}
function getWindowHeight() {
	return $(window).height();
}

//
function goB2T(){
	return $(window).scrollTop(0);
}
