(function(r,t,q){var j=["top","right","bottom","left","opacity","height","width"],s=["top","right","bottom","left"],n=["","-webkit-","-moz-","-o-"],v=["avoidTransforms","useTranslate3d","leaveTransforms"],h=/^([+-]=)?([\d+-.]+)(.*)$/,z=/([A-Z])/g,w={secondary:{},meta:{top:0,right:0,bottom:0,left:0}},m="jQe",c="cubic-bezier(",y=")",g=false,b=null;var k=document.body||document.documentElement,e=k.style,a=(e.WebkitTransition!==undefined)?"webkitTransitionEnd":(e.OTransition!==undefined)?"oTransitionEnd":"transitionend",x=e.WebkitTransition!==undefined||e.MozTransition!==undefined||e.OTransition!==undefined||e.transition!==undefined,f=g=("WebKitCSSMatrix" in window&&"m11" in new WebKitCSSMatrix());if(r.expr&&r.expr.filters){b=r.expr.filters.animated;r.expr.filters.animated=function(C){return r(C).data("events")&&r(C).data("events")[a]?true:b.call(this,C)}}function i(M,G,D,H){var J=h.exec(G),E=M.css(D)==="auto"?0:M.css(D),N=typeof E=="string"?A(E):E,F=typeof G=="string"?A(G):G,L=H===true?0:N,K=M.is(":hidden"),C=M.translation();if(D=="left"){L=parseInt(N,10)+C.x}if(D=="right"){L=parseInt(N,10)+C.x}if(D=="top"){L=parseInt(N,10)+C.y}if(D=="bottom"){L=parseInt(N,10)+C.y}if(!J&&G=="show"){L=1;if(K){M.css({display:"block",opacity:0})}}else{if(!J&&G=="hide"){L=0}}if(J){var I=parseFloat(J[2]);if(J[1]){I=((J[1]==="-="?-1:1)*I)+parseInt(L,10)}return I}else{return L}}function u(C,E,D){return((D===true||(g==true&&D!=false))&&f)?"translate3d("+C+"px,"+E+"px,0)":"translate("+C+"px,"+E+"px)"}function l(J,O,H,K,N,D,G,C){var I=J.data(m)?!d(J.data(m))?J.data(m):r.extend(true,{},w):r.extend(true,{},w),F=N,M=r.inArray(O,s)>-1;if(M){var P=I.meta,E=A(J.css(O))||0,L=O+"_o";F=N-E;P[O]=F;P[L]=J.css(O)=="auto"?0+F:E+F||0;I.meta=P;if(G&&F===0){F=0-P[L];P[O]=F;P[L]=0}}return J.data(m,B(I,O,H,K,F,D,G,C))}function B(K,J,F,H,I,D,E,C){K=typeof K==="undefined"?{}:K;K.secondary=typeof K.secondary==="undefined"?{}:K.secondary;for(var G=n.length-1;G>=0;G--){if(typeof K[n[G]+"transition-property"]==="undefined"){K[n[G]+"transition-property"]=""}K[n[G]+"transition-property"]+=", "+((D===true&&E===true)?n[G]+"transform":J);K[n[G]+"transition-duration"]=F+"ms";K[n[G]+"transition-timing-function"]=H;K.secondary[((D===true&&E===true)?n[G]+"transform":J)]=(D===true&&E===true)?u(K.meta.left,K.meta.top,C):I}return K}function o(D){for(var C in D){if((C=="width"||C=="height")&&(D[C]=="show"||D[C]=="hide"||D[C]=="toggle")){return true}}return false}function d(D){for(var C in D){return false}return true}function A(C){return parseFloat(C.replace(/px/i,""))}function p(F,E,C){var D=r.inArray(F,j)>-1;if((F=="width"||F=="height")&&(E===parseFloat(C.css(F)))){D=false}return D}r.extend({toggle3DByDefault:function(){g=!g}});r.fn.translation=function(){if(!this[0]){return null}var G=this[0],D=window.getComputedStyle(G,null),H={x:0,y:0};for(var F=n.length-1;F>=0;F--){var E=D.getPropertyValue(n[F]+"transform");if(E&&(/matrix/i).test(E)){var C=E.replace(/^matrix\(/i,"").split(/, |\)$/g);H={x:parseInt(C[4],10),y:parseInt(C[5],10)};break}}return H};r.fn.animate=function(D,E,I,K){D=D||{};var F=!(typeof D.bottom!=="undefined"||typeof D.right!=="undefined"),J=r.speed(E,I,K),C=this,H=0,G=function(){H--;if(H===0){if(typeof J.complete==="function"){J.complete.apply(C[0],arguments)}}};if(!x||d(D)||o(D)||J.duration<=0||(r.fn.animate.defaults.avoidTransforms===true&&D.avoidTransforms!==false)){return t.apply(this,arguments)}return this[J.queue===true?"queue":"each"](function(){var V=r(this),M=r.extend({},J),R=function(){var ac={};for(var Z=n.length-1;Z>=0;Z--){ac[n[Z]+"transition-property"]="none";ac[n[Z]+"transition-duration"]="";ac[n[Z]+"transition-timing-function"]=""}V.unbind(a);if(!D.leaveTransforms===true){var ab=V.data(m)||{},aa={};for(Z=n.length-1;Z>=0;Z--){aa[n[Z]+"transform"]=""}if(F&&typeof ab.meta!=="undefined"){for(var Y=0,X;X=s[Y];++Y){aa[X]=ab.meta[X+"_o"]+"px"}}V.css(ac).css(aa)}if(D.opacity==="hide"){V.css("display","none")}V.data(m,null);G.call(V)},N={bounce:c+"0.0, 0.35, .5, 1.3"+y,linear:"linear",swing:"ease-in-out",easeInQuad:c+"0.550, 0.085, 0.680, 0.530"+y,easeInCubic:c+"0.550, 0.055, 0.675, 0.190"+y,easeInQuart:c+"0.895, 0.030, 0.685, 0.220"+y,easeInQuint:c+"0.755, 0.050, 0.855, 0.060"+y,easeInSine:c+"0.470, 0.000, 0.745, 0.715"+y,easeInExpo:c+"0.950, 0.050, 0.795, 0.035"+y,easeInCirc:c+"0.600, 0.040, 0.980, 0.335"+y,easeOutQuad:c+"0.250, 0.460, 0.450, 0.940"+y,easeOutCubic:c+"0.215, 0.610, 0.355, 1.000"+y,easeOutQuart:c+"0.165, 0.840, 0.440, 1.000"+y,easeOutQuint:c+"0.230, 1.000, 0.320, 1.000"+y,easeOutSine:c+"0.390, 0.575, 0.565, 1.000"+y,easeOutExpo:c+"0.190, 1.000, 0.220, 1.000"+y,easeOutCirc:c+"0.075, 0.820, 0.165, 1.000"+y,easeInOutQuad:c+"0.455, 0.030, 0.515, 0.955"+y,easeInOutCubic:c+"0.645, 0.045, 0.355, 1.000"+y,easeInOutQuart:c+"0.770, 0.000, 0.175, 1.000"+y,easeInOutQuint:c+"0.860, 0.000, 0.070, 1.000"+y,easeInOutSine:c+"0.445, 0.050, 0.550, 0.950"+y,easeInOutExpo:c+"1.000, 0.000, 0.000, 1.000"+y,easeInOutCirc:c+"0.785, 0.135, 0.150, 0.860"+y},Q={},O=N[M.easing||"swing"]?N[M.easing||"swing"]:M.easing||"swing";for(var L in D){if(r.inArray(L,v)===-1){var S=r.inArray(L,s)>-1,U=i(V,D[L],L,(S&&D.avoidTransforms!==true));if(D.avoidTransforms!==true&&p(L,U,V)){l(V,L,M.duration,O,S&&D.avoidTransforms===true?U+"px":U,S&&D.avoidTransforms!==true,F,D.useTranslate3d===true)}else{Q[L]=D[L]}}}var W=V.data(m)||{};for(var P=n.length-1;P>=0;P--){if(typeof W[n[P]+"transition-property"]!=="undefined"){W[n[P]+"transition-property"]=W[n[P]+"transition-property"].substr(2)}}V.data(m,W).unbind(a);if(!d(V.data(m))&&!d(V.data(m).secondary)){H++;V.css(V.data(m));var T=V.data(m).secondary;setTimeout(function(){V.bind(a,R).css(T)})}else{M.queue=false}if(!d(Q)){H++;t.apply(V,[Q,{duration:M.duration,easing:r.easing[M.easing]?M.easing:(r.easing.swing?"swing":"linear"),complete:G,queue:M.queue}])}return true})};r.fn.animate.defaults={};r.fn.stop=function(F,D,E){if(!x){return q.apply(this,[F,D])}if(F){this.queue([])}var G={};for(var C=n.length-1;C>=0;C--){G[n[C]+"transition-property"]="none";G[n[C]+"transition-duration"]="";G[n[C]+"transition-timing-function"]=""}this.each(function(){var J=r(this),I=window.getComputedStyle(this,null),L={},K;if(!d(J.data(m))&&!d(J.data(m).secondary)){var M=J.data(m);if(D){L=M.secondary;if(!E&&typeof M.meta.left_o!==undefined||typeof M.meta.top_o!==undefined){L.left=typeof M.meta.left_o!==undefined?M.meta.left_o:"auto";L.top=typeof M.meta.top_o!==undefined?M.meta.top_o:"auto";for(K=n.length-1;K>=0;K--){L[n[K]+"transform"]=""}}}else{for(var N in J.data(m).secondary){N=N.replace(z,"-$1").toLowerCase();L[N]=I.getPropertyValue(N);if(!E&&(/matrix/i).test(L[N])){var H=L[N].replace(/^matrix\(/i,"").split(/, |\)$/g);L.left=(parseFloat(H[4])+parseFloat(J.css("left"))+"px")||"auto";L.top=(parseFloat(H[5])+parseFloat(J.css("top"))+"px")||"auto";for(K=n.length-1;K>=0;K--){L[n[K]+"transform"]=""}}}}J.unbind(a).css(G).css(L).data(m,null)}else{q.apply(J,[F,D])}});return this}})(jQuery,jQuery.fn.animate,jQuery.fn.stop);
