app = window.app || {}; app.wideSlide = app.wideSlide || {}; /** * @requires $ jQuery * @requires $.fn.royalSlider Royal Slider */ app.wideSlide.Slide = qs.createObject(); app.wideSlide.Slide.prototype = { initialize: function (options) { this.options = $.extend(true, { containerId: undefined, slider: { arrowsNav: true, arrowsNavAutoHide: false, controlsInside:false, fadeinLoadedSlide: false, controlNavigationSpacing: 0, controlNavigation: 'bullets', imageScaleMode: 'none', imageAlignCenter:false, loop: true, loopRewind: true, numImagesToPreload: 6, keyboardNavEnabled: true, usePreloader: false } }, options); this.container = $('#' + this.options.containerId); this.initSlider(); return this; }, initSlider: function () { this.container.royalSlider(this.options.slider); this.slider = this.container.data('royalSlider'); if (this.slider.numSlides < 2) { $('.rsNav').hide(); } return this; } };