/*
 * Enthält die Ergänzungen zu den
 * Mootools Scripten
 * Wird gebraucht für:
 * Tooltips,
 * Startseiten Topseller Funktion,
 * Scroller für Blog
 */
window.addEvent('domready', function(){
	var tips = new Tips($$('.Tips'), {
		className: 'custom'
	});
});

window.addEvent('domready', function(){
	//-vertical
	try{
		mySlide = new Fx.Slide('slider_fest');
		mySlide2 = new Fx.Slide('slider_fest', {mode: 'horizontal'});
	}
		catch(Exception){
	}
});

var act_out = 1;
var max = 5;
var mySlide;
var mySlide2;
var px = 3;//mehr=schneller
var timer;

var act_out = 1;
var max = 5;
var mySlide;
var mySlide2;

var px = 3;//mehr=schneller
var timer;
function scrollDenDiv(val){
	clearTimeout(timer);
	d=document.getElementById('blog')
	y=d.scrollTop;
	if(val==1)y-=px;
	if(val==2)y+=px;
	if(y<=d.scrollHeight-d.offsetHeight+px&&y>=0-px){
		d.scrollTop=y;
		timer=setTimeout('scrollDenDiv('+val+')',50);
	}
	if(y<0||y>d.scrollHeight-d.offsetHeight){
		clearTimeout(timer);
	}
}

function sw(max){
	document.getElementById('outfit_'+act_out).style.display = 'none';
	act_out ++;
	if(act_out > max){
		act_out = 1;
	}
	document.getElementById('outfit_'+act_out).style.display = 'block';
	mySlide.slideIn();
}
function sw2(max){
	document.getElementById('outfit_'+act_out).style.display = 'none';
	act_out --;
	if(act_out < 1){
		act_out = max;
	}
	document.getElementById('outfit_'+act_out).style.display = 'block';
	mySlide2.slideIn();
}

function switchOutfit(max){
	mySlide.slideOut();
	setTimeout(function(){sw(max);},1000);
}
function switchOutfit2(max){
	mySlide2.slideOut();
	setTimeout(function(){sw2(max);},1000);
}
