/**
 * HideElement <http://passingcuriosity.com/code/jquery.hideElement/>
 * A jQuery plugin to dynamically hide an element.
 * 
 * Copyright Thomas Sutton and Bouncing Orange.
 *
 * $Id: jquery.hideElement.js 16 2008-04-11 06:02:58Z niekvansanten $
 **/ 


;(function($){
	$.fn.hideElement = function(opts){
		var opts = $.extend({}, $.fn.hideElement.defaults, opts);
		
		return this.each(function(){
			var o = $.meta ? $.extend({}, opts, $this.data()) : opts;
			var h = '<'+o.wrapElement+ ( o.wrapClass ? ' class="'+o.wrapClass+'"': '') +'>' + '</'+o.wrapElement+'>';
			$(this).wrap(h);
			$(this).parent().hide();
		});
	};
	
	$.fn.hideElement.defaults = {
		wrapElement: 'div'
	};
	
})(jQuery);