(function(a){a.effects.bounce=function(b){return this.queue(function(){var c=a(this),m=["position","top","left"],g=a.effects.setMode(c,b.options.mode||"effect"),l=b.options.direction||"up",d=b.options.distance||20,n=b.options.times||5,h=b.duration||250;/show|hide/.test(g)&&m.push("opacity");a.effects.save(c,m);c.show();a.effects.createWrapper(c);var e=l=="up"||l=="down"?"top":"left",f=l=="up"||l=="left"?"pos":"neg",d=b.options.distance||(e=="top"?c.outerHeight({margin:true})/3:c.outerWidth({margin:true})/3);g=="show"&&c.css("opacity",0).css(e,f=="pos"?-d:d);if(g=="hide")d=d/(n*2);if(g!="hide")n--;if(g=="show"){var k={opacity:1};k[e]=(f=="pos"?"+=":"-=")+d;c.animate(k,h/2,b.options.easing);d=d/2;n--}for(var o=0;o<n;o++){var i={},j={};i[e]=(f=="pos"?"-=":"+=")+d;j[e]=(f=="pos"?"+=":"-=")+d;c.animate(i,h/2,b.options.easing).animate(j,h/2,b.options.easing);d=g=="hide"?d*2:d/2}if(g=="hide"){var k={opacity:0};k[e]=(f=="pos"?"-=":"+=")+d;c.animate(k,h/2,b.options.easing,function(){c.hide();a.effects.restore(c,m);a.effects.removeWrapper(c);b.callback&&b.callback.apply(this,arguments)})}else{var i={},j={};i[e]=(f=="pos"?"-=":"+=")+d;j[e]=(f=="pos"?"+=":"-=")+d;c.animate(i,h/2,b.options.easing).animate(j,h/2,b.options.easing,function(){a.effects.restore(c,m);a.effects.removeWrapper(c);b.callback&&b.callback.apply(this,arguments)})}c.queue("fx",function(){c.dequeue()});c.dequeue()})}})(jQuery)