/* Mailmask */
function noSpam() {
    if (document.getElementById) {
		var at = "@";
	  	var links = document.getElementsByTagName('a');	  
	  	for (var i = 0; i < links.length; i++) {
		  	var linkElem = links[i];			
		  	if (linkElem.className == 'escape') {
		  		var mail = linkElem.firstChild; var domain = linkElem.lastChild;
		  		mail.nextSibling.firstChild.innerHTML = at;
		  		linkElem.href = "mailto:" + mail.data + at + domain.data;
		  	}			
	  	} // End for	  
    } // End if
}


$(document).ready(function() {

	$("#navi li").prepend("<span></span>"); //Throws an empty span tag right before the a tag

	$("#navi li").each(function() { //For each list item...
		var linkText = $(this).find("a").html(); //Find the text inside of the <a> tag
		$(this).find("span").show().html(linkText); //Add the text in the <span> tag
	}); 

	$("#navi li").hover(function() {	//On hover...
		$(this).find("span").stop().animate({
			marginTop: "-35" //Find the <span> tag and move it up 40 pixels
		}, 250);
	} , function() { //On hover out...
		$(this).find("span").stop().animate({
			marginTop: "0"  //Move the <span> back to its original state (0px)
		}, 250);
	});

});


// Onload-Methode ohne Prototype:
window.onload = noSpam;
//Event.observe(window, 'load', noSpam, false);

