(function(d,g){function e(b,c,a,e,f){"function"!=typeof c||f||(f=c,c=g);a={opacity:a};e&&(a.scale=e,b.css(d.fx.cssPrefix+"transform-origin","0 0"));return b.animate(a,c,null,f)}var h=d.fn.show,k=d.fn.hide,l=d.fn.toggle;d.fn.toggle=function(b,c){return b===g||"boolean"==typeof b?l.call(this,b):this.each(function(){var a=d(this);a["none"==a.css("display")?"show":"hide"](b,c)})};d.fn.fadeTo=function(b,c,a){return e(this,b,c,null,a)};d.fn.fadeIn=function(b,c){var a=this.css("opacity");0<a?this.css("opacity",
0):a=1;return h.call(this).fadeTo(b,a,c)};d.fn.fadeOut=function(b,c){return e(this,b,0,null,function(){k.call(d(this));c&&c.call(this)})};d.fn.fadeToggle=function(b,c){return this.each(function(){var a=d(this);a[0==a.css("opacity")||"none"==a.css("display")?"fadeIn":"fadeOut"](b,c)})}})(Zepto);
