]]>ROMWidget
// Add placeholder ad to hold ad target values
var targets = JSON.stringify(webmd.drugs.adConfig.targets);
// Change inner quotes to single
var singleQuoteTargets = targets.replace(/"/g, "'");
if (s_mobileweb === 'no') {
dataMobile = 'false';
}
else {
dataMobile = 'true';
}
var $adDiv = $('', {
'id' : 'ads2-pos-11111',
'class': 'module ad',
"data-is-mobile": dataMobile,
"data-pos": "11111",
"data-targets": singleQuoteTargets,
"data-sizes": "[[11,11]]"
});
$adDiv.appendTo('body');
// HTML module for DFP ads to setPageTarget
//@warning - this module must be directly after the 901 ad module
if(webmd.ads2 && webmd.drugs && webmd.ads2.isInitialized() && webmd.drugs.adConfig){
// set the page targets to include parameters from BE
if(webmd.drugs.adConfig.targets){
webmd.debug('setting the page targets',webmd.drugs.adConfig.targets);
webmd.ads2.setPageTarget(webmd.drugs.adConfig.targets);
}
// set the block codes for the ads
if(webmd.drugs.adConfig.blockCodes){
webmd.debug('setting the block codes',webmd.drugs.adConfig.blockCodes);
webmd.ads2.setPageExclusion(webmd.drugs.adConfig.blockCodes);
}
}
]]>GetModuleWidget
$(function(){
require(["global_nav/1/global_nav"], function(global_nav) {
global_nav.init();
});
});