/*
 Color animation jQuery-plugin
 http://www.bitstorm.org/jquery/color-animation/
 Copyright 2011 Edwin Martin <edwin@bitstorm.org>
 Released under the MIT and GPL licenses.
*/
(function(d){function i(){var b=d("script:first"),a=b.css("color"),c=false;if(/^rgba/.test(a))c=true;else try{c=a!=b.css("color","rgba(0, 0, 0, 0.5)").css("color");b.css("color",a)}catch(e){}return c}function g(b,a,c){var e="rgb"+(d.support.rgba?"a":"")+"("+parseInt(b[0]+c*(a[0]-b[0]),10)+","+parseInt(b[1]+c*(a[1]-b[1]),10)+","+parseInt(b[2]+c*(a[2]-b[2]),10);if(d.support.rgba)e+=","+(b&&a?parseFloat(b[3]+c*(a[3]-b[3])):1);e+=")";return e}function f(b){var a,c;if(a=/#([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})/.exec(b))c=
[parseInt(a[1],16),parseInt(a[2],16),parseInt(a[3],16),1];else if(a=/#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])/.exec(b))c=[parseInt(a[1],16)*17,parseInt(a[2],16)*17,parseInt(a[3],16)*17,1];else if(a=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(b))c=[parseInt(a[1]),parseInt(a[2]),parseInt(a[3]),1];else if(a=/rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9\.]*)\s*\)/.exec(b))c=[parseInt(a[1],10),parseInt(a[2],10),parseInt(a[3],10),parseFloat(a[4])];return c}
d.extend(true,d,{support:{rgba:i()}});var h=["color","backgroundColor","borderBottomColor","borderLeftColor","borderRightColor","borderTopColor","outlineColor"];d.each(h,function(b,a){d.fx.step[a]=function(c){if(!c.init){c.a=f(d(c.elem).css(a));c.end=f(c.end);c.init=true}c.elem.style[a]=g(c.a,c.end,c.pos)}});d.fx.step.borderColor=function(b){if(!b.init)b.end=f(b.end);var a=h.slice(2,6);d.each(a,function(c,e){b.init||(b[e]={a:f(d(b.elem).css(e))});b.elem.style[e]=g(b[e].a,b.end,b.pos)});b.init=true}})(jQuery);

/*************************************************
jquery.animate-enhanced plugin v0.80
Author: www.benbarnett.net || @benpbarnett

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

/*
 * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
 *
 * Uses the built in easing capabilities added In jQuery 1.1
 * to offer multiple easing options
 *
 * TERMS OF USE - jQuery Easing
 * 
 * Open source under the BSD License. 
 * 
 * Copyright Â© 2008 George McGinley Smith
 * All rights reserved.
 * 
 * Redistribution and use in source and binary forms, with or without modification, 
 * are permitted provided that the following conditions are met:
 * 
 * Redistributions of source code must retain the above copyright notice, this list of 
 * conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright notice, this list 
 * of conditions and the following disclaimer in the documentation and/or other materials 
 * provided with the distribution.
 * 
 * Neither the name of the author nor the names of contributors may be used to endorse 
 * or promote products derived from this software without specific prior written permission.
 * 
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
 *  COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
 *  GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 
 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
 *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 
 * OF THE POSSIBILITY OF SUCH DAMAGE. 
 *
*/
jQuery.easing['jswing']=jQuery.easing['swing'];jQuery.extend(jQuery.easing,{def:'easeOutQuad',swing:function(x,t,b,c,d){return jQuery.easing[jQuery.easing.def](x,t,b,c,d);},easeInQuad:function(x,t,b,c,d){return c*(t/=d)*t+b;},easeOutQuad:function(x,t,b,c,d){return-c*(t/=d)*(t-2)+b;},easeInOutQuad:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t+b;return-c/2*((--t)*(t-2)-1)+b;},easeInCubic:function(x,t,b,c,d){return c*(t/=d)*t*t+b;},easeOutCubic:function(x,t,b,c,d){return c*((t=t/d-1)*t*t+1)+b;},easeInOutCubic:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t+b;return c/2*((t-=2)*t*t+2)+b;},easeInQuart:function(x,t,b,c,d){return c*(t/=d)*t*t*t+b;},easeOutQuart:function(x,t,b,c,d){return-c*((t=t/d-1)*t*t*t-1)+b;},easeInOutQuart:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t*t+b;return-c/2*((t-=2)*t*t*t-2)+b;},easeInQuint:function(x,t,b,c,d){return c*(t/=d)*t*t*t*t+b;},easeOutQuint:function(x,t,b,c,d){return c*((t=t/d-1)*t*t*t*t+1)+b;},easeInOutQuint:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t*t*t+b;return c/2*((t-=2)*t*t*t*t+2)+b;},easeInSine:function(x,t,b,c,d){return-c*Math.cos(t/d*(Math.PI/2))+c+b;},easeOutSine:function(x,t,b,c,d){return c*Math.sin(t/d*(Math.PI/2))+b;},easeInOutSine:function(x,t,b,c,d){return-c/2*(Math.cos(Math.PI*t/d)-1)+b;},easeInExpo:function(x,t,b,c,d){return(t==0)?b:c*Math.pow(2,10*(t/d-1))+b;},easeOutExpo:function(x,t,b,c,d){return(t==d)?b+c:c*(-Math.pow(2,-10*t/d)+1)+b;},easeInOutExpo:function(x,t,b,c,d){if(t==0)return b;if(t==d)return b+c;if((t/=d/2)<1)return c/2*Math.pow(2,10*(t-1))+b;return c/2*(-Math.pow(2,-10*--t)+2)+b;},easeInCirc:function(x,t,b,c,d){return-c*(Math.sqrt(1-(t/=d)*t)-1)+b;},easeOutCirc:function(x,t,b,c,d){return c*Math.sqrt(1-(t=t/d-1)*t)+b;},easeInOutCirc:function(x,t,b,c,d){if((t/=d/2)<1)return-c/2*(Math.sqrt(1-t*t)-1)+b;return c/2*(Math.sqrt(1-(t-=2)*t)+1)+b;},easeInElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d)==1)return b+c;if(!p)p=d*.3;if(a<Math.abs(c)){a=c;var s=p/4;}
else var s=p/(2*Math.PI)*Math.asin(c/a);return-(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b;},easeOutElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d)==1)return b+c;if(!p)p=d*.3;if(a<Math.abs(c)){a=c;var s=p/4;}
else var s=p/(2*Math.PI)*Math.asin(c/a);return a*Math.pow(2,-10*t)*Math.sin((t*d-s)*(2*Math.PI)/p)+c+b;},easeInOutElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d/2)==2)return b+c;if(!p)p=d*(.3*1.5);if(a<Math.abs(c)){a=c;var s=p/4;}
else var s=p/(2*Math.PI)*Math.asin(c/a);if(t<1)return-.5*(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b;return a*Math.pow(2,-10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p)*.5+c+b;},easeInBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;return c*(t/=d)*t*((s+1)*t-s)+b;},easeOutBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;return c*((t=t/d-1)*t*((s+1)*t+s)+1)+b;},easeInOutBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;if((t/=d/2)<1)return c/2*(t*t*(((s*=(1.525))+1)*t-s))+b;return c/2*((t-=2)*t*(((s*=(1.525))+1)*t+s)+2)+b;},easeInBounce:function(x,t,b,c,d){return c-jQuery.easing.easeOutBounce(x,d-t,0,c,d)+b;},easeOutBounce:function(x,t,b,c,d){if((t/=d)<(1/2.75)){return c*(7.5625*t*t)+b;}else if(t<(2/2.75)){return c*(7.5625*(t-=(1.5/2.75))*t+.75)+b;}else if(t<(2.5/2.75)){return c*(7.5625*(t-=(2.25/2.75))*t+.9375)+b;}else{return c*(7.5625*(t-=(2.625/2.75))*t+.984375)+b;}},easeInOutBounce:function(x,t,b,c,d){if(t<d/2)return jQuery.easing.easeInBounce(x,t*2,0,c,d)*.5+b;return jQuery.easing.easeOutBounce(x,t*2-d,0,c,d)*.5+c*.5+b;}});
