/* FILE ARCHIVED ON 2:43:36 Jan 30, 2009 AND RETRIEVED FROM THE AN OPENWAYBACK INSTANCE ON 17:45:55 Jun 5, 2024. JAVASCRIPT APPENDED BY OPENWAYBACK, COPYRIGHT INTERNET ARCHIVE. ALL OTHER CONTENT MAY ALSO BE PROTECTED BY COPYRIGHT (17 U.S.C. SECTION 108(a)(3)). */ if (DebugMode == true) {console.log("Advertorial script v1.3");} $(document).ready(function() { jQuery(function() { /*test if there's an advertorial cell at all*/ var advt = false; if (($('#spotlight .sponsorSlice').html()) != '') { advt = true; } /*if there is slice content, test & parse the cell contents*/ if (advt) { /*test to see if any cell has video content, corrected video content and link nodes*/ var vplayer = $("#spotlight .ssBody .grid div.img a[href^='javascript']"); var corrected = $("#spotlight .ssBody .grid div.img a[href^='/id/']"); var icoVid = $("#spotlight .ssBody .grid div.text h6 a.icoVid"); var linkVid = $("#spotlight .ssBody .grid div.text h6 a[class!='icoVid']"); /*if there is a correction for each video, grab the href around the image and apply it to the text URL*/ if (vplayer.length > 0 && vplayer.length == corrected.length) { for (var i = 0; i < icoVid.length; i++) { var corr_url = corrected.slice(i,i+1).attr("href"); var ico_url = icoVid.slice(i,i+1).attr("href"); var link_url = linkVid.slice(i,i+1).attr("href"); icoVid.slice(i,i+1).attr("href",corr_url); linkVid.slice(i,i+1).attr("href",corr_url); } } } else { if (DebugMode == true && advt == false) {console.log("No advertorial slice found");} } }); })