var Site = {

	start: function(){

		if ($('zBoxCategoriesBody')){
			Site.createOverCats();
		}
		
		if ($('zBoxContentBody')){
			Site.createOverContent();
		}
	},

	createOverCats: function(){
		var timer = 0;
		var sideblocks = $$('#zBoxCategoriesBody li');

		var slidefxs = [];
		var colorfxs = [];

		sideblocks.each(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('sel') || first.hasClass('subsel')){
				var tocolor = 'fff';
				var fromcolor = 'fff';
			} else {
				var tocolor = 'AA0000';
				var fromcolor = '1C1C1C';
				el.mouseouted = true;
				el.addEvent('mouseenter', function(e){
					overfxs.start({
						//'color': tocolor,
						'margin-right': 10
					});

				});
				el.addEvent('mouseleave', function(e){
					overfxs.start({
						//'color': fromcolor,
						'margin-right': 0
					});
				});
			}
		}, this);
	},
	
	createOverContent: function(){
		var timer = 0;
		var sideblocks = $$('#zBoxContentBody li');

		var slidefxs = [];
		var colorfxs = [];

		sideblocks.each(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('sel') || first.hasClass('subsel')){
				var tocolor = 'fff';
				var fromcolor = 'fff';
			} else {
				var tocolor = 'AA0000';
				var fromcolor = '1C1C1C';
				el.mouseouted = true;
				el.addEvent('mouseenter', function(e){
					overfxs.start({
						//'color': tocolor,
						'margin-right': 10
					});

				});
				el.addEvent('mouseleave', function(e){
					overfxs.start({
						//'color': fromcolor,
						'margin-right': 0
					});
				});
			}
		}, this);
	}
	
};

window.onDomReady(Site.start);