added replacement of relative links in js