1(function($) { 2 3 Drupal.behaviors.simpleadsOverlay = { 4 attach: function (context) { 5 6 // call leanModal when ajax on simpleads block ends 7 $(".block-simpleads").one("ajaxStop", function() { 8 if( $(this).find('#simpleads-overlay-wrapper').length) { 9 var adImages = $("#simpleads-overlay-wrapper img"); 10 // if there are images, call modal after images are loaded 11 if (adImages.length > 0) { 12 adImages.one("load",function(){ 13 $('body').leanModal(); 14 }); 15 } else { 16 $('body').leanModal(); 17 } 18 } 19 }); 20 21 /*$("#simpleads-overlay-close").click(function(){ 22 //$('#simpleads-overlay-wrapper').css({ 'display' : 'none' }); 23 //$("#lean_overlay").fadeOut(300); 24 });*/ 25 26 // add click event to close button 27 $('#simpleads-overlay-close').live('click', function(){ 28 var nid = $('#simpleads-overlay-close').attr('class').replace('simplead-overlay-', ''); 29 /* $.ajax({ 30 url:"/simpleads-overlay/close", 31 data: {aid: nid}, 32 success:function(result){*/ 33 $("#lean_overlay").fadeOut(300); 34 $('#simpleads-overlay-wrapper').css({ 'display' : 'none' }); 35 /* } 36 });*/ 37 }); 38 39 // add click event to any link in overlay ad 40 41 /*$('#simpleads-overlay-wrapper a').live('click', function(e){ 42 var nid = $('#simpleads-overlay-close').attr('class').replace('simplead-overlay-', ''); 43 e.preventDefault(); 44 var linkTo = $(this).attr("href"); 45 $.ajax({ 46 url:"/simpleads-overlay/close", 47 data: {aid: nid}, 48 success:function(result){ 49 $("#lean_overlay").fadeOut(300); 50 $('#simpleads-overlay-wrapper').css({ 'display' : 'none' }); 51 location.href = linkTo; 52 } 53 }); 54 });*/ 55 56 } 57 } 58 59 $.fn.extend({ 60 61 leanModal: function() { 62 var overlay_opacity = 0.6; 63 var overlay = $("<div id='lean_overlay'></div>"); 64 65 if ($('#simpleads-overlay-wrapper').length > 0) { 66 $('body').append(overlay); 67 //$('#lean_overlay').css({ 'display' : 'block', opacity : 0 }); 68 $('#lean_overlay').fadeTo(300,overlay_opacity); 69 $('#simpleads-overlay-wrapper').fadeTo(200,1); 70 } 71 } 72 }); 73 74})(jQuery);
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.