Hello all,

For ages now, I've been developing a tool / jQuery plugin that has certain features, not worth mentioning in this thread.
I'm now contemplating on trashing vast parts of it, except one feature, which a webmaster that uses it really cherishes:

- Increasing site PageRank by altering selected outgoing links (only some of them - not all of them).
(We've measured, that the technique really works)

Most notably, links to high PR sites needn't forward PageRank.
Quite a few webmasters would prefer to keep their PR on the site, rather than throw it at e.g. Twitter / Facebook.

Question 1: What's the most recommended technique for doing this? (I've read about employing iFrames or JavaScript links)

Question 2: I would prefer to use a generic JS technique and maybe simplify my existing tool to just be a pure jQuery plugin or conventional JS, that does nothing but mask these links.
What syntax do you reckon would be the best?

Regarding question 2 - please let me state some requirements:

- Search engines have no way of parsing the JS links - otherwise, this could result in either PR being forwarded, making the solution useless, or even a penalty.
(That can partially be achieved by disallowing the spider to crawl the JS in robots.txt)

- Arbitrarily complex links can be substituted generically, for example the following standard "Twitter Button" link:
<a href='http://twitter.com/share' class='twitter-share-button' data-url='... data-count='horizontal' data-via='...' data-related='pubcon' data-text='...'>Tweet</a>

A solution to question 2 that comes to my mind is simply substituting '<' with '[' and '>' with ']', delivered as text nodes similar to what "BBCode" does prior to server-side substitution.
That could be parsed rapidly and with a simple algorithm (e.g. using a simple RegEx for the substitution) in pure JS, allowing for complex links to be replaced.


What do you think?


Thanks in advance and kind regards