/home/arranoyd/telegastro/wp-content/plugins/Ultimate_VC_Addons/assets/min-js/swatchbook.min.js
!function(e,i,t){"use strict";var s=i.bsfmodernizr;jQuery.fn.reverse=[].reverse,e.SwatchBook=function(t,i){this.$el=e(i),this._init(t)},e.SwatchBook.defaults={center:6,angleInc:8,speed:700,easing:"ease",proximity:45,neighbor:4,onLoadAnim:!0,initclosed:!1,closeIdx:-1,openAt:-1},e.SwatchBook.prototype={_init:function(t){this.options=e.extend(!0,{},e.SwatchBook.defaults,t),this.$items=this.$el.children("div"),this.itemsCount=this.$items.length,this.current=-1,this.support=s.csstransitions,this.cache=[],this.options.onLoadAnim&&this._setTransition(),this.options.initclosed?(this.isClosed=!0,this.options.onLoadAnim||this._setTransition()):this._center(this.options.center,this.options.onLoadAnim),0<=this.options.openAt&&this.options.openAt<this.itemsCount&&this._openItem(this.$items.eq(this.options.openAt)),this._initEvents()},_setTransition:function(){this.support&&this.$items.css({transition:"all "+this.options.speed+"ms "+this.options.easing})},_openclose:function(){this.isClosed?this._center(this.options.center,!0):this.$items.css({transform:"rotate(0deg)"}),this.isClosed=!this.isClosed},_center:function(s,t){var o=this;this.$items.each(function(t){var i="rotate("+o.options.angleInc*(t-s)+"deg)";e(this).css({transform:i})})},_openItem:function(t){var i=t.index();i!==this.current&&(-1!==this.options.closeIdx&&i===this.options.closeIdx?(this._openclose(),this._setCurrent()):(this._setCurrent(t),t.css({transform:"rotate(0deg)"}),this._rotateSiblings(t)))},_initEvents:function(){var i=this;this.$items.on("click.swatchbook",function(t){i._openItem(e(this))})},_rotateSiblings:function(t){var i,s=this,o=t.index(),n=this.cache[o];n?i=n:(i=t.siblings(),this.cache[o]=i),i.each(function(t){var i="rotate("+(t<o?s.options.angleInc*(t-o):t-o==1?s.options.proximity:s.options.proximity+(t-o-1)*s.options.neighbor)+"deg)";e(this).css({transform:i})})},_setCurrent:function(t){this.current=t?t.index():-1,this.$items.removeClass("ff-active"),t&&t.addClass("ff-active")}};var o=function(t){i.console&&i.console.error(t)};e.fn.swatchbook=function(t){var i=e.data(this,"swatchbook");if("string"==typeof t){var s=Array.prototype.slice.call(arguments,1);this.each(function(){i?e.isFunction(i[t])&&"_"!==t.charAt(0)?i[t].apply(i,s):o("no such method '"+t+"' for swatchbook instance"):o("cannot call methods on swatchbook prior to initialization; attempted to call method '"+t+"'")})}else this.each(function(){i?i._init():i=e.data(this,"swatchbook",new e.SwatchBook(t,this))});return i}}(jQuery,window);