[SOLVED] Is this possable with JQuery?

[SOLVED] Is this possable with JQuery?

I was wondering if something like this can be done using JQuery.

We have a CMS System that users input all there own data, links etc. We need to have a disclaimer every time someone goes to a link outside the site (or host of sites)

The question I have is can you code something to have jquery run a function each time an Href is clicked and have it check the URL to see if its in the acceptable sites and if not you will get prompted that you are about to leave the site etc.

Thanks.