$(document).ready(function(){
	$("#logo").css({"cursor":"pointer", "width":"350px"});
	$("#logo").click(function(){
		window.location = "/choice";
	});
	$("#logo .sintsalvator").hover(function(){
		$("body").css({"background-position":"left center"});
	});
	$("#logo .olv").hover(function(){
		$("body").css({"background-position":"right center"});
	});
	var t=0;
	var t_elem;
	$(".col3").each(function () {
		if ( $(this).outerHeight() > t ) {
			t_elem=this;
			t=$(this).outerHeight();
		}
	});
	$("#top .middle").height(t-10);
	
	$("#menu ul li").hover(function() { 
		var p = $("a", this);
		var position = p.position();
		$("ul", this).css({"top":position.top+24,"left":position.left+2,"display":"block"});
		p.addClass("hover");
	});
	$("#menu ul li").mouseleave(function() { 
		$("ul", this).hide();
		$("a", this).removeClass("hover");
	});
});

