// Set the initial height
$(document).ready(function(){
  $('.entry').each(function () {
    var current = $(this);
     current.attr("box_h", current.height());
    }
  );

  $(".entry").css("height", "120px");

});


function sliderAction(id)
{
	var slider_state = $("#entry_"+id).css("height").search(/^120/)==0?"close":"open";
	//alert(slider_state);
	if (slider_state == "close")
	{
		sliderOpen(id);
	}
	else if (slider_state == "open")
	{
		sliderClose(id);
	}
}

function sliderOpen(id)
{
	var open_height = $("#entry_" + id).attr("box_h");
	open_height = parseFloat(open_height) + 15 + "px"
	$("#entry_" + id).animate({"height": open_height}, {duration: "normal" });
 $("#post-" + id + " .open_entry").fadeOut();
	$("#post-" + id + " .close_entry").fadeIn();
}

function sliderClose(id)
{
 $("#entry_" + id).animate({"height": "120px"}, {duration: "normal" });
 $("#post-" + id + " .close_entry").fadeOut();
 $("#post-" + id + " .open_entry").fadeIn();
}

