/**
 * jQuery autoHeight plugin
 * @name jquery.autoHeight.js
 * @author pawelw
 * @www www.k2.pl
 * @version 0.1
 * @date November 8, 2009
 * @category jQuery plugin
 */
(function(jQuery) {
	jQuery.fn.autoHeight = function(options) { 
		jQuery.fn.autoHeight.defaults = { 
			children: '' 
		}; 

		var defaults = jQuery.extend(defaults, options); 

		var child = ''; 
		for (i=0; i<defaults.children; i++) { 
			child += '.children()'; 
		} 
		child = child+'.'; 

		jQuery(this).each(function(){ 
			var h = 0;
			var query = "jQuery(this)"+child+"each(function(i){if (jQuery(this).height() > h) { h = jQuery(this).height(); }}); jQuery(this)"+child+"css({'height': h});" 
			eval(query); 
		}); 
		return this; 
	};
})(jQuery);