/*!
 * OuterHTML v1.0.0 (Release version)
 *
 * http://www.darlesson.com/
 *
 * Copyright 2010, Darlesson Oliveira
 * Dual licensed under the MIT and GPL licenses:
 * http://www.opensource.org/licenses/mit-license.php
 * http://www.gnu.org/licenses/gpl.html
 *
 * @requires jQuery v1.4.0 or above
 *
 * Reporting bugs, comments or suggestions: http://darlesson.com/contact/
 * Documentation and other jQuery plug-ins: http://darlesson.com/jquery/
 * Donations are welcome: http://darlesson.com/donate/
 */
 
// Examples and documentation at: http://darlesson.com/jquery/outerhtml/

// jQuery outerHTML
(function($){jQuery.fn.extend({outerHTML:function(value){if(typeof value==="string"){var $this=jQuery(this),$parent=$this.parent();var replaceElements=function(){var $img=$this.find("img");if($img.length>0){$img.remove();}
var element;jQuery(value).map(function(){element=jQuery(this);$this.replaceWith(element);})
return element;}
return replaceElements();}else{return jQuery("<div />").append(jQuery(this).clone()).html();}}});})(jQuery);
