function dom_init() {
	
	$('a[href$="#top"]')
		.removeAttr("href")
	//	.attr('href', 'javascript:;')
		.css({cursor:'pointer'})
		.click(function() {
			$('html, body').animate({scrollTop:0},250)
		});  
		
	$("a[rel='colorbox']").colorbox();

	$('.mailer').each(function() {
		e = ($(this).attr('rel').replace('/','@'))
		$(this).attr('href', 'mailto:' + e);
		$(this).text(e);
		$(this).removeAttr('rel');
	});
	
	var isScrolling = false;
	var imgLength = 123;
	
	//mit schroeder unterwegs img-scroll
	$('.imgScrollLeft').click(function(){
								
		var sliderBox = $('#bildslider');
		var anzahlBilder = $('#bildslider a').length;
		var pos = sliderBox.css('margin-left');
		pos = parseInt(pos.replace("px",""));
		
		if (pos < 0 && isScrolling == false)
		{
			var imgScrollRight = $('.imgScrollRight img:first');
			if (imgScrollRight.attr('src') == '/bitmaps/btnNextInaktiv.gif')
				imgScrollRight.attr('src','/bitmaps/btnNext.gif');
			isScrolling = true;
			sliderBox.animate({marginLeft: '+='+imgLength},300,'linear',function(){
				isScrolling = false;
				//alert((pos+imgLength)+' >= '+0);
				if ((pos+imgLength) >= 0)
					$('.imgScrollLeft img:first').attr('src','/bitmaps/btnPrevInaktiv.gif');
			});
		}
		
		return false;
	});
	
	$('.imgScrollRight').click(function(){
		var sliderBox = $('#bildslider');
		var anzahlBilder = parseInt($('#bildslider a').length);
		var pos = sliderBox.css('margin-left');
		pos = parseInt(pos.replace("px",""));
		if (pos > (-1*imgLength*(anzahlBilder-4)) && isScrolling == false)
		{
			isScrolling = true;
			var imgScrollLeft = $('.imgScrollLeft img:first');
			if (imgScrollLeft.attr('src') == '/bitmaps/btnPrevInaktiv.gif')
				imgScrollLeft.attr('src','/bitmaps/btnPrev.gif');
			sliderBox.animate({marginLeft: '-='+imgLength},300,'linear',function(){
				isScrolling = false;
				//alert((pos-imgLength)+' <= '+(-1*imgLength*(anzahlBilder-4)));
				if ((pos-imgLength) <= (-1*imgLength*(anzahlBilder-4)))
					$('.imgScrollRight img:first').attr('src','/bitmaps/btnNextInaktiv.gif');
			});
		}
		
		return false;
	});
	
	$('.toggle').click(function(){
		var terminBox = $(this).parent();
		if (terminBox.hasClass('opened'))
		{
			terminBox.find('.info:first').slideUp('fast',function(){
				terminBox.removeClass('opened');										  
			});
		}
		else
		{
			terminBox.find('.info:first').slideDown('fast',function(){
				terminBox.addClass('opened');										  
			});
		}
		return false;
	});
	
	
/*		
		$("#subnavigation li").bind("mouseover",function(){
	
			tempClassName = $("li.aktiv").attr("class").indexOf("last") ? "" : "last";
			$("li.aktiv").attr("class", tempClassName + " disabled");
			
		}).bind("mouseout",function(){
			
			$("li.disabled").attr("class", tempClassName + " aktiv"); 
			
		});
*/
	
}