function winopen(site)
{
	win = open(site,"win","width=640,height=480,screenX=0,screenY=0,menubar=no,scrollbars=yes,resizable=no");
	win.focus();
}

function oeffnefenster (url) {   fenster = window.open(url, "fenster1", "width=600,height=600,status=no,scrollbars=no,resizable=no");   fenster.focus();  }

$(document).ready(function() {

  $("#btn_movie_text").toggleClass("hover");
  $("#btn").toggleClass("hover");
//  $("#btn_movie_text").parents(".sub_header2_center").parents(".sub_header2").next(".movie_text_box_slide").slideToggle(1);
//  $("#btn_movie_text").parents(".sub_header2").next(".bc_slide").slideToggle(1);

  $("ul#topten li:nth-child(odd)").addClass("colored");
    
    $("ul#topten span#one").mouseover(function () {
      $("ul#topten li span.one").pause(slideToggle("slow"));
    });
    
    $(".sub_header_center .button").click(function() {
      $(this).toggleClass("hover");
      $(this).parents(".sub_header").next(".box").slideToggle("slow");
	  $(this).parents(".sub_header").next(".login-box").slideToggle("slow");
      $(this).parents(".sub_header").next(".bc_slide").slideToggle("slow", function() {
        $(".bar", this).animate({
          "width":"toggle"
        }, {
          duration: "slow" });
        });
      });
    
	
    $(".sub_header2_center .button").click(function() {
      $(this).toggleClass("hover");
      $(this).parents(".sub_header2_center").parents(".sub_header2").next(".movie_text_box_slide").slideToggle("slow");
      });
	
    $("#togglewrite").click(function() {
      $("#bc_review").slideToggle("slow");
      return false;
    });

    $("#togglenmdf").click(function() {
      $("#bc_nmdf_nonmemberform").slideToggle("slow");
      return false;
    });
    $("#togglenmdf").click(function() {
      $("#bc_nmdf_select").slideToggle("slow");
      return false;
    });
    
    $(".show_preview").hover(function () {
       $(this).children(".spot.info").stop().fadeIn("fast").fadeTo("fast", 1);
       }, function () {
       $(this).children(".spot.info").stop().fadeOut("fast");
    });
 
    $(".spot.info").click(function () {
        var aktuell = $(this).parent().children(".preview.dn");
        
        var img_width = $(this).parent().find("img:first").attr("width");
        var img_height = $(this).parent().find("img:first").attr("height");
        
        $(aktuell).width(img_width-15);
        
        var info_height = $(aktuell).height();
        
        $(aktuell).css("top", img_height - info_height - 10);
        $(aktuell).css("left", 3);
        
        $(".preview").not(aktuell).fadeOut();
        $(aktuell).fadeIn("fast");
        return false;
    });

      $("a.close_description").click(function () {
       $(this).parent().parent().parent().fadeOut("fast");
       return false;
       });
       
     $(".partner img").fadeTo("fast", 0.33);
     $(".partner img").hover(function() {
        $(this).fadeTo("fast", 1.00);
     }, function () {
        $(this).fadeTo("fast", 0.33); 
    });
    

    


/*$("a.catalog_level_1").parent("li").hide();*/

	$(".active_contains_subcatalogs").click(function () {  
		/*$(this).toggleClass("active_contains_subcatalogs");*/
		$("a.catalog_level_1").parent("li").slideToggle("fast");
       return false;
    }); 



	$(".contains_subcatalogs").click(function () {  
		/*$(this).toggleClass("active_contains_subcatalogs");*/
		$("a.catalog_level_1").parent("li").slideToggle("fast");
       return false;
    }); 


/*	
	    $(".active_contains_subcatalogs").click(function () {     
       $("a.catalog_level_1").parent("li").slideToggle("fast");
       return false;
    });

    $(".active_contains_subcatalogs a.catalog_level_1").click(function () {
       $("a.catalog_level_2").parent("li").slideToggle("fast");
       return false;
    });


	*/
});


/*	document.write("<style type='text/css'>.movie-cover {visibility:hidden;}</style>");

function initImage() {
	imageName = 'movie-cover';
	image_list = document.getElementsByName(imageName);
	
	for(i=0;i<image_list.length;i++) {
		image = image_list[i];
		setOpacity(image, 0);
		image.style.visibility = "visible";
		fadeIn(image.id,0);
	}
}
function fadeIn(objId,opacity) {
	
	obj=document.getElementById(objId);
	if(obj) {
		if (opacity <= 100) {
			setOpacity(obj, opacity);
			opacity += 10;
			window.setTimeout("fadeIn('"+objId+"',"+opacity+")", 100);
		}
	}
}
function setOpacity(obj, opacity) {

	opacity = (opacity == 100)?99.999:opacity;
	// IE/Win
	obj.style.filter = "alpha(opacity:"+opacity+")";
	// Safari<1.2, Konqueror
	obj.style.KHTMLOpacity = opacity/100;
	// Older Mozilla and Firefox
	obj.style.MozOpacity = opacity/100;
	// Safari 1.2, newer Firefox and Mozilla, CSS3
	obj.style.opacity = opacity/100;
}
window.onload = function() {initImage()}

*/

/* Image Rotator */

function theRotator() {
	//Set the opacity of all images to 0
	$('div#rotator ul li').css({opacity: 0.0});
	
	//Get the first image and display it (gets set to full opacity)
	$('div#rotator ul li:first').css({opacity: 1.0});
		
	//Call the rotator function to run the slideshow, 6000 = change to next image after 6 seconds
	setInterval('rotate()',6000);
	
}

function rotate() {	
	//Get the first image
	var current = ($('div#rotator ul li.show')?  $('div#rotator ul li.show') : $('div#rotator ul li:first'));

	//Get next image, when it reaches the end, rotate it back to the first image
	var next = ((current.next().length) ? ((current.next().hasClass('show')) ? $('div#rotator ul li:first') :current.next()) : $('div#rotator ul li:first'));	
	
	//Set the fade in effect for the next image, the show class has higher z-index
	next.css({opacity: 0.0})
	.addClass('show')
	.animate({opacity: 1.0}, 1000);

	//Hide the current image
	current.animate({opacity: 0.0}, 1000)
	.removeClass('show');
	
};

$(document).ready(function() {		
	//Load the slideshow
	theRotator();
});


<!-- print page

function printPage() {
if (window.print) {
jetztdrucken = confirm('Seite drucken ?');
if (jetztdrucken) window.print();
   }
}

//  End -->

// Tabs -->

$(document).ready(function() {
 
	$('.tabs a').click(function(){
		switch_tabs($(this));
	});
 
	switch_tabs($('.defaulttab'));
 
});
 
function switch_tabs(obj)
{
	$('.tab-content').hide();
	$('.tabs a').removeClass("selected");
	var id = obj.attr("rel");
 
	$('#'+id).show();
	obj.addClass("selected");
}

