window.addEvent('domready', function() { 
	$$('div#Hauptnavigation div.hnavi').addEvents({
    		'mouseover': function(){
				//this.setStyle('background-color', '#e7d3af');
				this.set('tween', {duration: 0});
				this.tween('background-color', '#e7d3af', '#e7d3af');
			},
			'mouseout': function(){
				this.set('tween', {duration: 500});
				this.tween('background-color', '#e7d3af', '#eedec1');
			}
	});
	$$('div#contentlinks div.snavi a').addEvents({
		'mouseover': function(){
			this.parentNode.setStyle('background', 'url(fileadmin/images/snavi_pfeil.gif) no-repeat center left');
			this.set('tween', {duration: 0});
			this.tween('color','#5B4D34', '#c30f24');
		},
		'mouseout': function(){
			$$('div#contentlinks div.snavi').setStyle('background', 'none');
			this.set('tween', {duration: 500});
			this.tween('color','#c30f24', '#5B4D34');
		}
	});
	$$('div#myPictureSilderGallery div.myPictureSilder').setStyle('position', 'absolute');	
	$$('div#myPictureSilderGallery div.myPictureSilder').setStyle('opacity', '0');	
	fadeMyPicutre();
});


var currentElement = null;
var elementContainer = null;
function fadeMyPicutre()
{
	if( elementContainer == null ){
		elementContainer = $('myPictureSilderGallery');
		if( elementContainer == null ){
			return;
		}
		currentElement = $('myPictureSilderGallery').getFirst('div');
		currentElement.set('tween', {duration: 1000});
		currentElement.tween('opacity', '1');
	}else{
		var current = currentElement;
		current.set('tween', {duration: 1000});
		current.tween('opacity', '0');
		var next = current.getNext('div');
		if( next == null ){
			next = $('myPictureSilderGallery').getFirst('div');
		}
		next.set('tween', {duration: 1000});
		next.tween('opacity', '1');
		currentElement = next;
	}
	var t = setTimeout("fadeMyPicutre()",10000);
}