Ext.onReady(function() {
	Ext.select('#navigationLinks div.level1').insertHtml('beforeEnd', "<div class=\"hover\"></div>");
	Ext.select('#navigationLinks div.level1 a').setStyle('background-image', 'none');
	
	Ext.select('#navigationLinks div.level1 div.hover').each(function(element, composit, index){
		this.addClass('farbe'+(index+1));
		
		if (!this.parent().hasClass('aktiv'))
			this.setOpacity(0);
	});
	
	Ext.select('#navigationLinks div.level1 a').addListener('mouseover', function(){
		var e = Ext.get(this);
		e.next().stopFx();				
		
		if(!e.parent().hasClass('aktiv'))
			e.next().shift({opacity: 1, duration: .15});
		else
			e.next().shift({opacity: 0.7, duration: .15});
	})
	
	Ext.select('#navigationLinks div.level1 a').addListener('mouseout', function(){
		var e = Ext.get(this);
		e.next().stopFx();
		
		if(!e.parent().hasClass('aktiv'))
			e.next().shift({opacity: 0, duration: 1});
		else
			e.next().shift({opacity: 1, duration: 1});
	})
});
