/**
 * domChange, jQuery Plugin
 *
 * @version 1.0.04.240707
 * @author Markus Engel <markus.engel@foxxworxx.com>
 * @copyright Copyright (c) 2007 Markus Engel
 *
 * Dual licensed under the MIT and GPL licenses:
 * 	http://www.opensource.org/licenses/mit-license.php
 * 	http://www.gnu.org/licenses/gpl.html
 */
 
jQuery.fn.domChange =
function(el, opt)
{
	return this.each
	(
		function()
		{
			var nEl = document.createElement(el);
			
			if(opt)
			{
				for(var i in opt)
				{
					jQuery(nEl).attr(i, opt[i]);
				}
			}
			
			$(this)[0].parentNode.replaceChild(nEl, $(this)[0]);
		}
	);
} // jQuery.fn.domChange
