// JavaScript Document

function ShowPop(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.setStyles({
					 'display': 'block',
					 'top': ((window.getHeight() - size[1])/2) + window.getScrollTop() + 'px',
					 'left': ((window.getWidth() - size[0])/2) + 'px'
					  });
		el.set('tween', {
			   duration: 1000,
			   transition: Fx.Transitions.Bounce.easeOut
			   }).tween('height', size[1] + 'px');
	}
	else {
		// Resets the tween and changes the element back to its original size
		el.set('tween', {}).tween('height', '0px').setStyles({
															 'display': 'none',
															 'top': '0px',
															 'left': '0px'
															 });
	}
}

window.addEvent('domready', function(){
	$$('p.claimdis').addEvents({
							   'mouseover': function(){this.setStyle('cursor', 'pointer');},
							   'mouseout': function(){this.setStyle('cursor', 'default');},
							   'click': function(){ShowPop($('disclaimer'),[450,500]);}
							   });
	$$('p.setupinstall').addEvents({
								   'mouseover':  function(){this.setStyle('cursor', 'pointer');},
								   'mouseout': function(){this.setStyle('cursor', 'default');},
								   'click': function(){ShowPop($('setupinstall'),[450,250]);}
								   });
});