/**
 * 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 */
/* ForexVPS */
aff['http://www.forexvps.com?a_aid=c528f7fd'] = 'http://www.forexvps.com/';
/* Forex Cash Detective */
aff['https://www.plimus.com//jsp/redirect.jsp?contractId=2449066&referrer=infosnax'] = 'http://www.forexcashdetective.com/';
/* Forex Mobster */
aff['http://www.forexsystemaffiliate.com/ezGaffurl.php?offer=illz1&pid=1'] = 'http://www.forexmobster.com/';
/* Forex Slasher */
aff['http://www.forexsystemaffiliate.com/ezGaffurl.php?offer=illz1&pid=11'] = 'http://forexslasher.com/';
/* Forex Humanoid */
aff['http://www.forexsystemaffiliate.com/ezGaffurl.php?offer=illz1&pid=8'] = 'http://www.forexhumanoid.com/';
/* LMT Forex Formula */
aff['http://illz1.lmtformula.hop.clickbank.net/'] = 'http://www.lmt-forex-formula.com/';
/* IvyBot */
aff['http://illz1.ivybot.hop.clickbank.net/'] = 'http://www.ivybot.com/';
/* Forex Decimator */
aff['http://illz1.ianross.hop.clickbank.net/'] = 'http://www.forexdecimator.com/';
/* FAP Turbo */
aff['http://illz1.fapturbo.hop.clickbank.net/'] = 'http://www.fapturbo.com/';
/* Pipsleader */
aff['http://illz1.pipsleader.hop.clickbank.net/'] = 'http://pipsleader.com/';
/* Forex MegaDroid */
aff['http://illz1.fxdroid.hop.clickbank.net/'] = 'http://forex-megadroid.com/';
/* Euro Blaster OLD */
aff['https://www.e-junkie.com/ecom/gb.php?cl=61088&c=ib&aff=72148'] = 'http://www.euro-blaster.com/';
/* Euro Blaster */
aff['https://www.e-junkie.com/ecom/gb.php?ii=287658&c=ib&aff=72148&cl=61088'] = 'http://www.euro-blaster.com/';
/* EB-Turbo */
aff['https://www.e-junkie.com/ecom/gb.php?ii=271534&c=ib&aff=72148&cl=61088'] = 'http://www.eb-turbo.com/';
/* Forex Espionage */
aff['http://illz1.forexesp.hop.clickbank.net/'] = 'http://forexespionage.com/';
/* RoboMiner */
aff['http://www.forex-goldmine.net/?aff=3625'] = 'http://www.forex-goldmine.net/';
/* RobotSetup */
aff['https://www.plimus.com//jsp/redirect.jsp?contractId=2315668&referrer=infosnax'] = 'http://www.robotsetup.com/';
/* Forex Invader */
aff['http://www.forexsystemaffiliate.com/ezGaffurl.php?offer=illz1&pid=14'] = 'http://www.forexinvader.com/';
/* FX Nitro */
aff['https://www.plimus.com/jsp/redirect.jsp?contractId=2496906&referrer=infosnax'] = 'http://www.fxnitro.com/';
/* Forex Hacked */
aff['http://www.regnow.com/softsell/visitor.cgi?affiliate=551981&action=site&vendor=23219'] = 'http://www.forexhacked.com/';
/* Forex Magic Machine */
aff['http://www'] = 'http://www.forexmagicmachine.com/';
/* Forex Auto Trader */
aff['http://www'] = 'http://www.forexautotrader.com/';
/* Forex Vengeance */
aff['http://www'] = 'http://www.forexvengeance.com/';
/* Forex Annihilator */
aff['https://www.plimus.com/jsp/redirect.jsp?contractId=2556430&referrer=infosnax'] = 'http://www.forexanihilator.com/';
/* Forex Infinity Pro */
aff['http://www.plimus.com/jsp/redirect.jsp?contractId=2533678&referrer=infosnax'] = 'http://www.forex-infinity.com/';
/* Forex Conqueror */
aff['http://illz1.conquerfx.hop.clickbank.net'] = 'http://www.forexconqueror.com/';
/* Forex Twister */
aff['http://www.forexsystemaffiliate.com/ezGaffurl.php?offer=illz1&pid=19'] = 'http://www.forextwister.com/';
/* Cash-Cruiser */
aff['http://illz1.euroblast1.hop.clickbank.net'] = 'http://www.cash-cruiser.com/';
/* USDBOT */
aff['http://illz1.usdbot.hop.clickbank.net'] = 'http://www.usdbot.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')];
  });
});