$.fn.replaceWith = function(value){
    var ret = this.__replaceWith.apply(this, arguments);
    value.trigger("as::replaceWith", Array.prototype.slice.call(arguments));
    return ret;
};