/** * Upcoming Events Side Block * @requires $ jQuery * @required $.royalSlider */ qs.defineNS('app.event'); app.event.SideBlock = function () { this.construct.apply(this, arguments); }; app.event.SideBlock.prototype = { construct: function (options) { var touchDevice = 'ontouchstart' in document.documentElement; this.options = $.extend(true, { blockId: undefined, sliderOptions: { loop: !touchDevice, controlsInside: true, autoHeight: false, arrowsNav: true, arrowsNavAutoHide: false, autoScaleSlider: true, autoScaleSliderWidth: 370, autoScaleSliderHeight: 165, imageScalePadding: 0, controlNavigation: 'none', keyboardNavEnabled: false, fadeinLoadedSlide: false, imageScaleMode: 'none', imageAlignCenter:true, loopRewind: true, numImagesToPreload: 6, usePreloader: false, transitionSpeed: 500, imgWidth: 370, imgHeight: 165, autoPlay: { enabled: true, pauseOnHover: true, stopAtAction: true, delay: 5000 } } }, options); this.block = $('#' + this.options.blockId); this.slider = this.block.children('[data-event-slider]'); this.slider.show().royalSlider(this.options.sliderOptions); return this; } };