
function placefooter(divs)
{
	var i, l=0, ll=0;

	var argv = placefooter.arguments;
	var argc = argv.length;

	for (i=0; i<argc; i++)
	{
		ll = $("#" + argv[i])[0].scrollHeight;
		if (ll>l) { l=ll; }
	}

	var fo = $("#footer");
	fo.css("top", (l + 90) + "px");
	fo.css("visibility", "visible");
}


function do_rellenos_index()
{
// 	var a = document.getElementById('contingut1').scrollHeight;
// 	var b = document.getElementById('menu_esq').scrollHeight;
// 	if (b>a) { a=b; }
// 	var fo = document.getElementById('c2relleno');
// 	fo.style.height = (a - fo.offsetTop) + "px";
// 	var fo2 = document.getElementById('menrelleno');
// 	fo2.style.height = (a - fo2.offsetTop) + "px";
}

function do_rellenos_serv()
{
// 	var a = document.getElementById('contingut').scrollHeight;
// 	var b = document.getElementById('menu_esq').scrollHeight;
// 	if (b>a) { a=b; }
// 	var fo2 = document.getElementById('menrelleno');
// 	var c= (a - fo2.offsetTop);
// 	if (c<=0) { b=0; }
// 	fo2.style.height = c + "px";
}



$(document).ready(function() {
	
	$("#menu_esq h1:first").css("margin-top","0px");
	
	$("#menu_esq h1").next().hide();
	$("#menu_esq h1:first + ul").show();
	
	$("#menu_esq h1").click(function() {
		var n = $(this).next();
		if (!n.is(':visible'))
		{
			$("#menu_esq ul:visible").slideUp('normal');
			n.slideDown('normal');
		}
// 		$("#menu_esq h1").next().hide();
// 		$(this).next().slideToggle("slow");

	});

// 	$("#menu_esq").accordion({ header: 'h1' });

	// POEMA
	
	$(".poemaimg").mousemove(function(e) {
		var d = $(".hidden_poema");
		d.css("display", "block");
		//d.css("top", "10px");
		//d.css("left", "20px");
		d.css("top", (e.pageY + 20) + "px");
		d.css("left", (e.pageX - 400) + "px");
	});

	$(".poemaimg").mouseout(function(e) {
		var d = $(".hidden_poema");
		d.css("display", "none");
	});


	$(".instants").mousemove(function(e) {
		var d = $(".hidden_instants");
		d.css("display", "block");
		//d.css("top", "10px");
		//d.css("left", "20px");
		d.css("top", (e.pageY + 20) + "px");
		d.css("left", (e.pageX - 400) + "px");
	});

	$(".instants").mouseout(function(e) {
		var d = $(".hidden_instants");
		d.css("display", "none");
	});


});













// function do_index()
// {
// 	//placenots();
// 	placefooter("contingut1","menu_esq");
// 	do_rellenos_index();
// }
/*
function do_serv()
{
	placefooter("contingut","menu_esq");
	do_rellenos_serv();
}

function do_nots()
{
	placefooter("not_c1","not_cat");
}

function do_nots2()
{
	placefooter("nots_cont");
}*/
