text: /*!
   *  Kwicks: Sexy Sliding Panels for jQuery - v2.1.0
   *  http://devsmash.com/projects/kwicks
   *
   *  Copyright 2013 Jeremy Martin (jmar777)
   *  Contributors: Duke Speer (Duke3D)
   *  Released under the MIT license
   *  http://www.opensource.org/licenses/mit-license.php
   */(function(e){var t={init:function(t){var r={maxSize:-1,minSize:-1,spacing:5,duration:500,isVertical:!1,easing:undefined,behavior:null,autoResize:!0},i=e.extend(r,t);if(i.minSize!==-1&&i.maxSize!==-1)throw new Error("Kwicks options minSize and maxSize may not both be set");if(i.behavior&&i.behavior!=="menu")throw new Error("Unrecognized Kwicks behavior specified: "+i.behavior);return e.each(["minSize","maxSize"],function(e,t){var n=i[t];switch(typeof n){case"number":i[t+"Units"]="px";break;case"string":if(n.slice(-1)==="%")i[t+"Units"]="%",i[t]=+n.slice(0,-1)/100;else{if(n.slice(-2)!=="px")throw new Error("Invalid value for Kwicks option "+t+": "+n);i[t+"Units"]="px",i[t]=+n.slice(0,-2)}break;default:throw new Error("Invalid value for Kwicks option "+t+": "+n)}}),this.each(function(){e(this).data("kwicks",new n(this,i))})},expand:function(t){return this.each(function(){var n=e(this),r;if(n.is(".kwicks-processed")){if(typeof t!="number")throw new Error('Kwicks method "expand" requires an index');t>=0&&(r=n.children().eq(t))}else{if(!n.parent().is(".kwicks-processed"))throw new Error('Cannot call "expand" method on a non-Kwicks element');r=n,t=r.index()}var i=r&&r.length?r:n;i.trigger("expand.kwicks",{index:t})})},expanded:function(){var e=this.first().data("kwicks");if(!e)throw new Error('Cannot called "expanded" method on a non-Kwicks element');return e.expandedIndex},select:function(t){return this.each(function(){var n=e(this),r;if(n.is(".kwicks-processed")){if(typeof t!="number")throw new Error('Kwicks method "select" requires an index');t>=0&&(r=n.children().eq(t))}else{if(!n.parent().is(".kwicks-processed"))throw new Error('Cannot call "expand" method on a non-Kwicks element');r=n,t=r.index()}var i=r&&r.length?r:n;i.trigger("select.kwicks",{index:t})})},selected:function(){var e=this.first().data("kwicks");if(!e)throw new Error('Cannot called "selected" method on a non-Kwicks element');return e.selectedIndex},resize:function(t){return this.each(function(){var t=e(this),n=t.data("kwicks");if(!n)throw new Error('Cannot called "resize" method on a non-Kwicks element');n.resize()})}};e.fn.kwicks=function(e){if(t[e])return t[e].apply(this,Array.prototype.slice.call(arguments,1));if(typeof e=="object"||!e)return t.init.apply(this,arguments);throw new Error("Unrecognized kwicks method: "+e)},e.event.special.expand={_default:function(t,n){if(t.namespace!=="kwicks")return;var r=e(t.target),i=r.data("kwicks")||r.parent().data("kwicks");if(!i)return;i.expand(n.index)}},e.event.special.select={_default:function(t,n){if(t.namespace!=="kwicks")return;var r=e(t.target),i=r.data("kwicks")||r.parent().data("kwicks");if(!i)return;i.select(n.index)}};var n=function(n,r){this.opts=r;var i=r.isVertical?"vertical":"horizontal";this.$container=e(n).addClass("kwicks").addClass("kwicks-"+i),this.$panels=this.$container.children(),this.selectedIndex=this.$panels.filter(".kwicks-selected").index(),this.expandedIndex=this.selectedIndex,this.primaryDimension=r.isVertical?"height":"width",this.secondaryDimension=r.isVertical?"width":"height",this.calculatePanelSizes(),this.primaryAlignment=r.isVertical?"top":"left",this.secondaryAlignment=r.isVertical?"bottom":"right",this.$timer=e({progress:0}),this.offsets=this.getOffsetsForExpanded(),this.initStyles(),this.initBehavior(),this.initWindowResizeHandler()};n.prototype.calculatePanelSizes=function(){var e=this.opts,t=this.$panels.length,n=this.getContainerSize(!0),r=e.spacing*(t-1),i=n-r;this.panelSize=i/t,e.minSize===-1?(e.maxSize===-1?t<5?this.panelMaxSize=n/3*2:this.panelMaxSize=n/3:e.maxSizeUnits==="%"?this.panelMaxSize=i*e.maxSize:this.panelMaxSize=e.maxSize,this.panelMinSize=(i-this.panelMaxSize)/(t-1)):e.maxSize===-1&&(e.minSizeUnits==="%"?this.panelMinSize=i*e.minSize:this.panelMinSize=e.minSize,this.panelMaxSize=i-this.panelMinSize*(t-1))},n.prototype.getOffsetsForExpanded=function(){var e=this.expandedIndex,t=this.$panels.length,n=this.opts.spacing,r=this.panelSize,i=this.panelMinSize,s=this.panelMaxSize,o=[0];for(var u=1;u<t;u++)e===-1?o[u]=u*(r+n):u<=e?o[u]=u*(i+n):o[u]=s+i*(u-1)+u*n;return o},n.prototype.setStyle=function(){return e.support.style?function(e,t){e.setAttribute("style",t)}:function(e,t){e.style.cssText=t}}(),n.prototype.updatePanelStyles=function(){var e=this.offsets,t=this.$panels,n=this.primaryDimension,r=this.primaryAlignment,i=this.secondaryAlignment,s=this.opts.spacing,o=this.getContainerSize(),u=this._stylesInited?"":"position:absolute;",a,f,l,c;for(var h=t.length;h--;)l=a,a=Math.round(e[h]),h===t.length-1?(f=o-a,c=i+":0;"+n+":"+f+"px;"):(f=l-a-s,c=r+":"+a+"px;"+n+":"+f+"px;"),this.setStyle(t[h],u+c);this._stylesInited||(this.$container.addClass("kwicks-processed"),this._stylesInited=!0)},n.prototype.initStyles=function(){var e=this.opts,t=this.$container,n=this.$panels,r=n.length,i=this.primaryDimension,s=this.secondaryDimension;this.updatePanelStyles()},n.prototype.initBehavior=function(){if(!this.opts.behavior)return;var t=this.$container;switch(this.opts.behavior){case"menu":this.$container.on("mouseleave",function(){t.kwicks("expand",-1)}).children().on("mouseover",function(){e(this).kwicks("expand")}).click(function(){e(this).kwicks("select")});break;default:throw new Error("Unrecognized behavior option: "+this.opts.behavior)}},n.prototype.initWindowResizeHandler=function(){if(!this.opts.autoResize)return;var t=this,n=0,r=!1,i=function(e){e||(r=!1);var s=+(new Date);if(s-n<20){if(r)return;setTimeout(i,20-(s-n)),r=!0;return}n=s,t.resize()};e(window).on("resize",i)},n.prototype.getContainerSize=function(e){var t=this._containerSize;if(e||!t)t=this._containerSize=this.$container[this.primaryDimension]();return t},n.prototype.getExpandedPanel=function(){return this.expandedIndex===-1?e([]):this.$panels.eq(this.expandedIndex)},n.prototype.getSelectedPanel=function(){return this.selectedIndex===-1?e([]):this.$panels.eq(this.selectedIndex)},n.prototype.resize=function(e){if(this.getContainerSize()===this.getContainerSize(!0))return;this.calculatePanelSizes(),this.offsets=this.getOffsetsForExpanded(),this.isAnimated?this._dirtyOffsets=!0:this.updatePanelStyles()},n.prototype.select=function(e){if(e===this.selectedIndex)return this.expand(e);this.getSelectedPanel().removeClass("kwicks-selected"),this.selectedIndex=e,this.getSelectedPanel().addClass("kwicks-selected"),this.expand(e)},n.prototype.expand=function(e){var t=this;e===-1&&(e=this.selectedIndex);if(e===this.expandedIndex)return;this.getExpandedPanel().removeClass("kwicks-expanded"),this.expandedIndex=e,this.getExpandedPanel().addClass("kwicks-expanded");var n=this.$timer,r=this.$panels.length,i=this.offsets.slice(),s=this.offsets,o=this.getOffsetsForExpanded();n.stop()[0].progress=0,this.isAnimated=!0,n.animate({progress:1},{duration:this.opts.duration,easing:this.opts.easing,step:function(e){t._dirtyOffsets&&(s=t.offsets,o=t.getOffsetsForExpanded(),t._dirtyOffsets=!1),s.length=0;for(var n=0;n<r;n++){var u=o[n],a=u-(u-i[n])*(1-e);s[n]=a}t.updatePanelStyles()},complete:function(){t.isAnimated=!1}})}})(jQuery);