// init

$(document).ready(function() {
$(".containerall").css("height", $(document).height());
$(".mainContainer").css("height", $(document).height());
fixScrollingBG()
    $("#topmenu li").each(function() {
		    $(this).mouseover(function () {
		        if (!$(this).hasClass("stay")) {
		            if ($(this).hasClass("first")) {
		                $(this).addClass("firstactive");
		            } else {
    			        $(this).addClass("active");
    		        }
    		    }
		    });
		    $(this).mouseout(function () {
			    if (!$(this).hasClass("stay")) {
			        if ($(this).hasClass("first")) {
			            $(this).removeClass("firstactive");
			        } else {
				        $(this).removeClass("active");
				    }
			    }
		    });
		    $(this).click(function () {
			    var url = $(this).find("a").attr("href");
			    location.href=url;
		    });
	    });
});

$(window).resize(function() {
	 fixScrollingBG();
});

function fixScrollingBG() {
$(".containerall").css("height", $(document).height());
$(".mainContainer").css("height", $(document).height());
}

if ($.browser.msie && $.browser.version < 7) {
	alert('YOU FAIL GET FIREFOX!');
} else { }
