title: Jade / Node.JS not processing JQuery properly
body: <p>Let me start off by saying I have no clue how to debug node.js. I've dabbled in some languages, but not node.js. I'm trying to install a managed package on an Ubuntu 12.04 server and having troubles getting things to work functionally out of the box.</p>
  
  <p>I need to not upgrade past v0.8 node, due to the package.</p>
  
  <p><code>node -v : v0.8.0</code>
  <code>npm -v : 1.1.32</code></p>
  
  <p>Here is what I'm getting from Express logging:</p>
  
  <pre><code>Error: /home/ubuntu/lobby/views/includes/js/center.jade:4
  2| 
  3|   jQuery.fn.center = function() {
  &gt; 4|     this.css('position', 'absolute');
  5|     this.css('top', Math.max(0, (($(window).height() - this.outerHeight()) / 2) + $(window).scrollTop()) + "px");
  6|     this.css('left', Math.max(0, (($(window).width() - this.outerWidth()) / 2) + $(window).scrollLeft()) + "px");
  7|     return this;
  
  unexpected text ;
  
  
  at Object.Lexer.fail (/home/ubuntu/lobby/node_modules/jade/lib/lexer.js:817:11)
  at Object.Lexer.next (/home/ubuntu/lobby/node_modules/jade/lib/lexer.js:876:15)
  at Object.Lexer.lookahead (/home/ubuntu/lobby/node_modules/jade/lib/lexer.js:114:46)
  at Parser.lookahead (/home/ubuntu/lobby/node_modules/jade/lib/parser.js:100:23)
  at Parser.peek (/home/ubuntu/lobby/node_modules/jade/lib/parser.js:77:17)
  at Parser.tag (/home/ubuntu/lobby/node_modules/jade/lib/parser.js:733:22)
  at Parser.parseTag (/home/ubuntu/lobby/node_modules/jade/lib/parser.js:719:17)
  at Parser.parseExpr (/home/ubuntu/lobby/node_modules/jade/lib/parser.js:188:21)
  at Parser.block (/home/ubuntu/lobby/node_modules/jade/lib/parser.js:689:25)
  at Parser.tag (/home/ubuntu/lobby/node_modules/jade/lib/parser.js:806:26)
  </code></pre>
  
  <p>Here is the code for that file:</p>
  
  <pre><code>script
  
  jQuery.fn.center = function() {
   this.css('position', 'absolute');
   this.css('top', Math.max(0, (($(window).height() - this.outerHeight()) / 2) + $(window).scrollTop()) + "px");
   this.css('left', Math.max(0, (($(window).width() - this.outerWidth()) / 2) + $(window).scrollLeft()) + "px");
  return this;
  }
  
  $(document).ready(function() {
   $('.main').center();
  });
  </code></pre>