text: ;!function(t){"use strict";var i=function(i,s){this.$element=i,this.defaults={start:null,narrow:!1,speed:400,loop:!1,title:"",color:"#000"},this.options=t.extend({},this.defaults,s),this.init(this.options)};i.prototype={init:function(i){this.$items=this.$element.children(),this.length=this.$items.length,this.current=Math.min(this.options.start||Math.floor(this.length/2),this.length-1),this.length<5&&(i.narrow=!0),this.duration=i.speed/1e3,this.$items.find("img").css("width","100%"),this.$title=t('<div id="vitrine-title">'+i.title+"</div>"),this.$desc=t('<div id="vitrine-desc"></div>');var s={width:"100%","font-size":"30px","z-index":"1","text-align":"center",position:"absolute",left:"0",color:i.color,top:"15%"},e={position:"absolute",left:"50%","z-index":"1",bottom:"15%",color:i.color,"font-size":"25px","-webkit-transform":"translateX(-50%)",transform:"translateX(-50%)","text-align":"center","-webkit-writing-mode":"vertical-rl"};this.$title.css(s),this.$desc.css(e),this.$element.prepend(this.$title),this.$element.append(this.$desc);for(var n=0;n<this.$items.length;n++)n<this.current&&this.$items.eq(n).css(this._getCSS(0)),n>this.current&&this.$items.eq(n).css(this._getCSS(4));this.layout()},layout:function(){this.$showItems=[];var i=[];i[0]=this.options.narrow?null:this.current-1>0?this.current-2:this.options.loop?this.length-2+this.current:null,i[1]=this.current>0?this.current-1:this.options.loop?this.length-1:null,i[2]=this.current,i[3]=this.current<this.length-1?this.current+1:this.options.loop?0:null,i[4]=this.options.narrow?null:this.current+1<this.length-1?this.current+2:this.options.loop?2-this.length+this.current:null,this.$items.css({opacity:"0",position:"absolute",top:"50%","z-index":"6",transition:this.duration+"s ease-in-out","-webkit-transform":"translate(-50%,-50%)",transform:"translate(-50%,-50%)",cursor:"pointer"});for(var s,e=0;5>e;e++)null!==i[e]&&(this.$showItems[e]=this.$items.eq(i[e]),this.$showItems[e].css(this._getCSS(e)),2==e&&(s=this.$showItems[2].attr("data-desc")));this.$desc.fadeOut(this.options.speed/2,function(){t(this).html(s)}).fadeIn(this.options.speed/2),this._setEvent()},_getCSS:function(t){switch(t){case 0:return{width:"100px",left:"15%","z-index":"7",opacity:"0.3"};case 1:return{width:"150px",left:"30%","z-index":"8",opacity:"0.7"};case 2:return{width:"200px",left:"50%","z-index":"9",opacity:"1"};case 3:return{width:"150px",left:"70%","z-index":"8",opacity:"0.7"};case 4:return{width:"100px",left:"85%","z-index":"7",opacity:"0.3"}}},_setEvent:function(){this._cancelEvent();for(var t=0;5>t;t++)2>t&&this.$showItems[t]&&this.$showItems[t].on("click",this._prev()),t>2&&this.$showItems[t]&&this.$showItems[t].on("click",this._next())},_prev:function(){var t=this;return function(){t.current=0===t.current?t.options.loop?t.length-1:0:t.current-1,t.layout()}},_next:function(){var t=this;return function(){t.current=t.current===t.length-1?t.options.loop?0:t.current:t.current+1,t.layout()}},_cancelEvent:function(){for(var t=0;5>t;t++)this.$showItems[t]&&this.$showItems[t].off("click")}},t.fn.vitrine=function(t){new i(this,t);return this}}(jQuery);
  