// Set the initial height
var sliderHeight = "290px";
var sliderHeight1 = "290px";

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

	jQuery('.slider1').each(function () {
		var current = jQuery(this);
		current.attr("box_h", current.height());
	});
	
	jQuery(".slider1").css("height", sliderHeight);

});

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

function sliderAction(more_text, close_text)
{
	if (slider_state == "close")
	{
		sliderOpen();
		slider_state = "open"
		jQuery(".slider_menu").html('<a href="#" class="rdmore" onclick="return sliderAction(more_text, close_text);">'+close_text+'</a>');
	}
	else if (slider_state == "open")
	{
		sliderClose();
		slider_state = "close";
		jQuery(".slider_menu").html('<a href="#" class="rdmore" onclick="return sliderAction(more_text, close_text);">'+more_text+'...</a>');
	}
	
	return false;
}

function sliderOpen()
{
	var open_height = jQuery(".slider").attr("box_h") + "px";
	jQuery(".slider").animate({"height": open_height}, {duration: "slow" });
}

function sliderClose()
{
	jQuery(".slider").animate({"height": sliderHeight}, {duration: "slow" });
}



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

function sliderAction1(more_text, close_text)
{
	if (slider_state1 == "close")
	{
		sliderOpen1();
		slider_state1 = "open"
		jQuery(".slider_menu1").html('<a href="#" class="rdmore" onclick="return sliderAction1(more_text, close_text);">'+close_text+'</a>');
	}
	else if (slider_state1 == "open")
	{
		sliderClose1();
		slider_state1 = "close";
		jQuery(".slider_menu1").html('<a href="#" class="rdmore" onclick="return sliderAction1(more_text, close_text);">'+more_text+'...</a>');
	}
	
	return false;
}

function sliderOpen1()
{
	var open_height1 = jQuery(".slider1").attr("box_h") + "px";
	jQuery(".slider1").animate({"height": open_height1}, {duration: "slow" });
}

function sliderClose1()
{
	jQuery(".slider1").animate({"height": sliderHeight1}, {duration: "slow" });
}
