mod function var path for use in rails

rails compress js into application.js,so can't set valid path for swf and image file