var Site = {
	
	start: function(){
		
		Site.appearText();
		
	},
			
	appearText: function(){
		var timer = 0;
		var sideblocks = $$('#menu li');
		
		var slidefxs = [];
		var colorfxs = [];
		
		sideblocks.each(function(el, i){
			timer += 150;
			slidefxs[i] = new Fx.Style(el, 'margin-left', {
				duration: 400,
				transition: Fx.Transitions.backOut,
				wait: false,
				onComplete: Site.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;
		var overfxs = new Fx.Styles(first, {'duration': 200, 'wait': false});
		if (first.hasClass('m1')){
			var tocolor = 'E3A034';
			var fromcolor = 'a5a5a5';
		} 
		if (first.hasClass('m2'))  {
			var tocolor = '2C98B7';
			var fromcolor = 'a5a5a5';
		}
		if (first.hasClass('m3'))  {
			var tocolor = '8BDB75';
			var fromcolor = 'a5a5a5';
		}
		if (first.hasClass('m4'))  {
			var tocolor = '7D5134';
			var fromcolor = 'a5a5a5';
		}
		el.addEvent('mouseover', function(){
			overfxs.start({
				'color': tocolor,
				'margin-left': 10
			});
		});
		el.addEvent('mouseout', function(){
			overfxs.start({
				'color': fromcolor,
				'margin-left': 0
			});
		});
	}
	
};



window.addEvent('domready', Site.start);

window.onload = function(){
	new Fx.Font($$('p','li','td'),$('shrink'),$('grow'));
}
