// JavaScript Document
function openplayer() {
   player = window.open("player.html", "fenster1", "width=390,height=130,status=0,location=0,scrollbars=0,resizable=0");
   player.focus();
   }
function closeplayer()
   {
      if(false == player.closed)
      {
         player.close();
      }
}
/*
function daumenKino() {
    var $alt = $('#headerImg img.obersteebene');
    var $neu = $alt.next().length ? $alt.next() : $('#headerImg img:first');
    $alt.addClass('mittlereebene');
	$alt.removeClass('obersteebene');
    $neu.css({opacity: 0.0});
    $neu.addClass('obersteebene');
    $neu.animate({opacity: 1.0}, 2000, function() {
            $alt.removeClass('mittlereebene');
    });
}*/
document.writeln('<style type="text\/css">');
document.writeln("ul#nav li:hover ul, ul#nav li:focus ul {display: none;}");
document.writeln("div#audioplayer {display: block;}");
document.writeln("div.nivoSlider img {display: none;}");
document.writeln('<\/style>');
 
$(window).load(function() {
	$('#slider').nivoSlider({
        effect: 'fade', // Specify sets like: 'fold,fade,sliceDown'
        animSpeed: 500, // Slide transition speed
        pauseTime: 4000, // How long each slide will show
        startSlide: 0, // Set starting Slide (0 index)
        directionNav: false, // Next & Prev navigation
        directionNavHide: false, // Only show on hover
        controlNav: false, // 1,2,3... navigation
        controlNavThumbs: false, // Use thumbnails for Control Nav
        controlNavThumbsFromRel: false, // Use image rel for thumbs
        keyboardNav: true, // Use left & right arrows
        pauseOnHover: true, // Stop animation while hovering
        manualAdvance: false, // Force manual transitions
        captionOpacity: 0.8, // Universal caption opacity
        prevText: 'Prev', // Prev directionNav text
        nextText: 'Next', // Next directionNav text
        randomStart: false // Start on a random slide
       });


//cache nav  
        var nav = $("#nav");  
  
        //add indicators and hovers to submenu parents  
        nav.find("li").each(function() {  
            if ($(this).find("ul").length > 0) {  
  				
               
                //show subnav on hover  
                $(this).bind('mouseenter focusin', function() {  
                    $(this).find("ul").stop(true, true).slideDown();
					$(this).addClass('clicked');  
                });  
  
                //hide submenus on exit  
                $(this).bind('mouseleave focusout', function() {  
                    $(this).find("ul").stop(true, true).slideUp(); 
					$(this).removeClass('clicked'); 
                }); 
            }  
        });
		$('div.jp-play').css('cursor','pointer');
		$('div.jp-play').toggle(function(){
		openplayer();
		$(this).css({'background-image' : 'url(skin/jplayer.blue.monday.jpg)', 'background-position' : '-19px -186px', 'background-repeat' : 'no-repeat'});
		$('div.jp-play img').addClass('two');
		}, function() {
	 	closeplayer();
		$(this).css({'background-image' : 'url(skin/jplayer.blue.monday.jpg)', 'background-position' : '0 -186px', 'background-repeat' : 'no-repeat'});
		$('div.jp-play img').removeClass('two');
		}); 
		
});
