KOKINIO - MANAGER
Edit File: jquery.flipster.min.js
!function(I,t,P){"use strict";function L(n,i){var r=null;return function(){var t=this,e=arguments;null===r&&(r=setTimeout(function(){n.apply(t,e),r=null},i))}}function D(){if(e!==P)return e;var t=document.createElement("div");return t.innerHTML="<svg/>",e=t.firstChild&&t.firstChild.namespaceURI===E}var e,a,n=(a={},function(t){if(a[t]!==P)return a[t];var e=document.createElement("div").style,n=t.charAt(0).toUpperCase()+t.slice(1),i=(t+" "+["webkit","moz","ms","o"].join(n+" ")+n).split(" ");for(var r in i)if(i[r]in e)return a[t]=i[r];return a[t]=!1}),E="http://www.w3.org/2000/svg",T=I(t),X=n("transform"),i={itemContainer:"ul",itemSelector:"li",start:"center",fadeIn:400,loop:!1,autoplay:!1,pauseOnHover:!0,style:"coverflow",spacing:-.6,click:!0,keyboard:!0,scrollwheel:!0,touch:!0,nav:!1,buttons:!1,buttonPrev:"Previous",buttonNext:"Next",onItemSwitch:!1},j={main:"flipster",active:"flipster--active",container:"flipster__container",nav:"flipster__nav",navChild:"flipster__nav__child",navItem:"flipster__nav__item",navLink:"flipster__nav__link",navCurrent:"flipster__nav__item--current",navCategory:"flipster__nav__item--category",navCategoryLink:"flipster__nav__link--category",button:"flipster__button",buttonPrev:"flipster__button--prev",buttonNext:"flipster__button--next",item:"flipster__item",itemCurrent:"flipster__item--current",itemPast:"flipster__item--past",itemFuture:"flipster__item--future",itemContent:"flipster__item__content"},M=new RegExp("\\b("+j.itemCurrent+"|"+j.itemPast+"|"+j.itemFuture+")(.*?)(\\s|$)","g"),N=new RegExp("\\s\\s+","g");I.fn.flipster=function(e){if("string"==typeof e){var n=Array.prototype.slice.call(arguments,1);return this.each(function(){var t=I(this).data("methods");return t[e]?t[e].apply(this,n):this})}var k=I.extend({},i,e);return this.each(function(){function t(e){return e=e||"next",I('<button class="'+j.button+" "+("next"===e?j.buttonNext:j.buttonPrev)+'" role="button" />').html(function(t){var e="next"===t?k.buttonNext:k.buttonPrev;return"custom"!==k.buttons&&D?'<svg viewBox="0 0 13 20" xmlns="'+E+'" aria-labelledby="title"><title>'+e+'</title><polyline points="10,3 3,10 10,17"'+("next"===t?' transform="rotate(180 6.5,10)"':"")+"/></svg>":e}(e)).on("click",function(t){l(e),t.preventDefault()})}function a(){y.css("transition",""),p.css("transition",""),h.css("transition","")}function o(r){r&&(y.css("transition","none"),p.css("transition","none"),h.css("transition","none")),v=p.width(),p.height(function(){var t,e=0;return h.each(function(){(t=I(this).height())>e&&(e=t)}),e}()),v?(n&&(clearInterval(n),n=!1),h.each(function(t){var e,n,i=I(this);i.attr("class",function(t,e){return e&&e.replace(M,"").replace(N," ")}),e=i.outerWidth(),0!==k.spacing&&i.css("margin-right",e*k.spacing+"px"),n=i.position().left,b[t]=-1*(n+e/2-v/2),t===h.length-1&&(s(),r&&setTimeout(a,1))})):n=n||setInterval(function(){o(r)},500)}function s(){var e,n,i,r=h.length;h.each(function(t){e=I(this),n=" ",i=t===x?(n+=j.itemCurrent,r+1):t<x?(n+=j.itemPast+" "+j.itemPast+"-"+(x-t),t):(n+=j.itemFuture+" "+j.itemFuture+"-"+(t-x),r-t),e.css("z-index",i).attr("class",function(t,e){return e&&e.replace(M,"").replace(N," ")+n})}),0<=x&&(v&&b[x]!==P||o(!0),X?p.css("transform","translateX("+b[x]+"px)"):p.css({left:b[x]+"px"})),function(){if(k.nav){var t=d.data("flip-category");g.removeClass(j.navCurrent),_.filter(function(){return I(this).data("index")===x||t&&I(this).data("category")===t}).parent().addClass(j.navCurrent)}}()}function l(t){var e=x;if(!(h.length<=1))return"prev"===t?0<x?x--:k.loop&&(x=h.length-1):"next"===t?x<h.length-1?x++:k.loop&&(x=0):"number"==typeof t?x=t:t!==P&&(x=h.index(t)),d=h.eq(x),x!==e&&k.onItemSwitch&&k.onItemSwitch.call(y,h[x],h[e]),s(),y}function i(t){return k.autoplay=t||k.autoplay,clearInterval(w),w=setInterval(function(){var t=x;l("next"),t!==x||k.loop||clearInterval(w)},k.autoplay),y}function r(){return clearInterval(w),w=0,y}function c(t){return r(),k.autoplay&&t&&(w=-1),y}function u(){o(!0),y.hide().css("visibility","").addClass(j.active).fadeIn(k.fadeIn)}function f(){if(p=y.find(k.itemContainer).addClass(j.container),!((h=p.find(k.itemSelector)).length<=1))return h.addClass(j.item).each(function(){var t=I(this);t.children("."+j.itemContent).length||t.wrapInner('<div class="'+j.itemContent+'" />')}),k.click&&h.on("click.flipster touchend.flipster",function(t){C||(I(this).hasClass(j.itemCurrent)||t.preventDefault(),l(this))}),k.buttons&&1<h.length&&(y.find("."+j.button).remove(),y.append(t("prev"),t("next"))),function(){var s={};!k.nav||h.length<=1||(m&&m.remove(),m=I('<ul class="'+j.nav+'" role="navigation" />'),_=I(""),h.each(function(t){var e=I(this),n=e.data("flip-category"),i=e.data("flip-title")||e.attr("title")||t,r=I('<a href="#" class="'+j.navLink+'">'+i+"</a>").data("index",t);if(_=_.add(r),n){if(!s[n]){var a=I('<li class="'+j.navItem+" "+j.navCategory+'">'),o=I('<a href="#" class="'+j.navLink+" "+j.navCategoryLink+'" data-flip-category="'+n+'">'+n+"</a>").data("category",n).data("index",t);s[n]=I('<ul class="'+j.navChild+'" />'),_=_.add(o),a.append(o,s[n]).appendTo(m)}s[n].append(r)}else m.append(r);r.wrap('<li class="'+j.navItem+'">')}),m.on("click","a",function(t){var e=I(this).data("index");0<=e&&(l(e),t.preventDefault())}),"after"===k.nav?y.append(m):y.prepend(m),g=m.find("."+j.navItem))}(),0<=x&&l(x),y}var e,p,v,n,h,d,m,g,_,y=I(this),b=[],x=0,w=!1,C=!1;e={jump:l,next:function(){return l("next")},prev:function(){return l("prev")},play:i,stop:r,pause:c,index:f},y.data("methods",e),y.hasClass(j.active)||function(){var t;if(y.css("visibility","hidden"),f(),h.length<=1)y.css("visibility","");else{t=!!k.style&&"flipster--"+k.style.split(" ").join(" flipster--"),y.addClass([j.main,X?"flipster--transform":" flipster--no-transform",t,k.click?"flipster--click":""].join(" ")),k.start&&(x="center"===k.start?Math.floor(h.length/2):k.start),l(x);var e=y.find("img");if(e.length){var n=0;e.on("load",function(){++n>=e.length&&u()}),setTimeout(u,750)}else u();T.on("resize.flipster",L(o,400)),k.autoplay&&i(),k.pauseOnHover&&p.on("mouseenter.flipster",function(){w?c(!0):r()}).on("mouseleave.flipster",function(){-1===w&&i()}),function(t){k.keyboard&&(t[0].tabIndex=0,t.on("keydown.flipster",L(function(t){var e=t.which;37!==e&&39!==e||(l(37===e?"prev":"next"),t.preventDefault())},250)))}(y),function(t){if(k.scrollwheel){var e,n,i=!1,r=0,a=0,o=0,s=/mozilla/.test(navigator.userAgent.toLowerCase())&&!/webkit/.test(navigator.userAgent.toLowerCase());t.on("mousewheel.flipster wheel.flipster",function(){i=!0}).on("mousewheel.flipster wheel.flipster",L(function(t){clearTimeout(a),a=setTimeout(function(){o=r=0},300),t=t.originalEvent,o+=t.wheelDelta||-1*(t.deltaY+t.deltaX),Math.abs(o)<25&&!s||(r++,n!==(e=0<o?"prev":"next")&&(r=0),n=e,(r<6||r%3==0)&&l(e),o=0)},50)),T.on("mousewheel.flipster wheel.flipster",function(t){i&&(t.preventDefault(),i=!1)})}}(p),function(t){if(k.touch){var e,n,i,r,a=!1,o=L(l,300);t.on({"touchstart.flipster":function(t){t=t.originalEvent,C=t.touches?t.touches[0].clientX:t.clientX,a=t.touches?t.touches[0].clientY:t.clientY},"touchmove.flipster":L(function(t){!1!==C&&(t=t.originalEvent,e=t.touches?t.touches[0].clientX:t.clientX,n=t.touches?t.touches[0].clientY:t.clientY,i=n-a,r=e-C,Math.abs(i)<100&&30<=Math.abs(r)&&(o(r<0?"next":"prev"),C=e,t.preventDefault()))},100),"touchend.flipster touchcancel.flipster ":function(){C=!1}})}}(p)}}()})}}(jQuery,window);