
CD3.Behaviors({
	'#top_menu li': {
		mouseover: function(){
			var mother = this.up('ul');
			
			
			mother.select('li').each(function(li){
				li.down('a').style.height = null;
				li.down('div').hide();
			});
			//this.up('ul').style.height = '70px';
			
			var a = this.down('a');
			a.style.height = '31px';
			this.down('div').show().style.backgroundColor = a.getStyle('background-color');
			
			var takeHeight = parseInt( this.down('div').getStyle('height'));
			new Effect.Morph( mother,{style: 'height:' + (takeHeight+50) + 'px;',	duration: 0.1});
		}

				/*		mouseover: function(){
							var colo = this.down('a').getStyle('background-color');
							this.up('ul').setStyle({height:'70px'});
							this.down('a').setStyle({height: '31px'});
							this.down('div').setStyle({	display:'block', backgroundColor: colo });
						},
						mouseout: function(){
							this.up('ul').setStyle({height:'40px'});			
							this.down('div').setStyle({display:'none'});
							this.down('a').setStyle({height: '21px'});
						}
				*/
	},
	'#gal': function(){
		new CD3.Lightbox(this.select('a'));
	},
	'input[type=text],input[type=password]': {
		focus: function(){
			if (this.getAttribute('value') == this.getAttribute('title'))
				this.setAttribute('value', '');
		},
		blur: function(){
			if (!this.getAttribute('value'))
				this.setAttribute('value', this.getAttribute('title'));
		}	
	}
});


