

window.addEvent('domready', function() {
	var menu = new Array('about', 'summercamp');
	slider(menu);
});




function slider(menuArray){
	menuArray.each(function(parent){
		//alert(parent);
		var child = parent + '-menu';
		$(parent).getElement('ul').slide('hide');
		$(child).getElements('a').fade('hide');
		$(child).setStyle('visibility', 'visible');
		//$('child').setStyle('width', '300px'); 
		
		$(parent).addEvent('mouseenter', function(event) {
			$(child).slide('in');
			$(child).getElements('a').set('tween', {duration: '900'});
			$(child).getElements('a').tween('opacity', '1');
		});
		$(parent).addEvent('mouseleave', function(event) {
			//alert(parent);
			$(child).slide('out');
			$(child).getElements('a').set('tween', {duration: '300'});
			$(child).getElements('a').tween('opacity', '0');
		});
	}); //The optional second argument for binding isn't used here.

}



