window.addEvent('domready',function(){
	var dropdownElements = $$('#menu ul li ul');
	if(dropdownElements.length > 0) {
		var dropdownElement = dropdownElements[0];
		var DropDownMenu = new DropDown({
			'element': dropdownElement
		});
	}
	$$('div#newsletterbox input.text').each(function(input){
		input.addEvent('focus',function(){
			this.setProperty('value','');
		});
	});

	/*
	 * Public tips management
	 */
	var pubTips = $$('.pubTips');
	pubTips.removeProperty('alt');
	var myPublicTips = new Tips(pubTips,{
		showDelay:0
	});
});
var DropDown = new Class({
	initialize: function(options){
		this.setOptions(options);
		var firstItems = this.options.element.getChildren();
		firstItems.each(function(firstItem){
			var subItem = firstItem.getElement('div');
			if(subItem !== null){
				firstItem.addEvents({
					'mouseenter': function(){
						subItem.setStyle('display','block');
					},
					'mouseleave': function(){
						subItem.setStyle('display','none');
					}
				});
			}
		});
	}
});
DropDown.implement(new Options());
DropDown.implement(new Events());
