// open up the comments
function toggleMenu(div) {
	// get the child elements
	var children = $(div).childElements();
	// if the span being shown? (ignores text nodes)
	if (children[1].getStyle('display') == 'none') {
		// lets show it
		new Effect.BlindDown(children[1], {duration:0.5, transition:Effect.Transitions.Bounce});
	} /*else {
		new Effect.BlindUp(children[1]);
	}
*/}

var  scroll = {
	top: function(event) { new Effect.ScrollTo('header'); },
	bottom: function(event) { new Effect.ScrollTo('respond'); }
}

Event.observe(document, 'load', function(){
	$('go_to_top').observe('click', scroll.top);
});


Effect.Transitions.Bounce = function(pos) {
    if (pos < (1/2.75)) {
        return (7.5625*pos*pos);
    } else if (pos < (2/2.75)) {
        return (7.5625*(pos-=(1.5/2.75))*pos + .75);
    } else if (pos < (2.5/2.75)) {
        return (7.5625*(pos-=(2.25/2.75))*pos + .9375);
    } else {
        return (7.5625*(pos-=(2.625/2.75))*pos + .984375);
    }
}; 

function blind(div) {
	if ($(div).getStyle('display') == 'none') {
		// blind down
		new Effect.BlindDown(div, { 
			duration: 1,
			transition: Effect.Transitions.Bounce
		});
	} else {
		new Effect.BlindUp(div);
	}
}

