(function($) {
	$.extend($.fn, {
		removeSelf : function() {
			for(var i=0; i<this.length; i++) {
				if(this[i] && this[i].parentNode)
					this[i].parentNode.removeChild(this[i]);
			}
		},
		outerHTML : function(s) {
			return (s) 
				? this.before(s).remove() 
				: $('<p>').append(this.eq(0).clone()).html();
		}
	});
})(jQuery);
