$(function(){ rightmarketinghtml=''; $('#rightmarketing').html(rightmarketinghtml); var mcSlideCount=0, mcBXSlider; mcBXSlider=$('#blockmarketing2 .bxslider').bxSlider({ adaptiveHeight: true, auto: true, pause: 8000, mode: 'fade', captions: true, onSliderLoad: function() { $('#blockmarketing2 img.lazy').lazyload({load:function(){ $(this).closest('div.imgLiquidNoFill').imgLiquid({fill:false, horizontalAlign:'center', verticalAlign:'center', useBackgroundSize:true}); },}); }, onSlideAfter: function() { $('#blockmarketing2 img.lazy').lazyload({load:function(){ $(this).closest('div.imgLiquidNoFill').imgLiquid({fill:false, horizontalAlign:'center', verticalAlign:'center', useBackgroundSize:true}); },}); mcSlideCount++; if (mcSlideCount>=40) mcBXSlider.stopAuto(); } }); });