var Download = function() {
	
	return {
		init: function() {
			
			// Dropdown-Menu
			var lists = $$('ul#download_categories li ul.files');
			
			// set fixed height
			var container = $$('ul#download_categories')[0];
			var height = container.getSize().y;
			container.setStyle('height', height);
			
			// initial hide lists			
			lists.each(function(elm, i) {				
				var fx = new Fx.Slide(elm, {
			    	mode: 'vertical',
					link:'cancel'
				});
				
				//
				fx.hide();
				var link = elm.getParent().getParent();
				link.addEvent('mouseenter', function() {
					fx.slideIn();
					elm.getParent().setStyle('overflow', 'visible');
				}.bind(this));
				
				link.addEvent('mouseleave', function() {
					fx.slideOut();
				}.bind(this));
			});
		}
	};
	
} ();

document.addEvent("domready", Download.init);
