$(document).ready(function(){
 
 // Search input placeholder
 var wert = $("input[name=suchbegriff]").val();
 
 $("input[name=suchbegriff]").focus(function(){
   if($(this).val() == wert){
     $(this).val("");
   }
 });

 $("input[name=suchbegriff]").focusout(function(){
   if($(this).val() == ""){
     $(this).val(wert);
   }
 });
 
 // Sticky Footer
 positionFooter(); 
 
 $(window).load(positionFooter).scroll(positionFooter).resize(positionFooter);

 function positionFooter() {
   var docHeight = $(document.body).height() - $("#sticky-footer-push").height();
   if(docHeight < $(window).height()){
     var diff = $(window).height() - docHeight;
     if (!$("#sticky-footer-push").length > 0) {
       $("#footer").before('<div id="sticky-footer-push"></div>');
     }
     $("#sticky-footer-push").height(diff);
   }
 } 
 
});
