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, //loop: true, keyboardNavEnabled: true, controlsInside: true, arrowsNavAutoHide: false, autoScaleSlider: true, allowCSS3: true, autoScaleSliderWidth: 978, autoScaleSliderHeight: 380, imageScaleMode: 'fill', imageAlignCenter: false, controlNavigation: 'bullets', thumbsFitInViewport: false, navigateByClick: true, startSlideId: 0, autoPlay: false, addActiveClass: true, transitionType:'fade', globalCaption: true, imgWidth: 1140, imgHeight: 410, slidesSpacing: 0, minSlideOffset: 0, /*arrowsNav: true, loop: false, keyboardNavEnabled: true, controlsInside: false, imageScaleMode: 'fill', arrowsNavAutoHide: false, autoScaleSlider: true, autoScaleSliderWidth: 960, autoScaleSliderHeight: 350, controlNavigation: 'bullets', thumbsFitInViewport: false, navigateByClick: true, startSlideId: 0, autoPlay: false, transitionType:'move', globalCaption: false, deeplinking: { enabled: true, change: false }*/ /* size of all images http://help.dimsemenov.com/kb/royalslider-jquery-plugin-faq/adding-width-and-height-properties-to-images */ } }, options); this.container = $('#' + this.options.containerId); this.initSlider(); return this; }, initSlider: function () { if($('.container-fluid.rsABlock') != undefined && $('.container-fluid.rsABlock').length <= 1){ this.options.slider.controlsInside = false; this.options.slider.controlNavigation = false; } this.container.royalSlider(this.options.slider); var slider = this.container.data('royalSlider'); slider.ev.on('rsBeforeAnimStart', function (event) { $('.rsContent').show(); }); slider.ev.trigger('rsBeforeAnimStart'); return this; } };