1/* jshint undef: true, unused: false */ 2/* global mo_options, jQuery */ 3 4jQuery.noConflict(); 5 6jQuery(document).ready(function ($) { 7 8 "use strict"; 9 10 function bool_of(bool_string) { 11 var bool_value = ((bool_string === "true" || bool_string === "1") ? true : false); 12 return bool_value; 13 } 14 15 function toggle_of(bool_string) { 16 var toggle_value = (bool_string === "true" ? 1 : 0); 17 return toggle_value; 18 } 19 20 if (typeof mo_options.slider_chosen === 'undefined') { 21 return; 22 } 23 24 if (mo_options.slider_chosen === 'Nivo') { 25 26 $('#nivo-slider').nivoSlider({ 27 effect: mo_options.nivo_effect, // Specify sets like: 'fold,fade,sliceDown' 28 slices: parseInt(mo_options.nivo_slices, 10), // For slice animations 29 animSpeed: parseInt(mo_options.nivo_animation_speed, 10), // Slide transition speed 30 pauseTime: parseInt(mo_options.nivo_pause_time, 10), // How long each slide will show 31 startSlide: 0, // Set starting Slide (0 index) 32 directionNav: bool_of(mo_options.nivo_dir_navigation), // Next & Prev navigation 33 controlNav: bool_of(mo_options.nivo_controls), // 1,2,3... navigation 34 keyboardNav: false, // Use left & right arrows 35 pauseOnHover: bool_of(mo_options.nivo_pause_on_hover), // Stop animation while hovering 36 manualAdvance: false, // Force manual transitions 37 randomStart: bool_of(mo_options.nivo_start_random_slide), // Start on a random slide 38 prevText: 'Prev<span></span>', 39 nextText: 'Next<span></span>' 40 }); 41 } else if (mo_options.slider_chosen === 'FlexSlider') { 42 43 $('#slider-area .flexslider').flexslider({ 44 animation: mo_options.flex_slider_effect, 45 slideshowSpeed: parseInt(mo_options.flex_slider_pause_time, 10), //Integer: Set the speed of the slideshow cycling, in milliseconds 46 animationSpeed: parseInt(mo_options.flex_slider_animation_speed, 10), 47 pauseOnHover: toggle_of(mo_options.flex_slider_pause_on_hover), 48 randomize: toggle_of(mo_options.flex_slider_display_random_slide), 49 nextText: 'Next<span></span>', 50 prevText: 'Previous<span></span>' 51 }); 52 } 53 54}); 55 56jQuery(window).load(function () { 57 // Wait till all images have loaded before unwrapping 58 setTimeout(function () { 59 jQuery('.flex-slider-container, #nivo-slider').removeClass('loading'); 60 }, 400); 61});
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.