function dom_init() 
{
	
//	if (!document.getElementsByTagName) return;
//	
//	var aLinks = document.getElementsByTagName("a");
//	for (var i = 0; i < aLinks.length; i++) 
//	{
//		var mclass = aLinks[i].className;
//		if (mclass.indexOf("mailer") > -1) 
//		{
//				var a = aLinks[i].getAttribute("title").replace(" %20 ",".");
//				a = a.replace(" ","@");
//				
//				var t = document.createTextNode(a);
//				aLinks[i].appendChild(t);
//				
//				var b = a;
//				if(a.indexOf("mailto:") < 0)a="mailto:"+a;
//				if(b.indexOf("mailto:") >= 0)b = b.substr(7);
//				aLinks[i].setAttribute("href",a);
//				//aLinks[i].setAttribute("title","Mailen Sie an: "+b);
//				aLinks[i].setAttribute("title","");
//		}
//		
//	}

	// ----------------
	// MAILTO
	jQuery.fn.mailto = function() {
		return this.each(function(){
			var email = $(this).html().replace(/\s*\(.+\)\s*/, "@");
			$(this).before('<a href="mailto:' + email + '" class="email">' + email + '</a>').remove();
		});
	};
	$('.email').mailto();
	
	
	// ----------------
	// COLORBOX BASIC
	$(".colorbox").colorbox({transition:"elastic", width:'80%'});	
	

	// ----------------
	// TOOLTIP
	$('img[title], a[title]').tooltip({
		showURL: false,
		track: true,
		fade: 300,
		top: 0,
		left: 10,
		delay: 0, 
		bodyHandler: function() {
			//title als inhalt setzen
			$('#ttContent').html(this.tooltipText);
			//mittig positionieren
			offset = - 0.5 * (22 + $("#ttWrapper").height());
			$("#ttWrapper").css({ marginTop : offset }).fadeIn(300);
			//inhalt anzeigen
			return $("#tt").html(); 
		} 					  
	});
	
	
	// ----------------
	// LOGIN
	$("#login.in").bind("mouseenter",function(){
		$('#form').css({ opacity: 0 , display: "block" }).animate({ opacity: 0.85 }, 300 );	
	}).bind("mouseleave",function(){
		$('#form').animate({ opacity: 0 }, "linear", function(){ $(this).css({ display: "none" }); });
	});
	
  
	// LOGIN INPUT
	$("input.text").focus(function (){
  	$(this).css({ backgroundColor: '#FFF' });
  }).blur(function (){
  	$(this).css({ backgroundColor: '#f7f9d9' });
  });
	
	

	// 
	$(".teaser").hover(
      function () {
        $(this).css({backgroundColor: '#E6E6E6'});
      }, 
      function () {
         $(this).css({backgroundColor: '#EFEFEF'});
      }
    );

	

}


$(document).ready(function(){
	$('input[type=checkbox]').prettyCheckboxes({'display':'inline'});
	/*$('input#rtitel1').prettyCheckboxes({'display':'inline'});
	$('input#rtitel2').prettyCheckboxes({'display':'inline'});*/
	$('input[type=radio]').prettyCheckboxes({'display':'inline'});
	
	$('.rart').sSelect();
	
});

