$(document).ready(function() {

if($("#galerie .fot").length > 0) {
    //alert("Skript etc. erkannt!");

	$("#galerie .fot").css({'visibility':'visible'});				
	var fotoanzahl = $("#galerie .fot").length;
	$("#galerie .fot").hide();
	$("#galerie .fot:first").show();

  	// Klick ins Bild
	$("#galerie .fot a").click(function() {

		//var activeTab = $(this);
		var fotoNeu = $(this).attr("href");
		//alert(fotoNeu);
		
		$("#galerie .fot").hide();
		var showfoto = "#galerie #f"+fotoNeu;		
		//alert(showfoto);
		$(showfoto).fadeIn();			

		return false;
	});	
}

if($("#videoSx .vids").length > 0) {
	/*
	$("#galerie .fot").css({'visibility':'visible'});				
	var fotoanzahl = $("#galerie .fot").length;
	$("#galerie .fot").hide();
	$("#galerie .fot:first").show();
	*/
	$("#videoMenu a:first").addClass('active');
	
  	// Klick ins Bild
	$("#videoMenu a").click(function() {
		$('#videoMenu a').removeClass('active');
		$(this).addClass('active');

		var vidNeu = $(this).attr("href");
		//alert(vidNeu);
		
		$("#videoSx .vids").css({'display':'none'});

		var showfoto = "#videoSx #"+vidNeu;		
		$(showfoto).css({'display':'inline'});			

		return false;
	});	
}


});		
