[jQuery] attempting to replace img src

[jQuery] attempting to replace img src


I would like to replace a link image with another image based on the
location of the page in the site structure.
Take for example this link - - <a class="apply" href="/apply/" ><img
src="/images/sitewide/top_nav_apply.gif" /></a>
If some one clicks this link they would be on www.example.com/apply/
and I would want the image at the top to be replaced with <a
class="apply" href="/apply/" ><img src="/images/sitewide/
top_nav_on_apply.gif" /></a>.
I can get the directory from window.location() but do not know if
jQuery has a 'replace' function.
Thanks,
Dan