window.addEvent('domready', function(){
	// Second Example
	
	var time = 800;
	
	// The same as before: adding events
	$('bottle').addEvents({
		'mouseenter': function(){
			// Always sets the duration of the tween to 1000 ms and a bouncing transition
			// And then tweens the height of the element
			this.set('tween', {
				duration: time,
				transition: Fx.Transitions.Bounce.easeOut // This could have been also 'bounce:out'
			}).tween('top', '-30px');
			
			$('bottle_img').set('tween', {
				duration: 0,
			}).tween('opacity', 0);
			
			$('bottle_tooltip').set('tween', {
				duration: 0,
			}).tween('opacity', 100);
			
			$('bottle_ref').set('tween', {
				duration: time,
				transition: Fx.Transitions.Bounce.easeOut // This could have been also 'bounce:out'
			}).tween('top', '60px');
		},
		'mouseleave': function(){
			// Resets the tween and changes the element back to its original size
			this.set('tween', {}).tween('top', '-20px');
			
			$('bottle_img').set('tween', {
				duration: 0,
			}).tween('opacity', 100);
			
			$('bottle_tooltip').set('tween', {
				duration: 0,
			}).tween('opacity', 0);
			
			$('bottle_ref').set('tween', {}).tween('top', '50px');
		}
	});
	
	// The same as before: adding events
	$('search').addEvents({
		'mouseenter': function(){
			// Always sets the duration of the tween to 1000 ms and a bouncing transition
			// And then tweens the height of the element
			this.set('tween', {
				duration: time,
				transition: Fx.Transitions.Bounce.easeOut // This could have been also 'bounce:out'
			}).tween('top', '-19px');
			
			$('search_img').set('tween', {
				duration: 0,
			}).tween('opacity', 0);
			
			$('search_tooltip').set('tween', {
				duration: 0,
			}).tween('opacity', 100);
			
			$('search_ref').set('tween', {
				duration: time,
				transition: Fx.Transitions.Bounce.easeOut // This could have been also 'bounce:out'
			}).tween('top', '60px');
		},
		'mouseleave': function(){
			// Resets the tween and changes the element back to its original size
			this.set('tween', {}).tween('top', '-9px');
			
			$('search_img').set('tween', {
				duration: 0,
			}).tween('opacity', 100);
			
			$('search_tooltip').set('tween', {
				duration: 0,
			}).tween('opacity', 0);
			
			$('search_ref').set('tween', {}).tween('top', '50px');
		}
	});
	
	// The same as before: adding events
	$('beer').addEvents({
		'mouseenter': function(){
			// Always sets the duration of the tween to 1000 ms and a bouncing transition
			// And then tweens the height of the element
			this.set('tween', {
				duration: time,
				transition: Fx.Transitions.Bounce.easeOut // This could have been also 'bounce:out'
			}).tween('top', '-19px');
			
			$('beer_img').set('tween', {
				duration: 0,
			}).tween('opacity', 0);
			
			$('beer_tooltip').set('tween', {
				duration: 0,
			}).tween('opacity', 100);
			
			$('beer_ref').set('tween', {
				duration: time,
				transition: Fx.Transitions.Bounce.easeOut // This could have been also 'bounce:out'
			}).tween('top', '60px');
		},
		'mouseleave': function(){
			// Resets the tween and changes the element back to its original size
			this.set('tween', {}).tween('top', '-9px');
			
			$('beer_tooltip').set('tween', {
				duration: 0,
			}).tween('opacity', 0);
			
			$('beer_img').set('tween', {
				duration: 0,
			}).tween('opacity', 100);
			
			$('beer_ref').set('tween', {}).tween('top', '50px');
		}
	});
});