$(document).ready(function() {
	if ($(window).height() <= 700) {		
		$("#index_news").css("position","absolute");
		$("#index_news").css("top","208px");
		$("body").css("height","700px");
	}
        $(window).resize(function(){
        	if ($(window).height() <= 700) {        		
        		$("#index_news").css("position","absolute");
        		$("#index_news").css("top","208px");
        		$("body").css("height","700px");
        	}          
        	else {
        		$("#index_news").css("position","absolute");
        		$("#index_news").css("top","30%");
        		$("body").css("height","100%");        		
        	}
        });
        $("#index_news_small").mouseover(function(){
            hideAll();
            $("#news_content").show();
            $("#logo_bottom_text").slideUp("slow");
        });
        $("#index_routes_small").mouseover(function(){
            hideAll();
            $("#routes_content").show();
            $("#logo_bottom_text").slideUp("slow");
        });

        $("#index_texts_small").mouseover(function(){
            hideAll();
            $("#texts_content").show();
            $("#logo_bottom_text").slideUp("slow");
        });
        $("#index_collections_small").mouseover(function(){
            hideAll();
            $("#collections_content").show();
            $("#logo_bottom_text").slideUp("slow");
        });

        $("#logo_bottom").mouseover(function(){
                  hideAll();
                  $("#logo_bottom_text").slideDown("slow");
        });
        $("#logo_image").mouseover(function(){
                  hideAll();
                  $("#logo_bottom_text").slideDown("slow");
        });
        $("body").click(function(){
                  hideAll();
                  $("#logo_bottom_text").slideUp("slow");
        });
        $("#hide_block").mouseover(function(){
                  hideAll();
                  $("#logo_bottom_text").slideUp("slow");
        });
        $("#header").mouseover(function(){
                  hideAll();
        });
        $("#left_wing").mouseover(function(){
                  hideAll();
                  $("#logo_bottom_text").slideUp("slow");
        });
        $("#right_wing").mouseover(function(){
                  hideAll();
                  $("#logo_bottom_text").slideUp("slow");
        });
        $("#main_menu").mouseover(function(){
                  $("#logo_bottom_text").slideUp("slow");
        });
});

function hideAll()
{
	$("#news_content").hide();
	$("#routes_content").hide();
	$("#texts_content").hide();
	$("#collections_content").hide();
}
