window.addEvent('domready', function(){
	
	// The same as before: adding events
	if ($('nav-welcome'))
		$('nav-welcome').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: 500,
					transition: Fx.Transitions.Quad.easeOut // This could have been also 'bounce:out'
				}).tween('height', '469px');
				
				this.set('class', 'expanded');
			},
			'mouseleave': function(){
				// Resets the tween and changes the element back to its original size
				this.set('tween', {}).tween('height', '36px');
				
				this.set('class','collapsed');
			}
		});
	
	if($('bubble-1'))
		$('bubble-1').addEvents({
			'mouseenter': function(){ 
				this.set('class','bubble-open'); 
			},
			'mouseleave': function(){
				this.set('class','bubble-closed');
			}
		});
	
	if($('bubble-2'))
		$('bubble-2').addEvents({
			'mouseenter': function(){
				this.set('class','bubble-open'); 
			},
			'mouseleave': function(){
				this.set('class','bubble-closed');
			}
		});
	
	if($('bubble-3'))
		$('bubble-3').addEvents({
			'mouseenter': function(){
				this.set('class','bubble-open'); 
			},
			'mouseleave': function(){
				this.set('class','bubble-closed');
			}
		});
});