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

	if (document.getElementById('shandles')) {
		// Mit Subnavi
		if (document.getElementById('slidebox')) {
		var slider = new noobSlide({
			box: $('slidebox'),
			items: $ES('div.in_cont','slidebox'),
			handles: $ES('span','shandles'),
			size: 830,
			onWalk: function(currentItem,currentHandle){
				//style for handles
				this.handles.removeClass('active');
				$$(currentHandle,this.handles[this.currentIndex]).addClass('active');
			},
			fxOptions: {
				duration: 600,
				transition: Fx.Transitions.Quart.easeInOut,
				wait: false
			},
			buttons: {
				previous: $('prev'),
				next: $('next')
			}
		});
		}
	} else {
		// Ohne Subnavi
		if (document.getElementById('slidebox')) {
		var slider = new noobSlide({
			box: $('slidebox'),
			items: $ES('div.in_cont','slidebox'),
			size: 830,
			fxOptions: {
				duration: 600,
				transition: Fx.Transitions.Quart.easeInOut,
				wait: false
			},
			buttons: {
				previous: $('prev'),
				next: $('next')
			}
		});	
		}
	}
	
		/* Tipps on the Team-Images */

		var Tipp1 = new Tips($$('.tippImg'), {
			maxTitleChars	: 150,
			initialize:function(){
				this.fx = new Fx.Style(this.toolTip, 'opacity', {duration: 500, wait: false}).set(0);
			},
			onShow: function(toolTip) {this.fx.start(0.8);},
			onHide: function(toolTip) {this.fx.start(0);}
		});

});
