// JavaScript Document

function expandSection(el, size){
	// Always sets the duration of the tween to 1000 ms and a bouncing transition
	// And then tweens the height of the element
	if ($(el).getStyle('height') == '0px') {
		$(el).set('tween', {
				  duration: 1000,
				  transition: Fx.Transitions.Bounce.easeOut
				}).tween('height', size + 'px');
		togglePlusMin(el, '-');
		}
		else {
			// Resets the tween and changes the element back to its original size
			$(el).set('tween', {}).tween('height', '0px');
			togglePlusMin(el, '+');
		}
}

function displaySection(el, type) {
	if ($(el).getStyle('display') == 'none') {
		$(el).setStyle('display', type);
		togglePlusMin(el, '-');
	}
	else {
		$(el).setStyle('display', 'none');
		togglePlusMin(el, '+');
	}
}

function togglePlusMin(el, text) {
	$(el + '+').set('text', text);
}