var bannersPos1 = new Array(); bannersPos1[0] = ["http://online.europacasino.com/promoRedirect?key=em9uZUlkPTMzNTU5ODE3JmxhbmRpbmdQYWdlSWQ9MCZwcm9maWxlSWQ9Mjc0MTk5==","europa600x74fr.gif","",""]; bannersPos1[1] = ["http://fr.partycasino.com/index.htm?wm=3232000","partycasino-gif-welcome-fr-eu.gif","",""]; bannersPos1[2] = ["http://banner.casinolasvegas.com/cgi-bin/redir.cgi?id=N&member=24000000&profile=89048&lang=fr","LasVegasCasino600x74-FR.gif","",""]; bannersPos1[3] = ["http://cityclub.gamingpromo.com/cgi-bin/redir.cgi?id=N&member=ocrgamin&profile=ocr2fr&lang=fr","CityClubCasino600x74-fr.gif","",""]; bannersPos1[4] = ["http://www.jackpotcity.co.uk/casino/fre/index.aspx?s=aff82784&a=affad246","jpc600x74fr.gif","",""]; var bannersPos2 = new Array(); bannersPos2[0] = ["http://serve.williamhillcasino.com/promoRedirect?member=wtinfo&campaign=DEFAULT&channel=ocr2qccom&zone=66908161&lp=0","fr-ca-300x250.gif","","casino"]; bannersPos2[1] = ["http://fr.partycasino.com/index.htm?wm=3232000","partycasino300x250-gif-welcome-sinatra-fr-eu.gif","","Casinos en ligne"]; bannersPos2[2] = ["http://banner.casinolasvegas.com/cgi-bin/redir.cgi?id=N&member=24000000&profile=89048&lang=fr","LasVegasCasino300x250-FR.gif","",""]; bannersPos2[3] = ["http://cityclub.gamingpromo.com/cgi-bin/redir.cgi?id=N&member=ocrgamin&profile=ocr2fr&lang=fr","CityClubCasino300x250-fr.gif","",""]; bannersPos2[4] = ["http://www.jackpotcity.co.uk/casino/fre/index.aspx?s=aff82784&a=affad246","jpc300x250fr.gif","",""]; bannersPos2[5] = ["http://online.europacasino.com/promoRedirect?key=em9uZUlkPTMzNTU5ODE3JmxhbmRpbmdQYWdlSWQ9MCZwcm9maWxlSWQ9Mjc0MTk5==","europa300x250fr.gif","",""]; bannersPos2[6] = ["http://online.titanbingo.com/promoRedirect?key=em9uZUlkPTE4NDgzMDYwMTEmbGFuZGluZ1BhZ2VJZD0wJnByb2ZpbGVJZD0yNzQxOTk%3D==","titan-bingo-300x250-fr.gif","","bingo"]; var bannersPos3 = new Array(); bannersPos3[0] = ["http://serve.rubybingo.com/promoRedirect?member=wtinfo&campaign=DEFAULT&channel=ocr2qccom&zone=915261598&lp=0","rubybingo-fr-300x250.gif","",""]; bannersPos3[1] = ["http://ads.affiliateclub.com/redirect.aspx?pid=61483&bid=2666","casinoclub300x250fr.gif","",""]; bannersPos3[2] = ["http://online.titanbet.com/promoRedirect?key=em9uZUlkPTE3OTYyMDM4MjQmbGFuZGluZ1BhZ2VJZD0wJnByb2ZpbGVJZD0yNzQxOTk%3D==","titan-bet-300x250-fr.gif","","sportifs"]; var bannersPos5 = new Array(); bannersPos5[0] = ["http://www.jackpotcity.co.uk/casino/fre/index.aspx?s=aff82784&a=affad246","jpc468x060fr.gif","","Jackpot City Casino"]; bannersPos5[1] = ["http://serve.eurogrand.com/promoRedirect?member=wtinfo&campaign=DEFAULT&channel=ocr2qccom&zone=14153228&lp=0","eurogrand468.gif","","Euro Grand Casino"]; bannersPos5[2] = ["http://www.platinumplay.eu/fr/btag-ad287354","PlatinumPlay468x60.gif","","Platinum Play Casino"]; bannersPos5[3] = ["http://www.royalvegas.eu/fr/btag-ad287356/","RoyalVegas468x60.gif","","Royal Vegas Casino"]; bannersPos5[4] = ["http://www.acf-webmaster.net/modules/link/334/104411/ocrpoc/","riva468x60fr.gif","","riva"]; var bannersPos6 = new Array(); bannersPos6[0] = ["http://www.jackpotcity.co.uk/casino/fre/index.aspx?s=aff82784&a=affad246","jpc120x600fr.gif","","Jackpot City Casino"]; bannersPos6[1] = ["http://serve.eurogrand.com/promoRedirect?member=wtinfo&campaign=DEFAULT&channel=ocr2qccom&zone=14153228&lp=0","eurogrand600.gif","","Euro Grand Casino"]; bannersPos6[2] = ["http://www.acf-webmaster.net/modules/link/334/104411/ocrpoc/","riva-160x600-35k-fr.gif","","riva"]; $(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.qc.com')); 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 += '
'; // Check if banner has a flash banner - in case found use the flash code if (bannerSelected[2].length > 10) bannerHTML += bannerSelected[2]; else bannerHTML += ''; $("#adPosition"+adPosId).html(bannerHTML); $("#adPosition"+adPosId).show(); } } }); });