var sliderHeight = 402;

jQuery(document).ready(function(){
	jQuery('#cta').cycle( {
		fx: 'scrollLeft',
		pause: 1
	});
    /*
	jQuery('#content').each(function(){
		var current = jQuery(this);
		currentHeight = current.height();
		current.attr('box_h', currentHeight);
	});
	jQuery('#content').css('height', sliderHeight + 'px');
	if (sliderHeight < currentHeight) {
		jQuery('#expand').html('<a>Expand</a>');
		jQuery('#expand a').click(function() { openSlider() });
	}
    */

});

function openSlider(){
	var open_height = jQuery('#content').attr('box_h') + 'px';
	jQuery('#content').animate({'height': open_height}, {duration: 'slow'});
	jQuery('#expand').html('<a>Close</a>');
	jQuery('#expand a').click(function() { closeSlider() });
}

function closeSlider(){
	jQuery('#content').animate({'height': sliderHeight + 'px'}, {duration: 'slow'});
	jQuery('#expand').html('<a>Expand</a>');
	jQuery('#expand a').click(function() { openSlider() });
}
