(function(d,c){d.effects.shake=function(a){return this.queue(function(){var z=d(this),t=["position","top","bottom","left","right"];var u=d.effects.setMode(z,a.options.mode||"effect");var r=a.options.direction||"left";var B=a.options.distance||20;var A=a.options.times||3;var x=a.duration||a.options.duration||140;d.effects.save(z,t);z.show();d.effects.createWrapper(z);var y=(r=="up"||r=="down")?"top":"left";var b=(r=="up"||r=="left")?"pos":"neg";var w={},i={},s={};w[y]=(b=="pos"?"-=":"+=")+B;i[y]=(b=="pos"?"+=":"-=")+B*2;s[y]=(b=="pos"?"-=":"+=")+B*2;z.animate(w,x,a.options.easing);for(var v=1;v<A;v++){z.animate(i,x,a.options.easing).animate(s,x,a.options.easing)}z.animate(i,x,a.options.easing).animate(w,x/2,a.options.easing,function(){d.effects.restore(z,t);d.effects.removeWrapper(z);if(a.callback){a.callback.apply(this,arguments)}});z.queue("fx",function(){z.dequeue()});z.dequeue()})}})(jQuery);