(function($) {
	$.fn.resizable = function(options) {
		var defaults = {
			'maxHeight'		:	500,
			'plusHeight'	:	13
		};
		$.extend(defaults, options || {});
		var self = this;
		var minHeight = this.height();
		self.next('.ej-editor-resize-bar').drag("start",function(ev, dd) {
			dd.height = self.height();
		})
		.drag(function(ev, dd) {
			var h = Math.max(1, dd.height + dd.deltaY);
			if(h >= minHeight && h <= defaults.maxHeight) {
				//	원래의 textarea도 크기 변경
				var	edtmp	=	self.attr('id').split("_ejt");
				var	tarea	=	document.getElementsByName(edtmp[1])[0];
				tarea.style.height	=	h + defaults.plusHeight + 'px';

				//	관리자에서 화면 리사이즈
				$("#ej-adm-contents-wrap").css({"height":($(document).height()-85)});
				$("#ej-adm-navigation").css({"height":($(document).height()-85)});
				if($("#adm-navigation").css("display") == "block") {
					$("#ej-adm-contents").css({"width":($(window).width()-75)});
				} else {
					$("#ej-adm-contents").css({"width":($(window).width()-20)});
				}

				self.css('height', h);
			}
		});
		return this;
	};
})(jQuery);
