URL cleanup.
Merged 2 jQuery functions.