(function(){function e(b,c){this.selector=null;c?this.nodes=c:"string"==typeof b?(this.selector=b,this.nodes=document.querySelectorAll(b)):this.nodes=[b];this.length=this.nodes.length;this.el=this.nodes[0]}function d(b){return new e(b)}function k(b,c){function l(a,c,d){a=a||{};e();!1!==c&&r();N=n=f=null;p=-1;C=z=D=E=null;A=!1;B=null;F=!1;q=null;k(a);u();S(f.transition_type,!0);n.find("#"+b+" .ism-caption").css("visibility","hidden");T();ca();x(f.play_type);da();setTimeout(function(){!0!==d&&h()}, 1E3)}function e(){d("#"+b+"-ism-loading-mask").remove();var a=document.createElement("DIV");a.id=b+"-ism-loading-mask";a.style.position="absolute";a.style.zIndex=10;a.style.top=0;a.style.bottom=0;a.style.left=0;a.style.right=0;a.style.backgroundColor="#eee";d("#"+b).el.appendChild(a)}function h(){d("#"+b).show();1==d("#"+b+"-ism-loading-mask").length&&d("#"+b+"-ism-loading-mask").fadeOut(400,function(){d("#"+b+"-ism-loading-mask").remove();O(0);U(0)})}function k(a){for(var c in G){var g=typeof G[c]; void 0==a[c]&&"object"!=g&&(g=d("#"+b).data(c),void 0!=g&&("true"===g?g=!0:"false"===g&&(g=!1),a[c]=g))}f=a||{};for(c in G)void 0==f[c]&&(f[c]=G[c]);f.captions=[];a=d("#"+b+" ol > li");c=a.length;for(g=0;gl;l++){var e={enable:V[l].enable,delay:V[l].delay},t=d(a.get(g)).find(".ism-caption-"+l);1==t.length&&(e.enable=!0,t=t.data("delay"),isNaN(t)||(e.delay=parseInt(t)));f.captions[g][l]=e}}}function r(){g();W();q&&q.unbindEventListeners();X();d("#"+b+" .ism-radios input.ism-radio, #"+ b+" .ism-radios .ism-radio-label").off("click",H);d("#"+b+" .ism-radios input.ism-radio, #"+b+" .ism-radios .ism-radio-label").off("touchstart",H);Y();d("#"+b+" .ism-button").remove();d("#"+b+" .ism-radios").remove();d("#"+b+" .ism-cloned").remove();for(d("#"+b+" .ism-tmp-clone").remove();0 li").length;p=0;n.addClass("ism-slides");d("#"+b+" .ism-slides > li").addClass("ism-slide"); d("#"+b+" .ism-slides > .ism-slide > img, #"+b+" .ism-slides > .ism-slide > a > img").addClass("ism-img");n.find("li").each(function(a){this.addClass("ism-slide-"+a)});d("#"+b).wrapInner("
");n=d("#"+b+" ol.ism-slides");d("#"+b+" .ism-img").wrap("
")}function m(){return d("#"+b+" .ism-slide").length}function x(a){f.play_type=a;Y();d("#"+b+" .ism-pause-button").remove();f.pause_button&&"manual"!=f.play_type&&(n.after("
 
"), C=d("#"+b+" .ism-pause-button"),C.on("click",I),C.on("touchstart",I));v()}function v(){A=!0;d("#"+b+" .ism-pause-button").removeClass("ism-play");"manual"!=f.play_type&&(clearTimeout(B),B=setTimeout(a,f.interval))}function a(){var a=p+1;A&&"manual"!=f.play_type&&("once"==f.play_type&&p==m()-2?(y(a),g()):"once-rewind"==f.play_type&&p==m()-1?(y(0),g()):("loop"==f.play_type&&p==m()-1?y(0):y(a),v()))}function g(){A=!1;clearTimeout(B);B=null;d("#"+b+" .ism-pause-button").addClass("ism-play")}function t(a, b){a!=p&&(g(),y(a,b))}function T(){f.buttons&&(n.after("
 
 
"),E=d("#"+b+" .ism-button-prev"),D=d("#"+b+" .ism-button-next"),E.on("click",J),E.on("touchstart",J),D.on("click",K),D.on("touchstart",K))}function X(){d("#"+b+" .ism-button-prev").off("click",J);d("#"+b+" .ism-button-prev").off("touchstart",J);d("#"+b+" .ism-button-next").off("click",K);d("#"+b+" .ism-button-next").off("touchstart",K)}function J(a){a&& a.preventDefault&&a.preventDefault();a&&a.stopPropagation&&a.stopPropagation();t(p-1)}function K(a){a&&a.preventDefault&&a.preventDefault();a&&a.stopPropagation&&a.stopPropagation();t(p+1)}function ca(){if(f.radios){d("#"+b).append("");z=d("#"+b+" .ism-radios");"thumbnail"==f.radio_type&&z.addClass("ism-radios-as-thumbnails");for(var a=0;a"):z.append("
  • ");d("#"+b+" .ism-radios input.ism-radio, #"+b+" .ism-radios .ism-radio-label").on("click",H);d("#"+b+" .ism-radios input.ism-radio, #"+b+" .ism-radios .ism-radio-label").on("touchstart",H)}}function H(a){a.preventDefault&&a.preventDefault(); a.stopPropagation&&a.stopPropagation();a=d(a.target.parentNode).index();t(a)}function Z(a){f.radios&&(d("#"+b+" .ism-radios li").removeClass("active"),a=d("#"+b+" .ism-radios li").get(a),d(a).addClass("active"),d(a).find("input").attr("checked","checked"))}function Y(){d("#"+b+" .ism-pause-button").off("click",I);d("#"+b+" .ism-pause-button").off("touchstart",I)}function I(a){a.preventDefault();a.stopPropagation();A?g():v()}function da(){var a=d("#"+b).get(0),c=n.get(0);q=new Dragdealer(a,c,{steps:m(), x:0,speed:.2,loose:!0,requestAnimationFrame:!0,dragStartCallback:function(){g()},dragStopCallback:function(a,b){new_slide_index=q.getStep()[0]-1;f.pause_button?g():v();var c=new_slide_index,d=p;p=c;P("afterswipe",[c]);Z(c);L(d,c,!1)},onAfterGlide:function(){q.setStep(p+1,1,!0)}});window.onload=function(){setTimeout(function(){q.reflow()},150);setTimeout(function(){q.reflow()},600)}}function aa(){q&&(q.setStep(p+1,1,!0),q.reflow())}function P(a,b){Q[a]&&Q[a].apply(this,b)}function S(a,c){if(1==c|| a!=f.transition_type){f.transition_type=a;d("#"+b+" .ism-slide").removeClass("ism-zoom-in");d("#"+b+" .ism-slide").show();var g=m();n.css("width",100*g+"%");n.find(".ism-slide").each(function(a){a=N*a+"%";this.css("width",100/g+"%");this.css("left",a)})}}function y(a,b){if(!0!==F&&a!=p){F=!0;var c=p;a=parseInt(a);0>a?a=m()-1:a>=m()&&(a=0);var g=a;Z(g);p=g;P("beforetransition",[g]);"instant"==f.transition_type?(g=a,q.setStep(g+1,1,!0),L(c,g,!0,b)):"slide"==f.transition_type?ea(c,a,b):"fade"==f.transition_type? ba(c,a,!1,b):"zoom"==f.transition_type&&ba(c,a,!0,b)}}function ea(a,b,c){var g=b/(m()-1);q.startSlide(g,function(){L(a,b,!0,c)})}function ba(a,c,g,l){d("#"+b+" li.ism-slide").removeClass("ism-zoom-in");var t=d("#"+b+" li.ism-slide-"+a),e=n.clone();e.addClass("ism-slides-clone");var h=c/(m()-1),h=q.getOffsetsByRatios([h,0]);e.css("transform","translateX("+h[0]+"px)");e.insertAfter(n.el);g&&t.addClass("ism-zoom-in");g=e.get(0);n.fadeInto(g,2*f.transition_duration,function(){q.setStep(c+1,1,!0);d("#"+ b+" .ism-slides-clone").remove();d("#"+b+" .ism-slides").show();d("#"+b+" .ism-slides").css("opacity",null);L(a,c,!0,l)})}function L(a,c,g,l){c=parseInt(c);d("#"+b+" .ism-slides-clone").remove();d("#"+b+" .ism-slides").show();d("#"+b+" li.ism-slide").removeClass("ism-zoom-in");g&&aa();l&&l();O(c);U(c);F=!1;P("aftertransition",[c])}function O(a){W();"none"!=f.image_fx&&("zoompan"==f.image_fx?d("#"+b+" .ism-slide-"+a+" .ism-img-frame").addClass("ism-zoom-pan"):"zoomrotate"==f.image_fx&&d("#"+b+" .ism-slide-"+ a+" .ism-img-frame").addClass("ism-zoom-rotate"))}function W(){d("#"+b+" .ism-slide .ism-img-frame").removeClass("ism-zoom-pan");d("#"+b+" .ism-slide .ism-img-frame").removeClass("ism-zoom-rotate")}function U(a){n.find(".ism-caption").css("visibility","hidden");n.find(".ism-caption").removeClass("ism-caption-anim");R(a,0);R(a,1);R(a,2)}function R(a,b){f.captions[a]&&1==f.captions[a][b].enable&&setTimeout(function(){n.find(".ism-slide-"+a+" .ism-caption-"+b).css("visibility","visible");n.find(".ism-slide-"+ a+" .ism-caption-"+b).addClass("ism-caption-anim")},f.captions[a][b].delay)}var G={transition_type:"slide",play_type:"manual",interval:7E3,image_fx:"none",buttons:!0,radios:!0,radio_type:"button",pause_button:!0,transition_duration:350,swipe:!0},V=[{enable:!1,delay:0},{enable:!1,delay:200},{enable:!1,delay:400}],f,n,N,p,E,D,z,C,A,B,F,q,Q={};l(c,!1,c.prevent_stop_loading||!1);this.init=l;this.deinit=r;this.stopLoading=h;this.transition=y;this.listen=function(a,b){Q[a]=b};this.reflow=aa;this.setTransitionType= S;this.setPlayType=x;this.setInterval=function(a){f.interval=a};this.setImageFx=function(a){a!=f.image_fx?(f.image_fx=a,O(p)):f.image_fx=a};this.setCaptionEnable=function(a,b,c){f.captions[a][b].enable=c};this.setCaptionDelay=function(a,b,c){f.captions[a][b].delay=c};this.enableButtons=function(a){!0!==a||f.buttons||(X(),d("#"+b+" .ism-button").remove(),T())};this.enableRadios=function(a){};this.setRadioType=function(a){"thumbnail"==a?d("#"+b+" .ism-radios").addClass("ism-radios-as-thumbnails"):d("#"+ b+" .ism-radios").removeClass("ism-radios-as-thumbnails")};this.getSlideCount=m;this.getActiveSlideIndex=function(){return p};this.setElementId=function(a){b=document.getElementById(b).id=a}}e.prototype.get=function(b){return this.nodes[b]};e.prototype.find=function(b){b=this.el.querySelectorAll(b);return new e(null,b)};e.prototype.index=function(){for(var b=this.el,c=0;null!=(b=b.previousSibling);)c++;return c};e.prototype.each=function(b){for(var c=0;cthis.valuePrecision[0]||Math.abs(a[1])>this.valuePrecision[1]?(this.value.current[0]+=a[0]*Math.min(this.options.speed*this.timeOffset/25,1),this.value.current[1]+=a[1]*Math.min(this.options.speed*this.timeOffset/25,1)):this.groupCopy(this.value.current,this.value.target);return!0},animateSlide:function(){for(var a=this.value.target[0]-this.value.current[0], b=0<=a?1:-1,a=Math.abs(a),c=(this.value.current[0]-this.slide_start)/(this.value.target[0]-this.slide_start),d=c-.5,d=(-3*d*d+.8)*this.step_size*.08;d>a;)d*=.5;.995h.yDiff||!this.options.vertical&&h.yDiff>h.xDiff}};for(var k=function(a,b){return function(){return a.apply(b,arguments)}},b=function(a,b,c){a.addEventListener?a.addEventListener(b,c,!1):a.attachEvent&&a.attachEvent("on"+b,c)},c=function(a,b,c){a.removeEventListener?a.removeEventListener(b,c,!1):a.detachEvent&&a.detachEvent("on"+b,c)},l=function(a){a||(a=window.event); a.preventDefault&&a.preventDefault();a.returnValue=!1},M=function(a){a||(a=window.event);a.stopPropagation&&a.stopPropagation();a.cancelBubble=!0},h={x:0,y:0,xDiff:0,yDiff:0,refresh:function(a){a||(a=window.event);"mousemove"==a.type?this.set(a):a.touches&&this.set(a.touches[0])},set:function(a){var b=this.x,c=this.y;if(a.clientX||a.clientY)this.x=a.clientX,this.y=a.clientY;else if(a.pageX||a.pageY)this.x=a.pageX-document.body.scrollLeft-document.documentElement.scrollLeft,this.y=a.pageY-document.body.scrollTop- document.documentElement.scrollTop;this.xDiff=Math.abs(this.x-b);this.yDiff=Math.abs(this.y-c)}},w={get:function(a){var b={left:0,top:0};void 0!==a.getBoundingClientRect&&(b=a.getBoundingClientRect());return[b.left,b.top]}},r={transform:e("transform"),perspective:e("perspective"),backfaceVisibility:e("backfaceVisibility")},u=["webkit","moz"],m=window.requestAnimationFrame,x=window.cancelAnimationFrame,v=0;v