var bannersPos1 = new Array(); bannersPos1[0] = ["http://banner.casinoking.com/cgi-bin/redir.cgi?id=N&member=23000000&profile=118896","ck600x74en300usd.gif","",""]; bannersPos1[1] = ["http://www.platinumplay.eu/ppslots/btag-ad284099/","ppc-en-600-74-1500free.gif","",""]; bannersPos1[2] = ["http://www.royalvegas.eu/freespins/btag-ad284098/","rvc-en-600-74-1200free.gif","",""]; bannersPos1[3] = ["http://cityclub.gamingpromo.com/cgi-bin/redir.cgi?id=N&member=ocrgamin&profile=ocr2nz","CityClubCasino600x74-en.gif","",""]; bannersPos1[4] = ["http://www.jackpotcity.co.uk/index.asp?s=aff82784&a=affad222","jpc600x74-all.gif","",""]; bannersPos1[5] = ["http://banner.noblecasino.com/cgi-bin/redir.cgi?id=N&member=28000000&profile=123","nc600x74en400usd.gif","",""]; var bannersPos2 = new Array(); bannersPos2[0] = ["http://www.jackpotcitybingo.co.uk/index.asp?s=aff82784&a=affad222","jackpotcitybingo300.gif","","online bingo"]; bannersPos2[1] = ["http://www.platinumplay.eu/ppslots/btag-ad284099/","ppc-en-300-250-1500free.gif","",""]; bannersPos2[2] = ["http://cityclub.gamingpromo.com/cgi-bin/redir.cgi?id=N&member=ocrgamin&profile=ocr2nz","CityClubCasino300x250-eng.gif","",""]; bannersPos2[3] = ["http://www.jackpotcity.co.uk/index.asp?s=aff82784&a=affad222","jpc300x250-all.gif","",""]; bannersPos2[4] = ["http://banner.noblecasino.com/cgi-bin/redir.cgi?id=N&member=28000000&profile=123","nc300x250en400usd.gif","",""]; var bannersPos3 = new Array(); bannersPos3[0] = ["http://serve.rubybingo.com/promoRedirect?member=wtinfo&campaign=DEFAULT&channel=ocnz&zone=734601858&lp=0","rubybingo-en-300x250.gif","","online bingo"]; bannersPos3[1] = ["http://serve.williamhillcasino.com/promoRedirect?member=wtinfo&campaign=DEFAULT&channel=ocr2nz&zone=913608644&lp=13510080","en2-300x250.gif","","online casino"]; bannersPos3[2] = ["http://banner.casinoking.com/cgi-bin/redir.cgi?id=N&member=23000000&profile=118896","ck300x250en300usd.gif","",""]; bannersPos3[3] = ["http://www.royalvegas.eu/freespins/btag-ad284098/","rvc-en-300-250-1200free.gif","",""]; var bannersPos4 = new Array(); bannersPos4[0] = ["http://serve.williamhillcasino.com/promoRedirect?member=wtinfo&campaign=DEFAULT&channel=ocr2nz&zone=913608644&lp=13510080","en300x250.gif","",""]; bannersPos4[1] = ["http://banner.casinoking.com/cgi-bin/redir.cgi?id=N&member=23000000&profile=118896","ck300x250en300usd.gif","",""]; bannersPos4[2] = ["http://www.platinumplay.eu/ppslots/btag-ad284099/","ppc-en-300-250-1500free.gif","",""]; bannersPos4[3] = ["http://www.royalvegas.eu/freespins/btag-ad284098/","rvc-en-300-250-1200free.gif","",""]; bannersPos4[4] = ["http://cityclub.gamingpromo.com/cgi-bin/redir.cgi?id=N&member=ocrgamin&profile=ocr2nz","CityClubCasino300x250-eng.gif","",""]; bannersPos4[5] = ["http://www.jackpotcity.co.uk/index.asp?s=aff82784&a=affad222","jpc300x250-all.gif","",""]; bannersPos4[6] = ["http://banner.noblecasino.com/cgi-bin/redir.cgi?id=N&member=28000000&profile=123","nc300x250en400usd.gif","",""]; var bannersPos5 = new Array(); bannersPos5[0] = ["http://www.riverbelle.co.uk/index.asp?s=aff82784&a=affad222","riverb468eng5.gif","","River Belle"]; bannersPos5[1] = ["http://banner.europacasino.com/cgi-bin/redir.cgi?id=N&member=eyal77&profile=ocr2conz","europacasino468x60-en5.gif","","Europa Casino"]; bannersPos5[2] = ["http://www.luckynugget.co.uk/index.asp?s=aff82784&a=affad222","luckynugget468eng.gif","","Lucky Nugget"]; bannersPos5[3] = ["http://www.gamingclub.co.uk/index.asp?s=aff82784&a=affad222","GamingClub468x60.gif","","Gaming Club"]; bannersPos5[4] = ["http://serve.williamhill.com/promoRedirect?member=wtinfo&campaign=DEFAULT&channel=ocrconz&zone=869228605&lp=13510204","willhillbingo468.gif","","William Hill Bingo"]; bannersPos5[5] = ["http://serve.williamhillpoker.com/promoRedirect?member=wtinfo&campaign=DEFAULT&channel=ocr2nz&zone=66906782&lp=0","willhillpoker120.gif","","William Hill Poker"]; bannersPos5[6] = ["http://www.coolhandpoker.com/index.asp?s=aff82784&a=affad222","coolhand468eng.gif","","Cool Hand Poker"]; bannersPos5[7] = ["http://banner.titanpoker.com/cgi-bin/redir.cgi?id=N&member=eyal77&profile=ocr2conz","titan468.gif","","Titan Poker"]; bannersPos5[8] = ["http://adserver.itsfogo.com/click.aspx?zoneid=47843","bwin4682.gif","","bwin Sports"]; bannersPos5[9] = ["http://www.jackpotcity.co.uk/index.asp?s=aff82784&a=affad222","jpc486x60-all.gif","","Jackpot City Casino"]; var bannersPos6 = new Array(); bannersPos6[0] = ["http://www.riverbelle.co.uk/index.asp?s=aff82784&a=affad222","riverb120600eng5.gif","","River Belle"]; bannersPos6[1] = ["http://banner.europacasino.com/cgi-bin/redir.cgi?id=N&member=eyal77&profile=ocr2conz","europacasino120x6004.gif","","Europa Casino"]; bannersPos6[2] = ["http://www.luckynugget.co.uk/index.asp?s=aff82784&a=affad222","luckynugget120600eng3.gif","","Lucky Nugget"]; bannersPos6[3] = ["http://www.jackpotcitybingo.co.uk/index.asp?s=aff82784&a=affad222","jackpotcitybingo1202.gif","","Jackpot City Bingo"]; bannersPos6[4] = ["http://www.gamingclub.co.uk/index.asp?s=aff82784&a=affad222","GamingClub160x600.gif","","Gaming Club"]; bannersPos6[5] = ["http://serve.williamhill.com/promoRedirect?member=wtinfo&campaign=DEFAULT&channel=ocrconz&zone=869228605&lp=13510204","willhillbingo120.gif","","William Hill Bingo"]; bannersPos6[6] = ["http://serve.williamhillpoker.com/promoRedirect?member=wtinfo&campaign=DEFAULT&channel=ocr2nz&zone=66906782&lp=0","willhillpoker468.gif","","William Hill Poker"]; bannersPos6[7] = ["http://www.coolhandpoker.com/index.asp?s=aff82784&a=affad222","coolhand120600eng.gif","","Cool Hand Poker"]; bannersPos6[8] = ["http://banner.titanpoker.com/cgi-bin/redir.cgi?id=N&member=eyal77&profile=ocr2conz","titan120.gif","","Titan Poker"]; bannersPos6[9] = ["http://adserver.itsfogo.com/click.aspx?zoneid=47843","bwin600.gif","","bwin Sports"]; bannersPos6[10] = ["http://www.jackpotcity.co.uk/index.asp?s=aff82784&a=affad222","jpc120x600-all.gif","","Jackpot City Casino"]; $(document).ready(function() { var totalAdsTypeArr = new Array(1,2,3,4,5,6); var pageTitle = document.title; // Get Page Meta Title pageTitle = pageTitle.substring(0,pageTitle.indexOf('onlinecasinoreports.co.nz')); jQuery.each(totalAdsTypeArr, function(index, adPosId){ var bannersForPosition = window["bannersPos"+adPosId]; // Bulding the array var bannersPos1/2/etc. if ($("#adPosition"+adPosId).length > 0 && (typeof bannersForPosition != "undefined")){ // Check if the page has the Ad Div Id and Banner Exist for that type var bannerSelected = 0; var bannerHTML = ''; // Check if we should look for keywords banner or not depending on the banner position if (adPosId != 1 && adPosId != 4) // Excluding index types { // Going throw each banner and then on each one of his keywords to look for matching banners for the page title var matchedBannersArr = new Array(); jQuery.each(bannersForPosition, function(index, bannerData){ if (bannerData[3].length > 0) { // If has keywords var bannerKeywordsArr = bannerData[3].split(","); jQuery.each(bannerKeywordsArr, function(index2, bannerKeyword){ bannerKeyword = bannerKeyword.replace(/^\s+|\s+$/g, ""); // Removing white space var regEx = new RegExp(bannerKeyword,"i"); if (pageTitle.search(regEx) >= 0) { matchedBannersArr.push(bannerData); return false; // Stop after one match so it can't add the same banner more then ones } }); } }); // If there are matched banners for this page - choose one randomly if (matchedBannersArr.length > 0) { var randomBannerNum = Math.floor((matchedBannersArr.length)*Math.random()); bannerSelected = matchedBannersArr[randomBannerNum]; } } // In case no banner was selected yet and banner position is not on product page - choose random one from all the banners if (bannerSelected == 0 && adPosId != 5 && adPosId != 6) { var randomBannerNum = Math.floor((bannersForPosition.length)*Math.random()); bannerSelected = bannersForPosition[randomBannerNum]; } // If finally banner was selected - print it! if (bannerSelected != 0) { // If banner type 5 (top banner on product page) adds border if (adPosId == 5) bannerHTML += '