title: How to serve images from subfolders in Javascript via Asset pipeline
body: <p>So I have a folder in my assets/javascripts folder that runs an image slideshow called galleryview. Inside this folder is a themes directory holding images for my "next" and "previous" buttons thus...</p>
  
  <p>assets/javascripts/galleryview/themes/</p>
  
  <p>now the javascript running this, links to these images via this....</p>
  
  <pre><code>//Determine path between current page and filmstrip images
  //Scan script tags and look for path to GalleryView plugin
          $('script').each(function(i){
              var s = $(this);
              if(s.attr('src') &amp;&amp; s.attr('src').match(/jquery\.galleryview/)){
                  img_path = s.attr('src').split('jquery.galleryview')[0]+'themes/';
              }
          });
  </code></pre>
  
  <p>HOWEVER, I'm using this in a Rails app now, so I need to point this img_path line to </p>
  
  <p>assets/images/</p>
  
  <p>so what should my imag_path look like now?</p>
  
  <pre><code>img_path = ?
  </code></pre>
  
  <hr>
  
  <p>Here is the entire javascript file code on jsfiddle....copy and past this into an editor and 
  the area I'm interested in is around line 389.</p>
  
  <p><a href="http://jsfiddle.net/thefonso/Sqmxa/" rel="nofollow">http://jsfiddle.net/thefonso/Sqmxa/</a></p>