function Switch() { // "Showroom" auf der Startseite 
	var tabContainers = $('div#showroom > div');
	tabContainers.hide().filter('#showbox1').show(); // Festlegen, welche Box zuerst angezeigt wird
	var autos = true; // automatischer Switch: an
	var i = 0;
	var j = $("#showroom > div.showbox").size() - 1; // Anzahl der Boxen
        $('#showroomnav a').addClass(function() {
            return 'showroomnav-' + this.hash.replace(/[#]/, "");
        });

	$('#showroomnav a').click(function() {
		tabContainers.hide(); 
		tabContainers.filter(this.hash).fadeIn(1500);
		$('#showroomnav a').removeClass('active');
		$(this).addClass('active');
		autos = false;
		i = $(this).attr('rel') - 1;
		return false;
	});
	
	function autoswitch() {
			if (i < j) { i++; } else { i = 0; }
			tabContainers.hide();
			$('div#showroom > div').hide().filter('#'+tabContainers[i].id).fadeIn(1500);
			var sel = '#'+tabContainers[i].id;
			$('#showroomnav a').removeClass('active').filter('#showroomnav a[hash='+sel+']').addClass('active');
	}
	
	$('#showroom').mouseleave(function() {
		if (autos == false) {
			autos = true;
		}
	});
        $('#showroom').mouseenter(function(){
                autos = false;
	});
	
	setInterval(function() {
		if (autos) {
			autoswitch();
		}
	}, 6500);

}
