
$(document).ready(function(){
	//Kommentare
	$("div#commentformblock").hide();
	$("input.buttonShowCommentForm").click(function() {
		$(this).next("div#commentformblock").toggle(500);
		if ($(this).attr("value")=="Kommentar hinzufügen"){
			$(this).attr("value","Formular ausblenden");
	   }else{
		   $(this).attr("value","Kommentar hinzufügen");
		}
	});
	
	//Spoiler
	$("p.spoilerblock code.spoiled").hide();
	$("p.spoilerblock input").click(function() {
	   $(this).next("code.spoiled").toggle(500);
	   if ($(this).attr("value")=="Anzeigen"){
			$(this).attr("value","Ausblenden");
	   }else{
		   $(this).attr("value","Anzeigen");
		}
	});
});


function email(name, domain,tld, link) {
var link = "<a href='mailto:"+name+"@"+domain+"."+tld+"'>"+link+"</a>";
document.write(link);
}

function email2(name,domain,tld) {
var link = "<a href='mailto:"+name+"@"+domain+"."+tld+"'>"+name+"@"+domain+"."+tld+"</a>";
document.write(link);
}

