I think that if you leave out part two, traffic from each site to the other will show up as referred. I'm not sure that there are any other consequences.
As for the jQuery stuff, I can't fault the logic, but I'm no web developer... sorry not to be more helpful.