Rails dev w jQuery : issue in relative path...

Rails dev w jQuery : issue in relative path...

My web app is deployed with Passenger in a sub-uri,  http://www.mydomain.com/vacademy/ 
and I am displaying a player in a page 
the swf is located in ../public/dist/flowplayer-3.1.5.swf 

Using  Prototype library  I wrote a script : 

  1.    <script> 
  2.   $f("player", "./dist/flowplayer-3.1.5.swf", { 
.... 
and I don't have any problem to get the player installed    from 
http://www.mydomain.com/vacademy/dist/flowplayer-3.1.5.swf 


but when using jQuery 
<script> 

  1. $(function() { 
  2. ..
  3.      $f("player2", "./dist/flowplayer-3.1.5.swf", { 
... 
the .swf is not found as the relative url is based on the 
controller ...   http://www.mydomain.com/vacademy/mycontroller/dist/flowplayer-3.1.5.swf 


is there anyway to bypass this behavior, not using a relative path 

or  getting the rails public path in the jQuery path ? 

thanks for your help 

erwin