/* == malihu jquery thumbnail scroller plugin == Version: 2.0.3, License: MIT License (MIT) */ !function(t,e,n){var a,i="mThumbnailScroller",o="mTS",r=".mThumbnailScroller",l={setTop:0,setLeft:0,type:"hover-50",axis:"x",speed:15,contentTouchScroll:25,markup:{buttonsPlaceholder:!1,buttonsHTML:{up:"SVG set 1",down:"SVG set 1",left:"SVG set 1",right:"SVG set 1"}},advanced:{autoExpandHorizontalScroll:!0,updateOnContentResize:!0,updateOnImageLoad:!0},theme:"none",callbacks:{onTotalScrollOffset:0,onTotalScrollBackOffset:0,alwaysTriggerOffsets:!0}},s=0,c={},d=e.attachEvent&&!e.addEventListener?1:0,u=!1,h=["mTS_disabled","mTS_destroyed","mTS_no_scroll"],f={init:function(e){var e=t.extend(!0,{},l,e),n=p.call(this);if(e.live){var a=e.liveSelector||this.selector||r,i=t(a);if("off"===e.live)return void v(a);c[a]=setTimeout(function(){i.mThumbnailScroller(e),"once"===e.live&&i.length&&v(a)},500)}else v(a);return e.speed=0===e.speed?100:e.speed,m(e),t(n).each(function(){var n=t(this);if(!n.data(o)){n.data(o,{idx:++s,opt:e,html:null,overflowed:null,bindEvents:!1,tweenRunning:!1,langDir:n.css("direction"),cbOffsets:null,trigger:null});var a=n.data(o).opt,i=n.data("mts-axis"),r=n.data("mts-type"),l=n.data("mts-theme");i&&(a.axis=i),r&&(a.type=r),l&&(a.theme=l,m(a)),x.call(this),f.update.call(null,n)}})},update:function(e){var n=e||p.call(this);return t(n).each(function(){var e=t(this);if(e.data(o)){var n=e.data(o),a=n.opt,i=t("#mTS_"+n.idx+"_container");if(!i.length)return;n.tweenRunning&&R(e),e.hasClass(h[0])&&e.removeClass(h[0]),e.hasClass(h[1])&&e.removeClass(h[1]),b.call(this),g.call(this),n.overflowed=_.call(this),k.call(this),M.call(this);var r=[i[0].offsetTop,i[0].offsetLeft];"x"!==a.axis&&(n.overflowed[0]?U(e,r[0].toString(),{dir:"y",dur:0,overwrite:"none"}):(y.call(this),"y"===a.axis?(U(e,"0",{dir:"y",dur:0,overwrite:"none"}),C.call(this)):"yx"===a.axis&&n.overflowed[1]&&U(e,r[1].toString(),{dir:"x",dur:0,overwrite:"none"}))),"y"!==a.axis&&(n.overflowed[1]?U(e,r[1].toString(),{dir:"x",dur:0,overwrite:"none"}):(y.call(this),"x"===a.axis?(U(e,"0",{dir:"x",dur:0,overwrite:"none"}),C.call(this)):"yx"===a.axis&&n.overflowed[0]&&U(e,r[0].toString(),{dir:"y",dur:0,overwrite:"none"}))),n.overflowed[0]||n.overflowed[1]?e.removeClass(h[2]):e.addClass(h[2]),F.call(this)}})},scrollTo:function(e,n){if("undefined"!=typeof e&&null!=e){var a=p.call(this);return t(a).each(function(){var a=t(this);if(a.data(o)){var i=a.data(o),r=i.opt,l={trigger:"external",speed:r.speed,duration:1e3,easing:"easeInOut",timeout:60,callbacks:!0,onStart:!0,onUpdate:!0,onComplete:!0},s=t.extend(!0,{},l,n),c=E.call(this,e),d=s.duration?s.duration:7e3/(s.speed||1);c[0]=D.call(this,c[0],"y"),c[1]=D.call(this,c[1],"x"),s.dur=d>0&&17>d?17:d,setTimeout(function(){null!==c[0]&&"undefined"!=typeof c[0]&&"x"!==r.axis&&i.overflowed[0]&&(s.dir="y",s.overwrite="all",U(a,-c[0].toString(),s)),null!==c[1]&&"undefined"!=typeof c[1]&&"y"!==r.axis&&i.overflowed[1]&&(s.dir="x",s.overwrite="none",U(a,-c[1].toString(),s))},s.timeout)}})}},stop:function(){var e=p.call(this);return t(e).each(function(){var e=t(this);e.data(o)&&R(e)})},disable:function(e){var n=p.call(this);return t(n).each(function(){var n=t(this);if(n.data(o)){{var a=n.data(o);a.opt}F.call(this,"remove"),C.call(this),e&&y.call(this),k.call(this,!0),n.addClass(h[0])}})},destroy:function(){var e=p.call(this);return t(e).each(function(){var n=t(this);if(n.data(o)){var a=n.data(o),r=a.opt,l=t("#mTS_"+a.idx),s=(t("#mTS_"+a.idx+"_container"),t("#mTS_"+a.idx+"_buttonUp,#mTS_"+a.idx+"_buttonDown,#mTS_"+a.idx+"_buttonLeft,#mTS_"+a.idx+"_buttonRight"));r.live&&v(e),F.call(this,"remove"),C.call(this),y.call(this),n.removeData(o),H(this,"mts"),s.remove(),l.replaceWith(a.html),n.removeClass(i+" _"+o+"_"+a.idx+" "+o+"-"+r.theme+" "+h[2]+" "+h[0]).addClass(h[1])}})}},p=function(){return"object"!=typeof t(this)||t(this).length<1?r:this},m=function(e){var n=["buttons-out"],a=["buttons-in"],i=["buttons-out"],o=["hover-classic"],r=["hover-full"];e.markup.buttonsPlaceholder=t.inArray(e.theme,n)>-1?"outside":e.markup.buttonsPlaceholder,e.markup.buttonsHTML=t.inArray(e.theme,a)>-1?{up:"SVG set 2",down:"SVG set 2",left:"SVG set 2",right:"SVG set 2"}:t.inArray(e.theme,i)>-1?{up:"SVG set 3",down:"SVG set 3",left:"SVG set 3",right:"SVG set 3"}:e.markup.buttonsHTML,e.type=t.inArray(e.theme,o)>-1?"hover-85":t.inArray(e.theme,r)>-1?"hover-precise":e.type,e.speed=t.inArray(e.theme,o)>-1?60:t.inArray(e.theme,r)>-1?10:e.speed},v=function(t){c[t]&&(clearTimeout(c[t]),H(c,t))},x=function(){var e=t(this),n=e.data(o),a=n.opt,r="yx"===a.axis?"mTS_vertical_horizontal":"x"===a.axis?"mTS_horizontal":"mTS_vertical",l=a.markup.thumbnailsContainer||"ul",s=a.markup.thumbnailContainer||"li",c=a.markup.thumbnailElement||"img";if(n.html=e.children().clone(!0,!0),!e.find(l).length){var d=e.find("li").length?"