$(document).ready(function(){
	$("#sidebar .nav_block.hashover").css("cursor","pointer");
	$("#sidebar .nav_block").hoverIntent(makeTall,makeShort);
	if($("#sidebar").height()>$("#content").height()){
		var lastBlockInner = $("#content .content_block:last-child .block_inner");
		var diff = $("#sidebar").height()-lastBlockInner.height();
		diff += 150;
		lastBlockInner.css("padding-bottom",diff+"px");
	}
	$("#content .content_block").mouseout(function(){
		$(this).removeAttr('scrolledto');
	});
	$('#content').localScroll({
		target: window,
		queue:false,
		duration:1000,
		hash:false,
		axis:'y',
		onAfter: function(div){
			$(div).parents(".content_block").attr('scrolledto',true);
			id = div.id;
			id = '#uid'+id.substr(1,id.length-1);
			$(id).attr('scrolledto',true);
			$(window).scrollTo( '-=100px', 800 );;
			return false;
		}
	})
	$('#content h3').each(function(){
		if(!$(this).children("a").length){
			txt = $(this).html();
			txt = txt.replace(/ö/ig,"oe")
			txt = txt.replace(/ä/ig,"ae")
			txt = txt.replace(/ü/ig,"ue")
			txt = txt.replace(/ss/ig,"ss")
			txt = txt.replace(/\//ig," - ")
			$(this).html(txt);
		}
	})
}); 
function makeTall(){ 
	if(!$(this).hasClass("active"))
		$(".hover",this).slideDown(200); 
	return false;
}
function makeShort(){ 
	if(!$(this).hasClass("active"))
		$(".hover",this).slideUp(1000); 
	return false;
}

