1jQuery(window).load(function() { 2 3 if (jQuery('#side_col .free_widget').children().hasClass('fixed_free_space')) { 4 5 var ad_box = jQuery('#side_col .free_widget'); 6 var ad_box_height = ad_box.height(); 7 8 var side_height = jQuery("#side_col").height(); 9 var side_top = jQuery("#side_col").offset().top; 10 11 var main_height = jQuery("#contents").height(); 12 var main_top = jQuery("#contents").offset().top; 13 14 var main_content_height = jQuery("#main_col").height(); 15 16 if( main_content_height > side_height ) { 17 18 jQuery(window).scroll(function () { 19 20 if(jQuery(window).scrollTop() > side_height + side_top) { 21 ad_box.addClass('fixed_ad'); 22 } else { 23 ad_box.removeClass('fixed_ad'); 24 }; 25 26 if(jQuery(window).scrollTop() > main_height + main_top - ad_box_height) { 27 ad_box.removeClass('fixed_ad'); 28 ad_box.addClass('fixed_ad2'); 29 } else { 30 ad_box.removeClass('fixed_ad2'); 31 }; 32 33 }); 34 35 }; 36 37 }; 38 39 if (jQuery('#side_col2 .free_widget').children().hasClass('fixed_free_space')) { 40 41 var ad_box = jQuery('#side_col2 .free_widget'); 42 var ad_box_height = ad_box.height(); 43 44 var side_height = jQuery("#side_col2").height(); 45 var side_top = jQuery("#side_col2").offset().top; 46 47 var main_height = jQuery("#contents").height(); 48 var main_top = jQuery("#contents").offset().top; 49 50 var main_content_height = jQuery("#main_col").height(); 51 52 if( main_content_height > side_height ) { 53 54 jQuery(window).scroll(function () { 55 56 if(jQuery(window).scrollTop() > side_height + side_top) { 57 ad_box.addClass('fixed_ad'); 58 } else { 59 ad_box.removeClass('fixed_ad'); 60 }; 61 62 if(jQuery(window).scrollTop() > main_height + main_top - ad_box_height) { 63 ad_box.removeClass('fixed_ad'); 64 ad_box.addClass('fixed_ad2'); 65 } else { 66 ad_box.removeClass('fixed_ad2'); 67 }; 68 69 }); 70 71 }; 72 73 }; 74 75});
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.