!function(){"use strict";window.jnews=window.jnews||{},window.jnews.owlslider=window.jnews.owlslider||{};var t,e,n=(t="object"==typeof jnews&&"object"==typeof jnews.library,e="function"==typeof jnews.tns,function(n){if(t){var i=jnews.library;n=i.extend({container:".jeg_slider_type_1",items:5,responsive:{0:{items:4,sliderBy:4},768:{items:6,sliderBy:6},1024:{items:7,sliderBy:7}},gutter:10,controls:!0,autoplay:!0,mouseDrag:!0,speed:500,autoplayTimeout:5e3,textDirection:"ltr",navAsThumbnails:!0,navContainer:".jeg_slider_thumbnail"},n||{}),{init:function(){var t=this;t.options=n,t.$slider=t.query(t.options.container),t.wrapper=i.getParents(t.$slider,".jeg_slider_wrapper"),t.wrapper=t.wrapper.length?t.wrapper[t.wrapper.length-1]:i.doc,t.$thumbnail=t.wrapper.querySelector(t.options.navContainer),t.options.hover=t.$slider.dataset.hoverAction,t.options.autoplay=t.$slider.dataset.autoplay,t.options.autoplayTimeout=t.$slider.dataset.delay,e&&(i.hasClass(t.$slider,"jeg_tns_active")||(t.mainSlider=jnews.tns({container:t.$slider,items:1,autoplay:t.options.autoplay,speed:t.options.speed,autoplayTimeout:t.options.autoplayTimeout,nav:!1,controls:!0,controlsText:["",""],rewind:!1,mouseDrag:t.options.mouseDrag,lazyload:!0,lazyloadSelector:".jeg_slide_item .owl-lazy",textDirection:t.options.textDirection,onInit:function(t){void 0!==t.nextButton&&(t.nextButton.setAttribute("aria-label","Next button"),i.addClass(t.nextButton,"tns-next")),void 0!==t.prevButton&&(t.prevButton.setAttribute("aria-label","Previous button"),i.addClass(t.prevButton,"tns-prev"))}}),void 0!==t.mainSlider&&(i.addClass(t.$slider,"jeg_tns_active"),i.dataStorage.put(t.$slider,"tiny-slider",t.mainSlider),t.mainSlider.events.on("indexChanged",(function(e){t.currentThumbnail(e)})),t.mainSlider.events.on("dragStart",t.stopPropagationDrag))),i.hasClass(t.$thumbnail,"jeg_tns_active")||(t.thumbnailSlider=jnews.tns({container:t.$thumbnail,nav:!1,controls:!1,loop:!1,items:t.options.items,gutter:t.options.gutter,mouseDrag:t.options.mouseDrag,textDirection:t.options.textDirection,lazyload:!0,freezable:!0,lazyloadSelector:".jeg_slide_thumbnail_item .owl-lazy",responsive:t.options.responsive,onInit:function(e){void 0!==e.nextButton&&(e.nextButton.setAttribute("aria-label","Next button"),i.addClass(e.nextButton,"tns-next")),void 0!==e.prevButton&&(e.prevButton.setAttribute("aria-label","Previous button"),i.addClass(e.prevButton,"tns-prev")),t.setCurrentThumbnail(e)}}),void 0!==t.thumbnailSlider&&(t.thumbnailSlider.events.on("dragStart",t.stopPropagationDrag),i.addClass(t.$thumbnail,"jeg_tns_active"),i.dataStorage.put(t.$thumbnail,"tiny-slider",t.thumbnailSlider))))},query:function(t){return"string"==typeof t&&(t=i.doc.querySelector(t)),t},stopPropagationDrag:function(t){t.event.preventDefault(),t.event.stopPropagation()},setCurrentThumbnail:function(t){var e=this,n=t.index;t.slideItems[n].classList.add("current"),"object"==typeof t.slideItems&&t.slideItems&&(e.in_drag=!1,i.objKeys(t.slideItems).forEach((function(n){var i=t.slideItems[n],o=function(t){var i="mouseover"===t.type&&!e.in_drag,o="click"===t.type&&!e.in_drag;o&&t.preventDefault(),(i||o)&&e.mainSlider.goTo(n)};i.addEventListener("mousedown",(function(){e.in_drag=!0})),i.addEventListener("mouseup",(function(){e.in_drag=!1})),i.addEventListener("mouseleave",(function(){e.in_drag=!1})),e.options.hover&&i.addEventListener("mouseover",o),i.addEventListener("click",o)})))},currentThumbnail:function(t){var e=this.mainSlider.getInfo(),n=this.thumbnailSlider.getInfo(),i=e.displayIndex,o=e.indexCached;n.slideItems[o-1].classList.remove("current"),this.thumbnailSlider.goTo(i-1),n.slideItems[i-1].classList.add("current")}}.init()}});window.jnews.owlslider=n}();