// Set the initial height
var sliderHeight = "80px";

/*
$(document).ready(function(){
	// Show the slider content
			
	$('.slider').show();
	//document.getElementById('info_tekst1').show();
	
	$('.slider').each(function () {
		var current = $(this);
		current.attr("box_h", current.height());
	});
	
	$(".slider").css("height", sliderHeight);

});
*/

// Set the initial slider state
var slider_state = "close";

function sliderAction(nmbr)
{
	if (slider_state == "close")
	{
		sliderOpen(nmbr);
		slider_state = "open"
		$(".slider_menu" + nmbr).html('<a href="#" style="color:#a09b87; font-style:italic; padding:0px 0px 0px 0px; font-weight:normal;" onclick="return sliderAction(\'' + nmbr + '\');">...verberg hele artikel</a>');
	}
	else if (slider_state == "open")
	{
		sliderClose(nmbr);
		slider_state = "close";
		$(".slider_menu" + nmbr).html('<a href="#" style="color:#a09b87; font-style:italic; padding:0px 0px 0px 0px; font-weight:normal;" onclick="return sliderAction(\'' + nmbr + '\');">lees meer...</a>');
	}
	
	return false;
}

function sliderOpen(nmbr)
{	
	var open_height = $("#info_tekst"+nmbr).attr("box_h") + "px";		
	$("#info_tekst"+nmbr).animate({"height": open_height}, {duration: "slow" });
}

function sliderClose(nmbr)
{
	$("#info_tekst"+nmbr).animate({"height": sliderHeight}, {duration: "slow" });
}










function openFade(id)
	{
		//$("#fade_" + id).css("height", "auto");
		var open_height = $("#fade_" + id).attr("box_h") + "px";
		$("#fade_" + id).animate({"height": open_height}, {duration: "slow" });
		$("#fade_" + id + " .fade").fadeOut();
		//$("#fade_" + id).next().hide(); // hides the keep reading block
		$("#post_" + id + " .close_post").fadeIn();
		$("#post_" + id + " .readmore").addClass("open");
	}
	
	function closeFade(id)
	{
		$("#fade_" + id + " .fade").fadeIn();
		$("#fade_" + id).animate({"height": "100px"}, {duration: "slow" });
		$("#post_" + id + " .close_post").fadeOut();
		$("#post_" + id + " .readmore").removeClass("open");
	}
