Tracking incoming URL
<p>I have a situation where I need to change some CSS on a page based off the URL where the visitor came from.  I'm using a form to submit a value to a new page (a checkout page) which is hosted on a different server/site than where the form resides.  I have different forms sending this info over to the checkout page on 2 totally different sites.  On this checkout page, if the user comes from site A, I need to add a certain class to a div.  If the user comes over from site B, I need to add a different class to a div.  Something like this:</p>

<pre><code>if incoming URL is equal to www.abc.com, then addClass ('classABC');

if incoming URL is equal to www.xyz.com, then addClass ('classABC');
</code></pre>

<p>Am I providing enough information to properly evaluate this?  Ideally I'd like to pull this off in jQuery but not sure if there's an existing plugin that can check this.  One thing to note, not all the forms being submitted to the checkout page reside on the same pages (i.e. www.xyz.com/index.html).  Some may be on different pages through each site, so I need to be able to figure this out based off the primary URL.</p>

<p>Thanks!</p>
