$(function() {
  $('#menu_view_link').click(function() {
    $('#food-menu').css({left: '50%'});
    $('#food-menu').fadeIn();
    return false;
  });
  
  $('#food-menu-close').click(function() {
    $('#food-menu').fadeOut();
  });
  
//   $('#food-menu-scrollbutton').mousedown(function(e) {
//     this.dragging = true;
//     this.clientY = e.clientY;
//   }).mouseup(function() {
//     this.dragging = false;
//   });
//   $(document).mousemove(function(e) {
//     var that = $('#food-menu-scrollbar')[0];
//     if(!that.btn) {
//       that.btn = $('#food-menu-scrollbutton')[0];
//       that.maxTop = parseInt($(that).css('height')) - parseInt($('#food-menu-scrollbutton').height());
//     }
//     if(that.btn.dragging) {
//       var delta = that.btn.clientY - e.clientY;
//       if(delta != 0) {
//         var top = parseInt($(that.btn).css('top')) - delta;
//         if(top > that.maxTop) top = that.maxTop;
//         if(top < 0) top = 0;
//         $(that.btn).css({top: top});
//         that.btn.clientY = e.clientY;
//       }
//       return false;
//     }
//   }).mouseup(function() {
//     $('#food-menu-scrollbar')[0].btn.dragging = false;
//   });
//   $('#food-menu-wrapper').jScrollPane({showArrows:true, scrollbarWidth:19, dragMaxHeight:43, contentHeight: 1184});
	$('#food-menu-wrapper').jScrollPane({showArrows:true, scrollbarWidth:19, dragMaxHeight:43, contentHeight: 2260});
});
