// JavaScript Document
var sliderHeight = "540px";
    $(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" });
}

var rollerHeight = "210px";
    $(document).ready(function(){
	// Show the roller content
	$('.roller').show();
	$('.roller').each(function () {
		var current = $(this);
		current.attr("box_h", current.height());
	});
	$(".roller").css("height", rollerHeight);
});

// Set the initial roller state
var roller_state = "close";
    function rollerAction()
    {
	if (roller_state == "close")
	{
		rollerOpen();
		roller_state = "open"
		$(".roller_menu").html('<a href="#" onclick="return rollerAction();">Close</a>');
	}
	else if (roller_state == "open")
	{
		rollerClose();
		roller_state = "close";
		$(".roller_menu").html('<a href="#" onclick="return rollerAction();">More...</a>');
	}
	
	return false;
    }
	
function rollerOpen()
    {
	var open_height = $(".roller").attr("box_h") + "px";
	$(".roller").animate({"height": open_height}, {duration: "slow" });
}
function rollerClose()
{
	$(".roller").animate({"height": rollerHeight}, {duration: "slow" });
}

var videorollerHeight = "255px";
    $(document).ready(function(){
	// Show the videoroller content
	$('.videoroller').show();
	$('.videoroller').each(function () {
		var current = $(this);
		current.attr("box_h", current.height());
	});
	$(".videoroller").css("height", videorollerHeight);
});

// Set the initial videoroller state
var videoroller_state = "close";
    function videorollerAction()
    {
	if (videoroller_state == "close")
	{
		videorollerOpen();
		videoroller_state = "open"
		$(".videoroller_menu").html('<a href="#" onclick="return videorollerAction();">Close</a>');
	}
	else if (videoroller_state == "open")
	{
		videorollerClose();
		videoroller_state = "close";
		$(".videoroller_menu").html('<a href="#" onclick="return videorollerAction();">More...</a>');
	}
	
	return false;
    }
	
function videorollerOpen()
    {
	var open_height = $(".videoroller").attr("box_h") + "px";
	$(".videoroller").animate({"height": open_height}, {duration: "slow" });
}
function videorollerClose()
{
	$(".videoroller").animate({"height": videorollerHeight}, {duration: "slow" });
}

