var Navigation = {
	
	start: function()
	{
		if ( $( 'navigation_main' ) )
		{
			Navigation.appearText();
		}
	},
		
	appearText: function()
	{
		var timer = 0;
		var sideblocks = $$( 'li' );
		
		var slidefxs = [];
		var colorfxs = [];
		
		sideblocks.each( function( el, i )
		{
			el.setStyle( 'margin-top', '10px' );
			timer += 150;
			slidefxs[i] = new Fx.Style( el, 'margin-top', {
				duration: 0,
				transition: Fx.Transitions.backOut,
				wait: false,
				onComplete: Navigation.createOver.pass( [el, i] )
			} );
			slidefxs[i].start.delay( timer, slidefxs[i], 0 );

		}, this );
	},
	
	createOver: function( el, i )
	{
		var first = el.getFirst();
		if( !first || first.getTag() != 'a' ) return;
		// TODO get value of attribute 'class'. if is _active/length == -1 return;
		var overfxs = new Fx.Styles( first, { 'duration': 300, 'wait': false } );
		var tocolor, fromcolor;
		var tobgcolor, frombgcolor;
			fromcolor = '256000';
			tocolor = 'ffffff';
			frombgcolor = 'ffffff';
			tobgcolor = '256000';
			fromalpha = 1;
			toalpha = 1;
		
		el.mouseouted = true;
		
		el.addEvent( 'mouseenter', function( e )
		{
			overfxs.start( {
				'color': tocolor,
				'background-color': tobgcolor,
				'opacity': toalpha,
				'margin-top': '0'
			} );
		} );
		
		el.addEvent( 'mouseleave', function( e )
		{
			overfxs.start( {
				'color': fromcolor,
				'background-color': frombgcolor,
				'opacity': fromalpha,
				'margin-top': '0'
			} );
		} );
	},
	
	
};
