window.addEvent('domready', function(){
	
	var skroll = new Fx.Scroll(window, {duration: 700, wait: false, transition: Fx.Transitions.quadInOut});
	
	$$('.gotoone').addEvent('click', function(){ skroll.toElement('onewrapper'); });
	$$('.gototwo').addEvent('click', function(){ skroll.toElement('twowrapper'); });
	$$('.gotothree').addEvent('click', function(){ skroll.toElement('threewrapper'); });
	$$('.gotothreea').addEvent('click', function(){ skroll.toElement('threeawrapper'); });
	$$('.gotofour').addEvent('click', function(){ skroll.toElement('fourwrapper'); });
	$$('.gotofive').addEvent('click', function(){ skroll.toElement('fivewrapper'); });
	
	//EXAMPLE A
	var slideElement = $('inventory');
 
	var slideVar = new Fx.Slide(slideElement, {
		//Fx.Slide Options
		mode: 'horizontal', //default is 'vertical'
		//wrapper: this.element, //default is this.element
 
		//Fx Options
		link: 'cancel',
		transition: 'bounce:out',
		duration: '1200', 
 
		//Fx Events
		onStart: function(){
			$('start').highlight("#EBCC22");
		},
 
		onCancel: function(){
			$('cancel').highlight("#EBCC22");
		},
 
		onComplete: function(){
			$('complete').highlight("#EBCC22");
		}
	}).hide().show().hide(); //note, .hide and .show do not fire events 
 
	$('openA').addEvent('click', function(){
		slideVar.slideIn();
	});
 
	$('closeA').addEvent('click', function(){
		slideVar.slideOut();
	});
 
 
 
	//EXAMPLE B
	var slideElementB = $('slideB');
 
	var slideVarB = new Fx.Slide(slideElementB, {
		//Fx.Slide Options
		mode: 'vertical', //default is 'vertical'
 
		//Fx Options
		//notice how chaining lets you click multiple time 
		//then mouse away and the effects will keep going
		//for every click
		link: 'chain', 
 
		//Fx Events
		onStart: function(){
			$('start').highlight("#EBCC22");
		},
 
		onCancel: function(){
			$('cancel').highlight("#EBCC22");
		},
 
		onComplete: function(){
			$('complete').highlight("#EBCC22");
		}
	}).hide();
 
	$('shield1').addEvent('click', function(){
		slideVarB.toggle();
	});
		 
 
	//EXAMPLE C
	var slideElementC = $('slideC');
 
	var slideVarC = new Fx.Slide(slideElementC, {
		//Fx.Slide Options
		mode: 'horizontal', //default is 'vertical'
		//wrapper: this.element, //default is this.element
 
		//Fx Options
		//link: 'cancel',
		transition: 'sine:in',
		duration: 300, 
		link: 'chain',
 
 
		//Fx Events
		onStart: function(){
			$('start').highlight("#EBCC22");
		},
 
		onCancel: function(){
			$('cancel').highlight("#EBCC22");
		},
 
		onComplete: function(){
			$('complete').highlight("#EBCC22");
		}
	}).hide();
 
	$('shield').addEvent('click', function(){
		slideVarC.slideIn();
	});

	
var slideElementSword = $('sword_icn');
 
	var slideVarSword = new Fx.Slide(slideElementSword, {
		//Fx.Slide Options
		mode: 'horizontal', //default is 'vertical'
		//wrapper: this.element, //default is this.element
 
		//Fx Options
		//link: 'cancel',
		transition: 'sine:in',
		duration: 300, 
 		link: 'chain',
 
		//Fx Events
		onStart: function(){
			$('start').highlight("#EBCC22");
		},
 
		onCancel: function(){
			$('cancel').highlight("#EBCC22");
		},
 
		onComplete: function(){
			$('complete').highlight("#EBCC22");
		}
	}).hide();
 
	$('sword').addEvent('click', function(){
		slideVarSword.slideIn();
	});

var slideElementKey = $('key_icn');
 
	var slideVarKey = new Fx.Slide(slideElementKey, {
		//Fx.Slide Options
		mode: 'horizontal', //default is 'vertical'
		//wrapper: this.element, //default is this.element
 
		//Fx Options
		//link: 'cancel',
		transition: 'sine:in',
		duration: 300, 
 		link: 'chain',
 
		//Fx Events
		onStart: function(){
			$('start').highlight("#EBCC22");
		},
 
		onCancel: function(){
			$('cancel').highlight("#EBCC22");
		},
 
		onComplete: function(){
			$('complete').highlight("#EBCC22");
		}
	}).hide();
 
	$('wizard').addEvent('click', function(){
		slideVarKey.slideIn();
	});
	
	var slideElementBall = $('ball_icn');
 
	var slideVarBall = new Fx.Slide(slideElementBall, {
		//Fx.Slide Options
		mode: 'horizontal', //default is 'vertical'
		//wrapper: this.element, //default is this.element
 
		//Fx Options
		//link: 'cancel',
		transition: 'sine:in',
		duration: 300, 
 		link: 'chain',
 
		//Fx Events
		onStart: function(){
			$('start').highlight("#EBCC22");
		},
 
		onCancel: function(){
			$('cancel').highlight("#EBCC22");
		},
 
		onComplete: function(){
			$('complete').highlight("#EBCC22");
		}
	}).hide();
 
	$('bowie2').addEvent('click', function(){
		slideVarBall.slideIn();
	});
});



 
	



 
	
