title: JavaScript isn't working in Rails
body: <p>JavaScript isn't working in ruby on rails. I have included my JavaScript in the assets file and in the application.js with <code>//=require_tree .</code>.</p>
  
  <p>the code of the javascript i am trying to run:
  $( document ).ready(function() {</p>
  
  <pre><code>$('#nav &gt; div').hover(
      function () {
          var $this = $(this);
          $this.find('img').stop().animate({
              'width'     :'199px',
              'height'    :'199px',
              'top'       :'-25px',
              'left'      :'-25px',
              'opacity'   :'1.0'
          },500,'easeOutBack',function(){
              $(this).parent().find('ul').fadeIn(700);
          });
  
          $this.find('a:first,h2').addClass('active');
      },
      function () {
          var $this = $(this);
          $this.find('ul').fadeOut(500);
          $this.find('img').stop().animate({
              'width'     :'52px',
              'height'    :'52px',
              'top'       :'0px',
              'left'      :'0px',
              'opacity'   :'0.1'
          },5000,'easeOutBack');
  
          $this.find('a:first,h2').removeClass('active');
      }
  );
  </code></pre>
  
  <p>});</p>