$(function(){
	$(".toggle-entry").show();
	
	$(".commentby").css("cursor","pointer").toggle(function(){
		$(this).find(".toggle-entry span").text("+");
		$(this).next(".comment-content").hide();
	}, function(){
		$(this).find(".toggle-entry span").text("-");
		$(this).next(".comment-content").show();
	});
	
	if ($(".commentby").size()>1) {
		$("#toggle-comment-controls").show();
		$("h2#comments").css("margin-bottom","0px");
	}

	$("a#close-all").click(function(){
		$(".toggle-entry").find("span").text("+");
		$(".comment-content:visible").prev(".commentby").click();
	
	});
	
	$("a#open-all").click(function(){
		$(".toggle-entry").find("span").text("-");
		$(".comment-content:hidden").prev(".commentby").click();
	});
});