/* 
	Rollover-Fade fuer alle Links in der Hauptnavigation
*/
window.addEvent('domready', function () {

	var duration = 100;
	
	$$('div.navigation a').each(function(a) {
		var x = new Element('div', {'class': 'navigation-elements-backplate'});
		a.getParent().adopt(x);
		a.addEvent('mouseenter', function() {
			if (this.fx) this.fx.stop();
			this.fx = new Fx.Styles(
				this.getParent().getElement('div'), 
				{ wait: false, duration: duration }
			).start({'opacity': 1})
			.addEvent('complete', function() {
				this.fx = null;					
			});
		});
		a.addEvent('mouseleave', function() {
			if (this.fx) this.fx.stop();
			this.fx = new Fx.Styles(
				this.getParent().getElement('div'), 
				{ wait: false, duration: duration }
			).start({'opacity': 0})
			.addEvent('complete', function() {
				this.fx = null;					
			});
		});
	});
});

/*
	Scrollen bei allen seiteninternen Links
*/
window.addEvent('domready', function () {
	var eba_SmoothScroll = new SmoothScroll();
});
