var visinnhold = 0;

function ballance() {
	$("#venstre").height((parseInt($("#hoved").innerHeight()) + 60));
	$("#hoyre").height((parseInt($("#hoved").innerHeight()) + 80));
	}
function anchorUp () {
	$('#hoved h2').each(function(tick){
	var nyLink = ('<a href="#' + tick + '">&bull; ' + $(this).html() + '<\/a><br>');
	$('#innhold #detaljer').append(nyLink);
	$(this).prepend('<a name="' + tick + '"><\/a>');
	visinnhold = 1; }) ;
	$('#innhold H3').click(function() { $('#innhold P').slideDown(); })
	if(visinnhold) { $('#innhold').show(); }
	}
function noter() {
	$('.noter').each(function() {
		var notearr = $(this).html().split(/<br>/ig);
		// alert(notearr.length);
		for(var i = 0; i < notearr.length; i++) {
			if (/(\d+)\.?\s+(.*)/.test(notearr[i])) {
				noter[RegExp.$1] = RegExp.$2;
				// alert(RegExp.$1 + ": " + RegExp.$2);
				}
			// alert(notearr[i]);
			}
		});
	// $('.note').each(function() { $(this).click(function() { alert(noter[$(this).html()]); } )} );
	
	$('.note').each(function() { $(this).attr("title", noter[$(this).html()]); } );
	
	}
