// Set the initial height
var sliderHeight = "192px";

$(document).ready(function(){
	// Show the slider content
	$('.slider').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()
{
	if (slider_state == "close")
	{
		sliderOpen();
		slider_state = "open"
		$(".slider_menu").html('<a href="#" onclick="return sliderAction();">Close</a>');
	}
	else if (slider_state == "open")
	{
		sliderClose();
		slider_state = "close";
		$(".slider_menu").html('<a href="#" onclick="return sliderAction();">More...</a>');
	}
	
	return false;
}

function sliderOpen()
{
	var open_height = $(".slider").attr("box_h") + "px";
	$(".slider").animate({"height": open_height}, {duration: "slow" });
}

function sliderClose()
{
	$(".slider").animate({"height": sliderHeight}, {duration: "slow" });
}


// Set the initial height
var sliderCCCHeight = "150px";

$(document).ready(function(){
	// Show the sliderCCC content
	$('.sliderCCC').show();
	
	$('.sliderCCC').each(function () {
		var currentCCC = $(this);
		currentCCC.attr("box_h", currentCCC.height());
	});
	
	$(".sliderCCC").css("height", sliderCCCHeight);
});

// Set the initial sliderCCC state
var sliderCCC_state = "close";

function sliderCCCAction()
{
	if (sliderCCC_state == "close")
	{
		sliderCCCOpen();
		sliderCCC_state = "open"
		$(".sliderCCC_menu").html('<a href="#" onclick="return sliderCCCAction();">Close</a>');
	}
	else if (sliderCCC_state == "open")
	{
		sliderCCCClose();
		sliderCCC_state = "close";
		$(".sliderCCC_menu").html('<a href="#" onclick="return sliderCCCAction();">More...</a>');
	}
	
	return false;
}

function sliderCCCOpen()
{
	var open_height = $(".sliderCCC").attr("box_h") + "px";
	$(".sliderCCC").animate({"height": open_height}, {duration: "slow" });
}

function sliderCCCClose()
{
	$(".sliderCCC").animate({"height": sliderCCCHeight}, {duration: "slow" });
}



// Set the initial height
var sliderAVHeight = "150px";

$(document).ready(function(){
	// Show the sliderAV content
	$('.sliderAV').show();
	
	$('.sliderAV').each(function () {
		var currentAV = $(this);
		currentAV.attr("box_h", currentAV.height());
	});
	
	$(".sliderAV").css("height", sliderAVHeight);
});

// Set the initial sliderAV state
var sliderAV_state = "close";

function sliderAVAction()
{
	if (sliderAV_state == "close")
	{
		sliderAVOpen();
		sliderAV_state = "open"
		$(".sliderAV_menu").html('<a href="#" onclick="return sliderAVAction();">Close</a>');
	}
	else if (sliderAV_state == "open")
	{
		sliderAVClose();
		sliderAV_state = "close";
		$(".sliderAV_menu").html('<a href="#" onclick="return sliderAVAction();">More...</a>');
	}
	
	return false;
}

function sliderAVOpen()
{
	var open_height = $(".sliderAV").attr("box_h") + "px";
	$(".sliderAV").animate({"height": open_height}, {duration: "slow" });
}

function sliderAVClose()
{
	$(".sliderAV").animate({"height": sliderAVHeight}, {duration: "slow" });
}

