  // enable printing
  $(document).ready(function() {
    $('#print').click(function() {
      $('.main').printElement({printMode:'popup'});
    });
  });

  // enable send to a frint
  $(document).ready(function() {
    $("#mail").click(function(){
      $("#mail").attr('href', '/generelt/tipfriend?link=' + window.location);
    });    
    $("#mail").fancybox({
      'scrolling'    : 'no',
      'titleShow'    : false
    });
  });

  // enable search from top field
  $(document).ready(function() {
    $("#searchTopImg").click(function(){
      window.location = '/materialekatalog/soeg?search=' + $("#searchTop").val();
    });
    $("#searchTop").keypress(function(event) {
      if (event.which == '13') {
        event.preventDefault();
        window.location = '/materialekatalog/soeg?search=' + $("#searchTop").val();
      }
    });
  });

  $(document).ready(function() {
    floatingMenu.add('menufloating',  
        {  
            // Represents distance from left or right browser window  
            // border depending upon property used. Only one should be  
            // specified.  
            // targetLeft: 0,  
            //targetRight: 10,  
  
            // Represents distance from top or bottom browser window  
            // border depending upon property used. Only one should be  
            // specified.  
            targetTop: 10,  
            // targetBottom: 0,  
          
          prohibitXMovement: true,
  
            // Uncomment one of those if you need centering on  
            // X- or Y- axis.  
            // centerX: true,  
            // centerY: true,  
  
            // Remove this one if you don't want snap effect  
            snap: true  
        });  
  });
