window.addEvent('domready', function() {
	var status = {
		'true': 'open',
		'false': 'close'
	};
	
	//-vertical	
	var prize1 = new Fx.Slide('prize1_popup');
	prize1.hide(); // added to hide the popup when the page loads

	// Hide all popups when clicking outside of them
	$(document.body).addEvent('click', function(e){
		prize1.slideOut();
		prize2.slideOut();
		prize3.slideOut();
		prize4.slideOut();
	});
	
	$('prize1_slidein').addEvent('click', function(e){
		e.stop();
		prize1.slideIn();
	});

	$('prize1_slideout').addEvent('click', function(e){
		e.stop();
		prize1.slideOut();
	});
	
	
	
	//-vertical	
	var prize2 = new Fx.Slide('prize2_popup');
	prize2.hide(); // added to hide the popup when the page loads
	
	$('prize2_slidein').addEvent('click', function(e){
		e.stop();
		prize2.slideIn();
	});

	$('prize2_slideout').addEvent('click', function(e){
		e.stop();
		prize2.slideOut();
	});
	
	
	//-vertical	
	var prize3 = new Fx.Slide('prize3_popup');
	prize3.hide(); // added to hide the popup when the page loads
	
	$('prize3_slidein').addEvent('click', function(e){
		e.stop();
		prize3.slideIn();
	});

	$('prize3_slideout').addEvent('click', function(e){
		e.stop();
		prize3.slideOut();
	});
	
	
	//-vertical	
	var prize4 = new Fx.Slide('prize4_popup');
	prize4.hide(); // added to hide the popup when the page loads
	
	$('prize4_slidein').addEvent('click', function(e){
		e.stop();
		prize4.slideIn();
	});

	$('prize4_slideout').addEvent('click', function(e){
		e.stop();
		prize4.slideOut();
	});
	
	
	
	// When Vertical Slide ends its transition, we check for its status
	// note that complete will not affect 'hide' and 'show' methods
	/*myVerticalSlide.addEvent('complete', function() {
		$('vertical_status').set('html', status[myVerticalSlide.open]);
	});*/
});
