


/* Spamschutz */
function menschlichkeit() {
  
  var mensch = document.getElementById("m"+"ensch");
  var mensch_wert = mensch.alt;

  if( mensch_wert == 'leer' )
  {
    mensch.src = "/img/checked.gif";
    mensch.alt = "voll";
    var hidden_field = document.createElement("input");
    var attr_type = document.createAttribute("type");
    attr_type.nodeValue = "hidden";
    var attr_name = document.createAttribute("name");
    attr_name.nodeValue = "input[spamschutz]";
    var attr_id = document.createAttribute("id");
    attr_id.nodeValue = "human";
    var attr_value = document.createAttribute("value");
    attr_value.nodeValue = "ja";
    
    hidden_field.setAttributeNode(attr_type);
    hidden_field.setAttributeNode(attr_name);
    hidden_field.setAttributeNode(attr_id);
    hidden_field.setAttributeNode(attr_value);
    
    document.getElementById("spamschutz").appendChild(hidden_field);
  }

  if( mensch_wert == 'voll' )
  {
    mensch.src = "/img/unchecked.gif";
    mensch.alt = "leer";
    document.getElementById("spamschutz").removeChild(document.getElementById("h"+"uman"));
  }

  return;
}



      $(document).ready(function(){
      var $path_to_pics = "/img/";
      $(".no_js").hide(); 


  /*MENUE*/

      $(".menue_prt").css("display","none");
      $(".logo").bind("mouseenter",fadeMenueIn);
      
       // Is this a version of IE?
    if($.browser.msie&& $.browser.version<="7.0"){
        $("#content_wrapper").bind("mouseenter", fadeMenueOut);
    }
    else{
      $("#menue_container").bind("mouseleave", fadeMenueOut);
     }
      function fadeMenueIn(){
      $(".menue_prt").stop();
      $(".menue_prt:visible").fadeTo(0,1);
      $(".menue_prt:visible").css("display","none");
        var $pos = $("#menue_prt_first").next();
        $("#menue_prt_first").fadeIn(50,function(){
          $pos.fadeIn(50,function(){
            $pos = $pos.next();
            $pos.fadeIn(50,function(){
              $pos = $pos.next();
                $pos.fadeIn(50);
            });
          });
        });
      };
      function fadeMenueOut() {
      $(".menue_prt").stop();
      $(".menue_prt:visible").fadeTo(0,1);
          var $pos = $(".menue_prt:last").prev();
          $(".menue_prt:last").fadeOut(50,function(){
            $pos.fadeOut(50,function(){
              $pos = $pos.prev();
              $pos.fadeOut(50,function(){
               $pos = $pos.prev();
                 $pos.fadeOut(50);
              });
            });
          });
      };
       $(".menue_prt").css("display","none");   
       
  /*
  
      $(".menue_prt").css("display","none");
      $(".logo").bind("mouseenter",fadeMenueIn);
      $("#menue_container").bind("mouseleave", fadeMenueOut);
      
      function fadeMenueIn(){
      $(".menue_prt").stop();
      $(".menue_prt:visible").fadeTo(0,1);
      $(".menue_prt:visible").css("display","none");
        var $pos = $("#menue_prt_first").next();
        $("#menue_prt_first").fadeIn(50,function(){
          $pos.fadeIn(50,function(){
            $pos = $pos.next();
            $pos.fadeIn(50,function(){
              $pos = $pos.next();
                $pos.fadeIn(50);
            });
          });
        });
      };
      function fadeMenueOut() {
      $(".menue_prt").stop();
      $(".menue_prt:visible").fadeTo(0,1);
          var $pos = $(".menue_prt:last").prev();
          $(".menue_prt:last").fadeOut(50,function(){
            $pos.fadeOut(50,function(){
              $pos = $pos.prev();
              $pos.fadeOut(50,function(){
               $pos = $pos.prev();
                 $pos.fadeOut(50);
              });
            });
          });
      };
       $(".menue_prt").css("display","none");     */
   /*      
            $("#menue_prt").each(function(i){
              var i = $(".menue_prt:hidden").size();
              var $pos = $("#menue_prt").eq(i);
              $("#menue_container").bind("mouseenter", function () {
                $pos.fadeIn("fast");
              });
            });

      $("#menue_container").bind("mouseenter", function () {
        var pos = $(".menue_prt:hidden:first");
        var elements = $(".menue_prt:hidden");
        var $elements_size = $(".menue_prt:hidden").size();
        var i = 0; 
        jQuery.each(elements, function() {
           $(pos).fadeIn(1500, function(){
                pos = pos.next();
           });
           i = i+1;
           return ( i <= elements);
          });
      });      
   */
    
    
    
    /* THumbnail-rollover (extra kleine Bilder)*/
      /* thumbs-fallback : wenn kein JS, wird hover geladen, sonst:     */
  
      $(".thumb").each(function(i){
        var match = $(".thumb").eq(i);
		    $(match).css("filter","alpha(opacity=40)");
		    $(match).css("-moz-opacity","0.4");
		    $(match).css("-khtml-opacity","0.4");
		    $(match).css("opacity","0.4");
      }); 
      
      $(".vids").each(function(i){
        var match = $(".vids").eq(i);
		    $(match).css("filter","alpha(opacity=40)");
		    $(match).css("-moz-opacity","0.4");
		    $(match).css("-khtml-opacity","0.4");
		    $(match).css("opacity","0.4");
      });

      
    /* mouse over:*/
      $(".thumb").mouseenter(function(){
        var pic = $(this).attr("id");
		    $(this).css("filter","alpha(opacity=100)");
		    $(this).css("-moz-opacity","1");
		    $(this).css("-khtml-opacity","1");
		    $(this).css("opacity","1");
      });
      $(".thumb").mouseout(function(){ 
        var pic = $(this).attr("id");
		    $(this).css("filter","alpha(opacity=40)");
		    $(this).css("-moz-opacity","0.4");
		    $(this).css("-khtml-opacity","0.4");
		    $(this).css("opacity","0.4");
      });   
    /* analog fuer videos*/
      $(".vids").mouseenter(function(){
        var vidpic = $(this).attr("id");
		    $(this).css("filter","alpha(opacity=100)");
		    $(this).css("-moz-opacity","1");
		    $(this).css("-khtml-opacity","1");
		    $(this).css("opacity","1"); 
      });
      $(".vids").mouseout(function(){ 
        var vidpic = $(this).attr("id");
        var pic = $(this).attr("id");
		    $(this).css("filter","alpha(opacity=40)");
		    $(this).css("-moz-opacity","0.4");
		    $(this).css("-khtml-opacity","0.4");
		    $(this).css("opacity","0.4");
      });
      
      

      $(".thumb_gal_hover").each(function(i){
        var match = $(".thumb_gal_hover").eq(i);
		    $(match).css("filter","alpha(opacity=40)");
		    $(match).css("-moz-opacity","0.4");
		    $(match).css("-khtml-opacity","0.4");
		    $(match).css("opacity","0.4");
      }); 
          	
	    $(".thumb_gal_hover").mouseover(function(){
		    $(this).css("filter","alpha(opacity=100)");
		    $(this).css("-moz-opacity","1");
		    $(this).css("-khtml-opacity","1");
		    $(this).css("opacity","1");
	    });  	
	    $(".thumb_gal_hover").mouseout(function(){
		    $(this).css("filter","alpha(opacity=40)");
		    $(this).css("-moz-opacity","0.4");
		    $(this).css("-khtml-opacity","0.4");
		    $(this).css("opacity","0.4");
	    });	

      
      
      /*
      function reduce_opacity(){
		    $(this).css("filter","alpha(opacity=40)");
		    $(this).css("-moz-opacity","0.4");
		    $(this).css("-khtml-opacity","0.4");
		    $(this).css("opacity","0.4");
      };
      function set_opacity(){
		    $(this).css("filter","alpha(opacity=100)");
		    $(this).css("-moz-opacity","1");
		    $(this).css("-khtml-opacity","1");
		    $(this).css("opacity","1");
      };
      */
 

     /* Gallery -rollover Videos   */      
      $(".change").each(function(i){
        var match = $(".change").eq(i);
		    $(match).css("filter","alpha(opacity=40)");
		    $(match).css("-moz-opacity","0.4");
		    $(match).css("-khtml-opacity","0.4");
		    $(match).css("opacity","0.4");
      }); 
    	
	$(".gallery_vid_img").mouseover(function(){
		var child = $("> .change", this);
		$(child).css("filter","alpha(opacity=100)");
		$(child).css("-moz-opacity","1");
		$(child).css("-khtml-opacity","1");
		$(child).css("opacity","1");
	});	
	$(".gallery_vid_img").mouseout(function(){
		var child = $("> .change", this);
		$(child).css("filter","alpha(opacity=40)");
		$(child).css("-moz-opacity","0.4");
		$(child).css("-khtml-opacity","0.4");
		$(child).css("opacity","0.4");
	});	
     
	
		$(".playbutton").css("filter","alpha(opacity=100)");
		$(".playbutton").css("-moz-opacity","1");
		$(".playbutton").css("-khtml-opacity","1");
		$(".playbutton").css("opacity","1");

      
      

    
    /*Hover &uuml;ber buttons*/
    
    $(".btn").mouseenter(function(){
		   var identify = $(this).attr("id");
      $(this).attr("src",$path_to_pics+"hover_"+identify+".gif");
    });
        
    $(".btn").mouseleave(function(){
		   var identify = $(this).attr("id");
      $(this).attr("src",$path_to_pics+""+identify+".gif");
    });  
      
    /*FORMULAR*/
    

   $("#form_prt2").hide();
   $("#btn_weiter").show();   
   $("#btn_zurueck").show();
   
   $("#btn_weiter").click(function(){
    $("#form_prt1").hide(function(){
      $("#form_prt2").show();
    });
   });
   $("#btn_zurueck").click(function(){
    $("#form_prt2").hide(function(){
      $("#form_prt1").show();
    });
   }); 
   
     
   $("#bartender").mouseup(function(){
    $("#more").hide();
   });     
   $("#connaisseur").mouseup(function(){
    $("#more").show();
   });
   
     
   $("#hide_betrieb").mouseup(function(){
    $("#betrieb").hide();
   });     
   $("#show_betrieb").mouseup(function(){
    $("#betrieb").show();
   });
      
      
       
   $('img').attr('title','');
      
   

   
});
