(function(){var weave=function(pointcut,advice)
{var hasPrototype=typeof(pointcut.target.prototype)!='undefined';var old=hasPrototype?pointcut.target.prototype[pointcut.method]:pointcut.target[pointcut.method];var aspect;if(advice.type=='after')
aspect=function(){var returnValue=old.apply(this,arguments);return advice.value.apply(this,[returnValue]);};else if(advice.type=='before')
aspect=function(){advice.value.apply(this,arguments);return old.apply(this,arguments);};else if(advice.type=='around'){aspect=function(){var invocation={object:this,args:arguments};return advice.value.apply(invocation.object,[{arguments:invocation.args,proceed:function(){return old.apply(invocation.object,invocation.args);}}]);};}
aspect.unweave=function(){!hasPrototype?pointcut.target[pointcut.method]=old:pointcut.target.prototype[pointcut.method]=old;pointcut=hasPrototype=aspect=old=null;};!hasPrototype?pointcut.target[pointcut.method]=aspect:pointcut.target.prototype[pointcut.method]=aspect;return aspect;};jQuery.aop={after:function(pointcut,advice)
{return weave(pointcut,{type:'after',value:advice});},before:function(pointcut,advice)
{return weave(pointcut,{type:'before',value:advice});},around:function(pointcut,advice)
{return weave(pointcut,{type:'around',value:advice});}};})();