var global_count = 1;

window.addEvent('domready', function(){

				var list = $$('ul#menulevel1 li a');
					list.each(function(element) {
				
				var fx = new Fx.Styles(element, {duration:200, wait:false});
				
				element.addEvent('mouseenter', function(){
					fx.start({
						'background-color': '#465341',
						'color': '#FFF'
					});
				});
				
				element.addEvent('mouseleave', function(){
					fx.start({
						'background-color': '#bbc0c4',
						'color': '#000'
					});
				});
				
			});
	});

Fx.Font = new Class({
	initialize: function(elements, sid, gid, growsize){
		this.growsize = growsize || 3; 
		this.elements = [];
		
		var currentSize;
 		elements.each(function(el){
			currentSize = el.getStyle('font-size').toInt();
			
			if(Cookie.get != null && (size = Cookie.get('fontSize')) && size == 'large'){
				el.setStyle('font-size',currentSize+this.growsize+'px');
			}
			
			this.elements.push([el,currentSize]);									   
		},this);
		
		$(gid).onclick = function(){this.grow()}.bind(this);
		$(sid).onclick = function(){this.shrink()}.bind(this);
	},
	grow: function(){
		this.elements.each(function(el){
			if(el[0].getStyle('font-size').toInt() == el[1])
				el[0].effect('font-size',{duration:300,unit:'px'}).custom(el[1],el[1]+this.growsize);			
		},this);
		
		Cookie.set('fontSize','large',5);
	},
	shrink: function(){
		this.elements.each(function(el){
			if(el[0].getStyle('font-size').toInt() == el[1]+this.growsize)
				el[0].effect('font-size',{duration:300,unit:'px'}).custom(el[1]+this.growsize, el[1]);
		},this);
		
		Cookie.set('fontSize','small',5);		
	}						
});