if (nugg != 1) { function isEmpty(obj) { for(var prop in obj) { if(obj.hasOwnProperty(prop)) return false; } return true; } var nugg = document.createElement("script"); nugg.setAttribute("type", "text/javascript"); nugg.setAttribute("src", ('https:' == document.location.protocol ? 'https:' : 'http:')+"//ads.themoneytizer.com/nugg2.php?theme=1958692556"); nugg.setAttribute("async", "true"); document.head.appendChild(nugg); var nugg = 1; var pbjs = (typeof pbjs != "undefined")? pbjs : {} ; pbjs.que = pbjs.que || []; var d = document, pbs = d.createElement('script'); pbs.setAttribute("type","text/javascript"); pbs.setAttribute("src",('https:' == document.location.protocol ? 'https:' : 'http:')+"//ads.themoneytizer.com/moneybid12/build/dist/prebid.js"); pbs.setAttribute("async", "true"); var target = document.getElementsByTagName('head')[0]; target.insertBefore(pbs, target.firstChild); PB_PAGE_TIMEOUT = 2000; function initAdserver() { pbjs.initAdserverSet = true; // Step 1: Set key value targeting on the placements if (pbjs.libLoaded) { // For each of your placement, get and set targeting params var targetingParams = pbjs.getAdserverTargeting(); } // Step 2: Trigger the page to send the impressions to your ad server. }; setTimeout(initAdserver, PB_PAGE_TIMEOUT); pbjs.que.push(function(){ var adUnits = [ { code: '26324', sizes: [[120, 600]], bids: [ {bidder: 'appnexus', params:{ placementId: '7069529' } }, ] }, { code: '30012', sizes: [[728, 90]], bids: [ {bidder: 'appnexus', params:{ placementId: '7069530' } }, ] },]; pbjs.addAdUnits(adUnits); }); pbjs.bidderSettings = { rubicon: { bidCpmAdjustment : function(bidCpm){ return bidCpm * .875; } }, standard: { adserverTargeting: [{ key: "hb_bidder", val: function(bidResponse) { return bidResponse.bidderCode; } }, { key: "hb_adid", val: function(bidResponse) { return bidResponse.adId; } },{ key: "hb_height", val: function(bidResponse) { return bidResponse.height; } }, { key: "hb_bid", val: function(bidResponse) { var cpm = bidResponse.cpm; if (cpm < 0.10) { return (Math.floor(cpm * 50) / 50).toFixed(2); } else if (cpm < 5.00) { return (Math.floor(cpm * 20) / 20).toFixed(2); } else if (cpm < 10.00) { return (Math.floor(cpm * 2) / 2).toFixed(2); } else { return '10.00'; } } }] } }; pbjs.que.push(function(){ pbjs.requestBids({ // This callback gets triggered when all bids for this // ad unit come back. bidsBackHandler: function(bidResponses) { window.targetingParams = pbjs.getAdserverTargeting(); } }); }); } var mydiv = document.getElementById("6505-28"); var creatediv = document.createElement("div"); creatediv.id = "sas_30012"; mydiv.appendChild(creatediv); var sc = document.createElement("script"); sc.type = "text/javascript"; sc.async = true; (function foo(){ if (window.targetingParams && !isEmpty(window.targetingParams[30012]) || window.isReady == 1){ window.targetingParams = window.targetingParams || []; window.targetingParams[30012] = window.targetingParams[30012] || {}; var hb_adid = "hb_adid="+window.targetingParams[30012].hb_adid; var hb_pb = "hb_pb="+window.targetingParams[30012].hb_bid; var hb_bidder = "hb_bidder="+window.targetingParams[30012].hb_bidder; if(window.targetingParams[30012].hb_height == "480"){ var hb_format = "hb_format="+30012+"-1"; }else{ var hb_format = "hb_format="+30012; } var moneybid = ";"+hb_adid+";"+hb_pb+";"+hb_bidder+";"+hb_format; sc.text = sas.cmd.push(function(){sas.call('std',{siteId: 100327, pageId: 649757, formatId: 30012, target: crtg_content+moneybid});});; creatediv.appendChild(sc); }else{ setTimeout(function(){ foo(); },50); } })(); setTimeout(function(){window.isReady = 1;}, 2000);