var sub_menu_a;
var logo_li;
var logo_a;
var copy;

var init_menu_fadeins = function() {
	sub_menu_a = $$('#menu_list li a');

	copy = $('copy');
	
	sub_menu_a.each( function(item) {
		var orig_top = item.getPosition().y;
		var new_top = orig_top + 2;
		item.store('orig_sub_top', orig_top);
		item.store('mo_sub_top', new_top);
		
		item.set('tween', {
					 fps: 40,
					 duration: 100,
					 transition: 'linear'
					 });
		
		item.addEvents({
			'mouseenter': function() {
				this.tween('top', this.retrieve('mo_sub_top'));
			},
			'mouseleave': function() {
				this.tween('top', this.retrieve('orig_sub_top'));
			}
		});									  
	});
};

var init_logo_mouseovers = function() {
	logo_li = $$('#logo_list li', '#logo_zncs');
	logo_a = $$('#logo_list li a');	
	
	var tween_options = {
		fps: 40,
		duration: 150,
		transition: 'sine:out'
	};
	
	logo_a.each( function(item) {
		var parent = item.getParent();
		item.set('tween', tween_options);		
		parent.set('tween', tween_options);
		
		item.addEvents({
			'mouseenter': function() {				
				this.tween('top', -8);
				this.getParent().tween('top', 2);
				},
			'mouseleave': function() {
				this.tween('top', 0);
				this.getParent().tween('top', 0);
				}
		});
	});

};

window.addEvent('domready', init_menu_fadeins);
window.addEvent('domready', init_logo_mouseovers);