function show_news(i) {
var j=0;
var el;
while(el=document.getElementById("newsc" + j)) {
	//el.style.overflow="hidden";
	el.style.height="132px";
	//document.getElementById("news" + j).style.height="184";
	$("#newsb" + j + " > a").attr("href", "javascript:show_news(" + j + ");");
	$("#newsb" + j + " > a").html("weiterlesen");
	$("#newsc" + j).find("h1").parent("a").attr("href", "javascript:show_news(" + j + ");");
	var offset = ($("#newsl" + j).find("img").height()-184)/2;
	$("#newsl" + j).find("img").css("bottom", offset + "px");
	$("#newsl" + j).css("overflow", "hidden");
	
	j++
}

if(i!=-1) {
	//document.getElementById("news" + i).style.height="auto";
	//$("#newsc" + i).css("overflow","visible");
	$("#newsc" + i).css("height","auto");
	$("#newsb" + i + " > a").attr("href", "javascript:show_news(-1);");
	$("#newsb" + i + " > a").html("schlie&szlig;en");
	$("#newsc" + i).find("h1").parent("a").attr("href", "javascript:show_news(-1);");
	$("#newsl" + i).find("img").css("bottom", "0px");
	$("#newsl" + i).css("overflow", "visible");
}
}

function show_post(i) {
var j=0;
var el;

$(".post_content_open").css("height","25px");
$(".post_content_open").addClass("post_content");
$(".post_content_open").remove("post_content_open");
$(".post").find("h1").css("height","17px");
$(".post").css("border-color","#d2d2d2");
$(".weiterlesen").css("display","block");
$(".post").each(function(index) {
	$(this).find("a > h1").parent().attr("href","javascript:show_post(" + $(this).attr("id") + ")");
});

if(i!=-1) {
	$("#" + i + " > .post_content").css("height","auto");
	$("#" + i + " > .post_content").addClass("post_content_open");
	$("#" + i + " > .post_content").removeClass("post_content");
	$("#" + i).css("border-color","#043783");
	$("#" + i).find(".weiterlesen:first").css("display","none");
	$("#" + i).find("a > h1").parent().attr("href","javascript:show_post(-1)");
	$("#" + i).find("h1").css("height","auto");
}
}
