// JavaScript Document
function creatur(type){
	if(type == "in"){
		document.getElementById('creatur').className = "creatur2";
	}
	if(type == "out"){
		document.getElementById('creatur').className = "creatur";
	}
}

function PageInit(){
	
	// Comments setzen
	$('div.comments').each(function() {
		//alert($(this).text());
		var jetzt = $(this).text().replace('comments ', '');
		jetzt = jetzt.replace('comment ', '');
		jetzt = jetzt.replace('(', '');
		jetzt = jetzt.replace(')', '');
		$(this).text(jetzt);
		$(this).addClass('commentblase');
	});	
	
	// Kalender formatieren
	$('table#wp-calendar td').each(function() {
		//alert($(this).html().substring(0,2));
		if($(this).html() != "" && $(this).html() != "&nbsp;" && $(this).html().substring(0,2) != "<a"){
			
			var jetzt = $(this).html();
			jetzt = "<span>" + jetzt + "</span>";
			$(this).html(jetzt);
			
		}
	});	
	$('table#wp-calendar th').each(function() {
			var jetzt = $(this).html();
			jetzt = "<span>" + jetzt + "</span>";
			$(this).html(jetzt);
	});	
}
