1function checkNavColor(slider){ 2 var nav_color_flex = slider.find('.flex-active-slide').data('nav_color'); 3 if(nav_color_flex == 'dark') 4 slider.find('.flex-control-nav').addClass('flex-dark'); 5 else 6 slider.find('.flex-control-nav').removeClass('flex-dark'); 7 8 var eventdata = {slider: slider}; 9 BX.onCustomEvent('onSlide', [eventdata]); 10} 11 12$(document).ready(function(){ 13 if($('.top_slider_wrapp .flexslider').length){ 14 var config = {"controlNav": true, "animationLoop": true, "pauseOnHover" : true}; 15 if(typeof(arNextOptions['THEME']) != 'undefined'){ 16 var slideshowSpeed = Math.abs(parseInt(arNextOptions['THEME']['BIGBANNER_SLIDESSHOWSPEED'])); 17 var animationSpeed = Math.abs(parseInt(arNextOptions['THEME']['BIGBANNER_ANIMATIONSPEED'])); 18 config["slideshow"] = (slideshowSpeed && arNextOptions['THEME']['BIGBANNER_ANIMATIONTYPE'].length ? true : false); 19 config["animation"] = (arNextOptions['THEME']['BIGBANNER_ANIMATIONTYPE'] === 'FADE' ? 'fade' : 'slide'); 20 if(animationSpeed >= 0){ 21 config["animationSpeed"] = animationSpeed; 22 } 23 if(slideshowSpeed >= 0){ 24 config["slideshowSpeed"] = slideshowSpeed; 25 } 26 if(arNextOptions['THEME']['BIGBANNER_ANIMATIONTYPE'] !== 'FADE'){ 27 config["direction"] = (arNextOptions['THEME']['BIGBANNER_ANIMATIONTYPE'] === 'SLIDE_VERTICAL' ? 'vertical' : 'horizontal'); 28 } 29 config.start = function(slider){ 30 checkNavColor(slider); 31 32 if(slider.count <= 1){ 33 slider.find('.flex-direction-nav li').addClass('flex-disabled'); 34 } 35 $(slider).find('.flex-control-nav').css('opacity',1); 36 } 37 config.after = function(slider){ 38 checkNavColor(slider); 39 } 40 } 41 42 $(".top_slider_wrapp .flexslider").flexslider(config); 43 } 44});
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.