$(document).ready(function() {	
    var heightRight = $("#wrapper>#otherArticles").height();
    $("#wrapper>#articleWrapper>#articleContent").css({ "margin-top": -(heightRight+15) });
	
  	$("body #top #menu li.sub ul").hide();
    $("body #top #menu li.active ul").show();
    
    
    if ( $(".standardSite .leftSite").height()>$(".standardSite .rightSite").height()) {
    	$(".standardSite .rightSite").css({ "height": $(".standardSite .leftSite").height()+45 });
    } 
    
    $("#schedule .displayMore").hide();
    
	
	$(".showMore").click(function() {
		$(".displayMore").toggle(400);
		return false;
	});
    
    $("body #top #menu li.sub").hover(function() {
    	if ($("body #top #menu li#arch ul:visible")) {
    		$("body #top #menu li#arch ul").hide();
    	}
        $(this).children('ul').show();
        $(this).addClass('active');
    }, function() {     	
        $(this).children('ul').hide();
        $(this).removeClass('active');
        if ($("body #top #menu li#arch ul:visible")) {
    		$("body #top #menu li#arch ul").show();
    		$("body #top #menu li#arch").addClass('active');
    	}
    	
    });
    
    $('#sInformacje').click(function() {
    	$('#showInformacje').show();
    	
    	$('#showUczelnieGranica').hide();
		$('#showUczelniePolska').hide();
		
		$('#sInformacje').addClass("active");
		$('#sUczelnieGranica').removeClass("active");
		$('#sUczelniePolska').removeClass("active");
		return false;
  	});
  	
    $('#sUczelniePolska').click(function() {
    	$('#showInformacje').hide();
    	$('#showUczelnieGranica').hide();
		$('#showUczelniePolska').show();
		$('#sUczelniePolska').addClass("active");
		$('#sUczelnieGranica').removeClass("active");
		$('#sInformacje').removeClass("active");
		return false;
  	});
  	
  	$('#sUczelnieGranica').click(function() {
    	$('#showInformacje').hide();
    	$('#showUczelnieGranica').show();
		$('#showUczelniePolska').hide();
		
		
		$('#sUczelnieGranica').addClass("active");
		$('#sUczelniePolska').removeClass("active");
		$('#sInformacje').removeClass("active");
		return false;
  	});
    
    setTimeout(function(){ jQuery("#advLeft").css("top",jQuery("#barHorizontal")[0].offsetTop);},1000);
}); 

var PREV='today';
function changeDisplay(id) 
{
	if (PREV) {
		PREV = document.getElementById(PREV);
		PREV.style.display = 'none';
	} 

	PREV = id;
	document.getElementById(PREV).style.display = 'block';
}



