/**
 * Hide your affiliate links using Javascript
 * 
 * Copyright 2008 Harvey Kane <code@ragepank.com>
 * 
 * See the enclosed file license.txt for license information (LGPL). If you
 * did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.
 *
 * @author  Harvey Kane <code@ragepank.com>
 * @license http://www.fsf.org/copyleft/lgpl.html GNU Lesser General Public License
 * @link    http://www.ragepank.com
 *
 * define your affiliate links in the following format from line 22 onwards...
 * aff['http://www.domain.com/AFFILIATE_LINK/']             = 'http://www.domain.com/REGULAR_LINK/';
 * aff['http://www.domain.com/ANOTHER_AFFILIATE_LINK/']     = 'http://www.domain.com/ANOTHER_REGULAR_LINK/';
 * aff['http://www.domain.com/YET_ANOTHER_AFFILIATE_LINK/'] = 'http://www.domain.com/YET_ANOTHER_REGULAR_LINK/';
 * 
 */

var aff = new Array();

/* define your links here */
aff['http://www.pimpfreevids.com/?r=pimp1413&p=ft&c=1&j=12&t=clitpics'] = 'http://www.pimpfreevids.com/';
aff['http://www.freepornfriend.com/clitpics/?r=pimp1413'] = 'http://www.freepornfriend.com/';
aff['http://links.pimproll.com/?s=livecams&r=pimp1413&p=ft'] = 'http://www.livecams.com/';
aff['http://links.pimproll.com/?s=megasitepassmobile&r=pimp1413&p=ft&c=1&j=11&t=&src=codes'] = 'http://www.megasitepassmobile.com/';
aff['http://links.pimproll.com/?s=brotherundercover&r=pimp1413&p=ft&c=4&j=11&mr=y&src=codes'] = 'http://www.brotherundercover.com/';
aff['http://links.pimproll.com/?s=pregnantsistas&r=pimp1413&p=ft&c=1&j=11&mr=y&src=codes'] = 'http://www.pregnantsistas.com/';
aff['http://links.pimproll.com/?s=preggobangers&r=pimp1413&p=ft&c=1&j=11&mr=y&src=codes'] = 'http://www.preggobangers.com/';
aff['http://links.pimproll.com/?s=knockedupnina&r=pimp1413&p=ft&c=1&j=11&mr=y&src=codes'] = 'http://www.knockedupnina.com/';
aff['http://links.pimproll.com/?s=wifewantsblackcock&r=pimp1413&p=ft&c=4&j=11&mr=y&src=codes'] = 'http://www.wifewantsblackcock.com/';
aff['http://links.pimproll.com/?s=rapvideoauditions&r=pimp1413&p=ft&c=4&j=11&n=2&mr=y&src=codes'] = 'http://www.rapvideoauditions.com/';
aff['http://secure.kimksuperstar.com/track/MTMxNTI2LjEuMy41LjAuMC4wLjAuMA'] = 'http://www.kimksuperstar.com/';
aff['http://secure.kendraexposed.com/track/MTMxNTI2LjEuMzEuODIuMC4wLjAuMC4w'] = 'http://www.kendraexposed.com/';
aff['http://secure.shaunasandexposed.com/track/MTMxNTI2LjEuMjguNDkuMC4wLjAuMC4w'] = 'http://www.shaunasandexposed.com/';
aff['http://secure.kelliusa.com/track/MTMxNTI2LjEuNC42LjAuMC4wLjAuMA'] = 'http://www.kelliusa.com/';
aff['http://secure.jessicasuperstar.com/track/MTMxNTI2LjEuNi44LjAuMC4wLjAuMA'] = 'http://www.jessicasuperstar.com/';
aff['http://secure.mindymccreadybaseballmistress.com/track/MTMxNTI2LjEuMjkuNzIuMC4wLjAuMC4w'] = 'http://www.mindymccreadybaseballmistress.com/';
aff['http://links.pimproll.com/?s=megasitepass&r=pimp1413&p=ft&c=1&j=11&mr=y&src=codes'] = 'http://www.megasitepass.com/';
aff['http://links.pimproll.com/?s=welikeitblack&r=pimp1413&p=ft&c=4&j=11&mr=y&src=codes'] = 'http://www.welikeitblack.com/';
aff['http://links.pimproll.com/?s=bonemywife&r=pimp1413&p=ft&c=4&j=11&mr=y&src=codes'] = 'http://www.bonemywife.com/';

/* do not edit below this point */

/* reverse the key/value pairs so we can lookup based on value */
var aff_reverse = new Array();
for (k in aff) {
    aff_reverse[aff[k]] = k;
}

/* scan all links when the document loads */
$(document).ready(function(){
  $('a').attr('href',function(){
    
    /* if the link isn't listed above, do nothing */
    if (!aff[$(this).attr('href')]) {return $(this).attr('href');}
    /* ok, the link is in our list */
    $(this).click(function(){
        /* when the link is clicked on, revert it back to the affiliate link */
        //$(this).attr('href', aff_reverse[$(this).attr('href')]);
        return true;
    });
    $(this).mouseup(function(){
        /* Firefox ignores onclick event when the link is opened via middle mouse (new tab) */
        $(this).attr('href', aff_reverse[$(this).attr('href')]);
        return true;
    });
    $(this).mouseout(function(){
        /* revert back to non-aff link in case they opened in new tab */
        $(this).attr('href', aff[$(this).attr('href')]);
        return true;
    });
    /* change the affiliate link to a non-affiliate link */
    return aff[$(this).attr('href')];
  });
});