!function(e){var t={},s={slideSelector:"",itemWidth:0,controls:!1,nextSelector:null,prevSelector:null,itemSliders:1};e.fn.meSliderThumbs=function(r){if(0==this.length)return this;var i=this;if(t.el=this,t.settings=e.extend({},s,r),t.children=i.children(t.settings.slideSelector),t.settings.itemWidth=t.children.outerHeight(!0),t.parent=i.parent(),t.children.length<=5)return this;i.children(":first-child").addClass("me-first"),i.children().eq(4).addClass("me-last"),t.indexfirst=0,t.indexlast=t.children.eq(-1).index();var n=function(){t.settings.controls=!0,t.working=!1,t.currentsliderrange=0,t.settings.nextSelector="me-next",t.settings.prevSelector="me-prev me-deactive";var s=document.createElement("a");s.className=t.settings.nextSelector,t.parent.append(s),t.controlsnext=e(s);var r=document.createElement("a");r.className=t.settings.prevSelector,t.parent.append(r),t.controlsprev=e(r),t.controlsnext.bind("click",l),t.controlsprev.bind("click",d)},l=function(e){i.goToNextSlide(),e.preventDefault(),t.working=!1},d=function(e){i.goToPrevSlide(),e.preventDefault(),t.working=!1};i.goToSlide=function(e){if(t.me_first=t.el.children(".me-first").index(),t.me_last=t.el.children(".me-last").index(),!t.working)if(t.working=!0,"next"==e){if(t.me_last==t.indexlast)return;t.currentsliderrange=t.currentsliderrange-t.settings.itemWidth*t.settings.itemSliders;var s=t.currentsliderrange;t.me_first=t.me_first+t.settings.itemSliders,t.me_last=t.me_last+t.settings.itemSliders,t.el.children().removeClass("me-first"),t.el.children().removeClass("me-last"),t.el.css({top:s+"px"}),t.el.children().eq(t.me_first).addClass("me-first"),t.el.children().eq(t.me_last).addClass("me-last"),t.controlsprev.removeClass("me-deactive"),t.me_last==t.indexlast&&t.controlsnext.addClass("me-deactive")}else{if(t.me_first==t.indexfirst)return;t.currentsliderrange=t.currentsliderrange+t.settings.itemWidth*t.settings.itemSliders;var s=t.currentsliderrange;t.me_first=t.me_first-t.settings.itemSliders,t.me_last=t.me_last-t.settings.itemSliders,t.el.children().removeClass("me-first"),t.el.children().removeClass("me-last"),t.el.css({top:s+"px"}),t.el.children().eq(t.me_first).addClass("me-first"),t.el.children().eq(t.me_last).addClass("me-last"),t.controlsnext.removeClass("me-deactive"),t.me_first==t.indexfirst&&t.controlsprev.addClass("me-deactive")}},i.goToNextSlide=function(){i.goToSlide("next")},i.goToPrevSlide=function(){i.goToSlide("prev")},n()}}(jQuery);