1(function (BannerModule, $, undefined) { 2 BannerModule.addImpression = function(slideshow, nextSlide) { 3 var count = parseInt(slideshow.data('slide-count')); 4 5 if (count != 0) { 6 slideshow.data('slide-count', --count); 7 var options = nextSlide.data('banner-options'); 8 9 if (!options.isAdmin) { 10 var lookupurl = globalSiteSubDirectory + "/ajax/banners/ajax.aspx?F=AddImpression&BannerId=" + options.bannerId; 11 $.get(lookupurl, function(o) { return false; }); 12 } 13 } 14 } 15 16 BannerModule.trackClick = function (bannerId) { 17 if (bannerId) 18 $.ajax('/ajax/banners/tracking.aspx?BannerId=' + bannerId); 19 } 20 21 BannerModule.init = function () { 22 $('.cycle-slideshow').cycle(); 23 BannerModule.initTracking(); 24 } 25 26 BannerModule.initTracking = function () { 27 $('.cycle-slideshow').on('cycle-before', function (event, opts) { 28 BannerModule.addImpression($(event.target), $(opts.slides[opts.nextSlide])); 29 }); 30 31 $("a.banner-tracking").on("click", function (e) { 32 BannerModule.trackClick($(this).data('banner-id')); 33 }); 34 } 35}(window.BannerModule = window.BannerModule || {}, jQuery)); 36 37$(document).on('cycle-initialized', function (event, opts) { 38 if (opts.slides.length > 0) 39 BannerModule.addImpression($(event.target), $(opts.slides[0])); 40}); 41 42jQuery(function ($) { 43 //EP - cycle auto-initializes, so we can skip that. 44 BannerModule.initTracking(); 45 BaseModule.addModuleRebindFunction("BannerModule", BannerModule.init); 46});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.