(function(d,c){d.effects.clip=function(a){return this.queue(function(){var q=d(this),m=["position","top","bottom","left","right","height","width"];var n=d.effects.setMode(q,a.options.mode||"hide");var b=a.options.direction||"vertical";d.effects.save(q,m);q.show();var t=d.effects.createWrapper(q).css({overflow:"hidden"});var r=q[0].tagName=="IMG"?t:q;var p={size:(b=="vertical")?"height":"width",position:(b=="vertical")?"top":"left"};var s=(b=="vertical")?r.height():r.width();if(n=="show"){r.css(p.size,0);r.css(p.position,s/2)}var o={};o[p.size]=n=="show"?s:0;o[p.position]=n=="show"?0:s/2;r.animate(o,{queue:false,duration:a.duration,easing:a.options.easing,complete:function(){if(n=="hide"){q.hide()}d.effects.restore(q,m);d.effects.removeWrapper(q);if(a.callback){a.callback.apply(q[0],arguments)}q.dequeue()}})})}})(jQuery);