
var MENU = function() {

	//Áøµµ2 ·¦ÇÎ ½ÃÀÛ=========================================================================
	/* version : 0.3.2 */

	/**
	 * Core object
	 *
	 */
	if (typeof window.nhn == 'undefined') {
		window.nhn = new Object;
	}

	/**
	 * ÁöÁ¤µÈ id ¸¦ °¡Áö´Â °´Ã¼¸¦ ¹ÝÈ¯ÇÑ´Ù.
	 * argument¸¦ º¹¼ö°³·Î ÁöÁ¤ÇÏ¸é ¹è¿­·Î °´Ã¼¸¦ ¹ÝÈ¯ÇÏ¸ç,
	 * ¾ÆÀÌµð¿¡ ÇØ´çÇÏ´Â °´Ã¼°¡ Á¸ÀçÇÏÁö ¾ÊÀ¸¸é null À» ¹ÝÈ¯ÇÑ´Ù.
	 * ¶ÇÇÑ "<tagName>" °ú °°Àº Çü½ÄÀÇ ¹®ÀÚ¿­À» ÀÔ·ÂÇÏ¸é tagNameÀ» °¡Áö´Â °´Ã¼¸¦ »ý¼ºÇÑ´Ù.
	 * @id core.$
	 * @param {String} °´Ã¼ÀÇ ¾ÆÀÌµð(º¹¼ö°³ °¡´É)
	 * @return element
	 */
	function $(sID/*, id1, id2*/) {
		var ret = new Array;
		var el  = null;
		var reg = /<([a-z]+|h[1-5])>/i;

		for(var i=0; i < arguments.length; i++) {
			el = arguments[i];
			if (typeof el == "string") {
				if (reg.test(el)) {
					el = document.createElement(RegExp.$1);
				} else {
					el = document.getElementById(el);
				}
			}
			if (el) ret[ret.length] = el;
		}
		return ret.length?((arguments.length>1)?ret:ret[0]):null;
	}

	/**
	 * Å¬·¡½º Å¸ÀÔÀ» Á¤ÀÇÇÑ´Ù. »ý¼ºÀÚ´Â $init À¸·Î Á¤ÀÇÇÑ´Ù.
	 * @id core.$Class
	 * @param {object} Å¬·¡½º Á¤ÀÇ object
	 * @return {class} Å¬·¡½º Å¸ÀÔ
	 */
	 function $Class(oDef) {
		var typeClass = function() {
			if (typeof this.$super != "undefined") {
				this.$super.$this = this;
				if (typeof this.$super.$init != "undefined") this.$super.$init.apply(this.$super,arguments);
			}
			if (typeof this.$init != "undefined") this.$init.apply(this,arguments);
		};

		typeClass.prototype = oDef;
		typeClass.extend = $Class.extend;

		return typeClass;
	 }

	 /**
	 * Å¬·¡½º¸¦ »ó¼ÓÇÑ´Ù.
	 * »ó¼ÓµÈ Å¬·¡½º¿¡¼­ this.$super.method ·Î »óÀ§ ¸Þ¼Òµå¿¡ Á¢±ÙÇÒ ¼öµµ ÀÖÀ¸³ª,
	 * this.$super.$super.method ¿Í °°ÀÌ ÇÑ ´Ü°è ÀÌ»óÀÇ ºÎ¸ð Å¬·¡½º¿¡´Â Á¢±ÙÇÒ ¼ö ¾ø´Ù.
	 * @id core.$Class.extend
	 * @import core.$Class
	 * @param {class} ¼öÆÛ Å¬·¡½º °´Ã¼
	 * @return {class} È®ÀåµÈ Å¬·¡½º Å¸ÀÔ
	 */
	 $Class.extend = function(superClass) {
		this.prototype.$super = new Object;

		var superFunc = function(m, func) {
			return function() {
				var r;
				var f = this.$this[m];
				var t = this.$this;
				t[m] = func;
				r = t[m].apply(t, arguments);
				t[m] = f;

				return r;
			}
		};

		for(var x in superClass.prototype) {
			if (typeof this.prototype[x] == 'undefined') this.prototype[x] = superClass.prototype[x];
			if (typeof this.prototype[x] != 'function') continue;
			this.prototype.$super[x] = superFunc(x, superClass.prototype[x]);
		}

		return this;
	}

	/**
	 * ÁÖ¾îÁø ¿ø¼Ò¸¦ °¡Áø ¹è¿­ °´Ã¼¸¦ ¸¸µç´Ù.
	 * @id core.$A
	 * @import core.$A.toArray
	 * @param {array} ¹è¿­ È¤Àº ¹è¿­¿¡ ÁØÇÏ´Â ÄÃ·º¼Ç Å¸ÀÔ
	 * @return {$A}
	 */
	function $A(array) {
		if (typeof array == "undefined") array = new Array;
		if (array instanceof $A) return array;
		if (window === this) return new $A(array);

		if (array instanceof Array && !(array.callee && window.opera)) {
			this._array = array;
		} else {
			this._array = new Array;
			for(var i=0; i < array.length; i++) {
				this._array[this._array.length] = array[i];
			}
		}
	}

	/**
	 * ¹è¿­ÀÇ Å©±â¸¦ ¹ÝÈ¯ÇÑ´Ù
	 * @id core.$A.length
	 * @return Number ¹è¿­ÀÇ Å©±â
	 * @
	 */
	$A.prototype.length = function(len, elem) {
		if (typeof len == "number") {
			var l = this._array.length;
			this._array.length = len;
			
			if (typeof elem != "undefined") {
				for(var i=l; i < len; i++) {
					this._array[i] = elem;
				}
			}
		} else {
			return this._array.length;
		}
	}

	/**
	 * ÁÖ¾îÁø ¿ø¼Ò°¡ Á¸ÀçÇÏ´ÂÁö °Ë»çÇÑ´Ù. Á¸ÀçÇÏ¸é true¸¦, ±×·¸Áö ¾ÊÀ¸¸é false¸¦ ¹ÝÈ¯ÇÑ´Ù
	 * @id core.$A.has
	 * @param {void} °Ë»öÇÒ °ª
	 * @return Boolean
	 * @import core.$A.indexOf
	 */
	$A.prototype.has = function(any) {
		return (this.indexOf(any) > -1);
	}

	/**
	 * ÁÖ¾îÁø ¿ø¼Ò°¡ ¹è¿­¿¡ ¸î ¹øÂ° ¿ä¼Ò·Î¼­ Á¸ÀçÇÏ´ÂÁö ¹ÝÈ¯ÇÑ´Ù.
	 * ¹è¿­ÀÇ ÀÎµ¦½º´Â 0ºÎÅÍ ½ÃÀÛÇÑ´Ù. ÇØ´ç ¿ø¼Ò°¡ Á¸ÀçÇÏÁö ¾ÊÀ¸¸é -1 À» ¹ÝÈ¯ÇÑ´Ù.
	 * @id core.$A.indexOf
	 * @param {void} °Ë»öÇÒ °ª
	 * @return {Number} °Ë»ö°á°ú ÀÎµ¦½º ¹øÈ£
	 */
	$A.prototype.indexOf = function(any) {
		if (typeof this._array.indexOf != 'undefined') return this._array.indexOf(any);

		for(var i=0; i < this._array.length; i++) {
			if (this._array[i] == any) return i;
		}
		return -1;
	}

	/**
	 * JavaScript ¹è¿­ °´Ã¼¸¦ ¹ÝÈ¯ÇÑ´Ù
	 * @id core.$A.$value
	 * @return {Array} JavaScript ¹è¿­ °´Ã¼
	 */
	$A.prototype.$value = function() {
		return this._array;
	}

	/**
	 * ¹è¿­ °´Ã¼¿¡ ¿¤¸®¸ÕÆ®¸¦ Ãß°¡ÇÑ´Ù.
	 * @id core.$A.push
	 * @param {void} Ãß°¡ÇÒ ¿¤¸®¸ÕÆ®(º¹¼ö°³ °¡´É)
	 * @return {Number} ¿¤¸®¸ÕÆ®¸¦ Ãß°¡ÇÑ ÈÄÀÇ ¹è¿­ °´Ã¼ Å©±â
	 */
	$A.prototype.push = function(element1/*, ...*/) {
		return this._array.push.apply(this._array, $A(arguments).$value());
	}

	/**
	 * ¹è¿­ÀÇ ¸¶Áö¸· ¿¤¸®¸ÕÆ®¸¦ Á¦°ÅÇÏ°í Á¦°ÅµÈ ¿¤¸®¸ÕÆ®¸¦ ¹ÝÈ¯ÇÑ´Ù.
	 * @id core.$A.pop
	 * @return {void} Á¦°ÅµÈ ¿¤¸®¸ÕÆ®
	 */
	$A.prototype.pop = function() {
		return this._array.pop();
	}

	/**
	 * ¹è¿­ÀÇ Ã¹ ¿¤¸®¸ÕÆ®¸¦ Á¦°ÅÇÏ°í Á¦°ÅµÈ ¿¤¸®¸ÕÆ®¸¦ ¹ÝÈ¯ÇÑ´Ù.
	 * @id core.$A.shift
	 * @return {void} Á¦°ÅµÈ ¿¤¸®¸ÕÆ®
	 */
	$A.prototype.shift = function() {
		return this._array.shift();
	}

	/**
	 * ÁÖ¾îÁø ÇÑ °³ ÀÌ»óÀÇ ¿¤¸®¸ÕÆ®¸¦ ¹è¿­ ¾ÕºÎºÐ¿¡ »ðÀÔÇÏ°í, ÇØ´ç ¹è¿­ÀÇ ¹Ù²ï Å©±â¸¦ ¹ÝÈ¯ÇÑ´Ù.
	 * @id core.$A.unshift
	 * @param {void} Ãß°¡ÇÒ ¿¤¸®¸ÕÆ®(º¹¼ö°³ °¡´É)
	 * @return {Nmber} ¿¤¸®¸ÕÆ®¸¦ Ãß°¡ÇÑ ÈÄÀÇ ¹è¿­ °´Ã¼ Å©±â
	 */
	$A.prototype.unshift = function(element1/*, ...*/) {
		return this._array.unshift.apply(this._array, $A(arguments).$value());
	}

	/**
	 * ÁÖ¾îÁø ÄÝ¹éÇÔ¼ö¸¦ ¹è¿­ÀÇ °¢ ¿ä¼Ò¿¡ ½ÇÇàÇÑ´Ù.
	 * @id core.$A.forEach
	 * @import core.$A[Break, Continue]
	 */
	$A.prototype.forEach = function(callback, thisObject) {
		if (typeof this._array.forEach == 'function') return this._array.forEach.apply(this._array, arguments);

		for(var i=0; i < this._array.length; i++) {
			try {
				callback.call(thisObject, this._array[i], i, this._array);
			} catch(e) {
				if (e instanceof $A.Break) break;
				if (e instanceof $A.Continue) continue;
			}
		}

		return this;
	}

	/**
	 * $Element °´Ã¼¸¦ ¹ÝÈ¯ÇÑ´Ù.
	 * @id core.$Element
	 */
	function $Element(el) {
		if (this === window) return new $Element(el);
		if (el instanceof $Element) return el;

		this._element = $(el);
		this.tag = this._element?this._element.tagName.toLowerCase():'';

		this._queue = new Array;
	}

	/**
	 * DOMElement °´Ã¼¸¦ ¹ÝÈ¯ÇÑ´Ù.
	 * @id core.$Element.$value
	 */
	$Element.prototype.$value = function() {
		return this._element;
	}

	/**
	 * °´Ã¼ÀÇ CSS ¼Ó¼ºÀ» ¾òÀ» ¼ö ÀÖ´Ù. ´Ü, Ã¹¹øÂ° argument ¿¡ ¾òÀ» ¼Ó¼ºÅ°¸¦ ÀÔ·ÂÇØ¾ß ÇÑ´Ù.
	 * ¸¸ÀÏ, Ã¹¹øÂ° argument °¡ Object È¤Àº $Hash Å¸ÀÔÀÌ¸é ¹Ý´ë·Î CSS¸¦ ÁÖ¾îÁø °ªÀ¸·Î Àû¿ëÇÑ´Ù.
	 * @id core.$Element.css
	 * @param {String,Object} sName CSS ¼Ó¼ºÀÌ¸§ È¤Àº ¼³Á¤°ª °´Ã¼
	 * @param {String} sValue ¼³Á¤°ª
	 */
	$Element.prototype.css = function(sName, sValue) {
		var e = this._element;

		if (typeof sName == "string") {
			var view;

			if (typeof sValue == "string" || typeof sValue == "number") {
				var obj = new Object;
				obj[sName] = sValue;
				sName = obj;
			} else {
				if (e.currentStyle) {
					if (sName == "cssFloat") sName = "styleFloat";
					return e.currentStyle[sName];
				} else if (window.getComputedStyle) {
					if (sName == "cssFloat") sName = "float";
					return document.defaultView.getComputedStyle(e,null).getPropertyValue(sName.replace(/([A-Z])/g,"-$1").toLowerCase());
				}
				
				return null;
			}
		}
		
		
		if (typeof $H != "undefined" && sName instanceof $H) {
			sName = sName.$value();
		}

		if (typeof sName == "object") {
			var v, type;

			for(var k in sName) {
				v    = sName[k];
				type = (typeof v);
				if (type != "string" && type != "number") continue;
				if (k == "cssFloat" && navigator.userAgent.indexOf("MSIE") > -1) k = "styleFloat";
				try {
					e.style[k] = v;
				} catch(err) {
					if (k == "cursor" && v == "pointer") {
						e.style.cursor = "hand";
					} else if (("#top#left#right#bottom#").indexOf(k+"#") > 0 && (type == "number" || !isNaN(parseInt(v)))) {
						e.style[k] = parseInt(v)+"px";
					}
				}
			}
		}
		
		return this;
	}

	/**
	 * °´Ã¼ÀÇ ¹®¼­»óÀÇ offset À§Ä¡°ªÀ» ¹ÝÈ¯ÇÑ´Ù. top, left °ªÀ» Àü´ÞÇÏ¸é ÇØ´ç °ªÀ¸·Î À§Ä¡°ªÀ» Á¤ÀÇÇÑ´Ù.
	 * @id core.$Element.offset
	 * @import core.$Element.css
	 * @param {Number} top ¹®¼­ ÁÂ»ó´ÜÀ¸·ÎºÎÅÍÀÇ top ÁÂÇ¥(px)
	 * @param {Number} left ¹®¼­ ÁÂ»ó´ÜÀ¸·ÎºÎÅÍÀÇ left ÁÂÇ¥(px)
	 * @return {TypePos} ¹®¼­ ÁÂ»ó´ÜÀ¸·ÎºÎÅÍÀÇ ÁÂÇ¥(px)
	 */
	$Element.prototype.offset = function(top, left) {
		var e = this._element;
		var t = 0, l = 0;

		if (typeof top == "number" && typeof left == "number") {
			// TODO : positioning
			return {top:top, left:left};
		}

		while(typeof e != "undefined" && e != null) {
			t += e.offsetTop;
			l += e.offsetLeft;
			e = e.offsetParent;
		}

		return {top:t, left:l};
	}

	/**
	 * °´Ã¼ÀÇ ÇÈ¼¿´ÜÀ§ ½ÇÁ¦ ³Êºñ¸¦ ±¸ÇÏ°Å³ª ¼³Á¤ÇÑ´Ù.
	 * @id core.$Element.width
	 * @return {Number} °´Ã¼ÀÇ ½ÇÁ¦ ³Êºñ
	 */
	$Element.prototype.width = function(width) {
		if (typeof width == "number") {
			var e = this._element;
			
			e.style.width = width+"px";
			if (e.offsetWidth != width) {
				e.style.width = (width*2 - e.offsetWidth) + "px";
			}
		}

		return this._element.offsetWidth;
	}

	/**
	 * °´Ã¼ÀÇ ÇÈ¼¿´ÜÀ§ ½ÇÁ¦ ³ôÀÌ¸¦ ±¸ÇÏ°Å³ª ¼³Á¤ÇÑ´Ù.
	 * @id core.$Element.height
	 * @return {Number} °´Ã¼ÀÇ ½ÇÁ¦ †çÀÌ
	 */
	$Element.prototype.height = function(height) {
		if (typeof height == "number") {
			var e = this._element;

			e.style.height = height+"px";
			if (e.offsetWidth != height) {
				e.style.height = (height*2 - e.offsetWidth) + "px";
			}
		}

		return this._element.offsetHeight;
	}

	/**
	 * ÇÔ¼ö °´Ã¼¸¦ ¸®ÅÏÇÑ´Ù.
	 * @id core.$Fn
	 * @param {Function} ÇÔ¼ö °´Ã¼
	 * @import core.$Fn.toFunction
	 */
	function $Fn(func, thisObject) {
		if (this === window) return new $Fn(func, thisObject);

		this._events = [];
		this._tmpElm = null;

		if (typeof func == "function") {
			this._func = func;
			this._this = thisObject;
		} else if (typeof func == "string" && typeof thisObject == "string") {
			this._func = new Function(func, thisObject);
		}
	}

	/**
	 * Function °´Ã¼¸¦ ¹ÝÈ¯ÇÑ´Ù.
	 * @return {Function} ÇÔ¼ö °´Ã¼
	 */
	$Fn.prototype.$value = function() {
		return this._func;
	}

	/**
	 * ÇÔ¼ö¸¦ thisObject ÀÇ ¸Þ¼Òµå·Î ¹­Àº Function À» ¹ÝÈ¯ÇÑ´Ù.
	 * @id core.$Fn.bind
	 * @import core.$A
	 */
	$Fn.prototype.bind = function() {
		var a = $A(arguments).$value();
		var f = this._func;
		var t = this._this;

		var b = function() {
			var args = $A(arguments).$value();

			// fix opera concat bug
			if (a.length) args = a.concat(args);

			return f.apply(t, args);
		};

		return b;
	}

	/**
	 *
	 * @id core.$Fn.bindForEvent
	 * @import core.$A
	 * @import core.$Event
	 */
	$Fn.prototype.bindForEvent = function() {
		var a = arguments;
		var f = this._func;
		var t = this._this;
		var m = this._tmpElm || null;

		var b = function(e) {
			var args = $A(a);
			if (typeof e == "undefined") e = window.event;

			if (typeof e.currentTarget == "undefined") {
				e.currentTarget = m;
			}

			args.unshift($Event(e));

			return f.apply(t, args.$value());
		};

		return b;
	}

	/**
	 * ÇÔ¼ö¸¦ Æ¯Á¤ °´Ã¼ÀÇ ÀÌº¥Æ®¿¡ Ãß°¡ÇÑ´Ù
	 * @id core.$Fn.attach
	 * @import core.$Fn[detach, gc]
	 */
	$Fn.prototype.attach = function(oElement, sEvent) {
		var f;
		
		if ((oElement instanceof Array) || ($A && (oElement instanceof $A) && (oElement=oElement.$value()))) {
			for(var i=0; i < oElement.length; i++) {
				this.attach(oElement[i], sEvent);
			}
			return this;
		}

		if ($Element && oElement instanceof $Element) {
			oElement = oElement.$value();
		}

		oElement = $(oElement);
		sEvent   = sEvent.toLowerCase();
		
		this._tmpElm = oElement;
		f = this.bindForEvent();
		this._tmpElm = null;

		if (typeof oElement.attachEvent != "undefined") {
			oElement.attachEvent("on"+sEvent, f);
		} else {
			if (sEvent == "mousewheel") sEvent = "DOMMouseScroll";
		

			if (sEvent == "DOMMouseScroll" && navigator.userAgent.indexOf("WebKit") > 0) {
				var events = "__jindo_wheel_events";

				if (typeof oElement[events] == "undefined") oElement[events] = new Array;
				if (typeof oElement.onmousewheel == "object") {
					oElement.onmousewheel = function(evt) {
						if (!this[events]) return;
						for(var i=0; i < this[events].length; i++) {
							this[events][i](evt);
						}
					}
				}

				oElement[events][oElement[events].length] = f;
			} else {
				oElement.addEventListener(sEvent, f, false);
			}
		}

		this._events[this._events.length] = {element:oElement, event:sEvent, func:f};
		$Fn.gc.pool.push({element:oElement, event:sEvent, func:f});

		return this;
	}

	/**
	 * ÇÔ¼ö¸¦ Æ¯Á¤ °´Ã¼ÀÇ ÀÌº¥Æ®¿¡¼­ Á¦°ÅÇÑ´Ù
	 * @id core.$Fn.detach
	 * @import core.$Fn[attach, gc]
	 */
	$Fn.prototype.detach = function(oElement, sEvent) {
		if ((oElement instanceof Array) || ($A && (oElement instanceof $A) && (oElement=oElement.$value()))) {
			for(var i=0; i < oElement.length; i++) {
				this.detach(oElement[i], sEvent);
			}
			return this;
		}

		if ($Element && oElement instanceof $Element) {
			oElement = oElement.$value();
		}

		oElement = $(oElement);
		sEvent   = sEvent.toLowerCase();
		
		var e = this._events;
		var l = this._events.length;
		var f = null;

		for(var i=0; i < l; i++) {
			if (e[i].element !== oElement || e[i].event !== sEvent) continue;
			f = e[i].func;
			for(var j=i; j < l-1; j++) {
				this._events[j] = this._events[j+1];
			}
			break;
		}

		if (this._events.length) this._events.length--;

		if (typeof oElement.detachEvent != "undefined") {
			oElement.detachEvent("on"+sEvent, f);
		} else {
			if (sEvent.toLowerCase() == "mousewheel") sEvent = "DOMMouseScroll";

			if (sEvent == "DOMMouseScroll" && navigator.userAgent.indexOf("WebKit") > 0) {
				var events = "__jindo_wheel_events", found = false;
				if (!oElement[events]) return;
				for(var i=0; i < oElement[events].length; i++) {
					if (oElement[events][i] == f) {
						found = true;
					} else if (found) {
						oElement[events][i-1] = oElement[events][i];
					}
				}
				if (oElement[events].length) oElement[events].length--;
			} else {
				oElement.removeEventListener(sEvent, f, false);
			}
		}

		return this;
	}

	/**
	 * Window°¡ Á¾·áµÉ ¶§, DOM Element ¿¡ ÇÒ´çµÈ ÀÌº¥Æ® ÇÚµé·¯¸¦ Á¦°ÅÇÑ´Ù.
	 * @id core.$Fn.gc
	 * @import core.$Fn.gcinit
	 */
	$Fn.gc = function() {
		var p = $Fn.gc.pool;
		var l = $Fn.gc.pool.length;
		for(var i=0; i < l; i++) {
			try{ $Fn(p[i].func).detach(p[i].element, p[i].event) }catch(e){};
		}
	}

	/**
	 * @id core.$Fn.gcinit
	 */
	$Fn.gc.pool = new Array;
	$Fn($Fn.gc).attach(window, "unload");

	/**
	 * JavaScript Core ÀÌº¥Æ® °´Ã¼·ÎºÎÅÍ $Event °´Ã¼¸¦ »ý¼ºÇÑ´Ù.
	 * evt ¸¦ $Event °´Ã¼ÀÇ ÀÎ½ºÅÏ½º¶ó°í ÇÏ¸é, evt.element ·Î ÀÌº¥Æ®°¡ ½ÇÇàµÈ °´Ã¼¸¦ ¾Ë ¼ö ÀÖ´Ù.
	 * @id core.$Event
	 */
	function $Event(e) {
		if (this === window) return new $Event(e);

		if (typeof e == 'undefined') e = window.event;
		this._event = e;

		this.currentElement = e.currentTarget;

		this.element = e.target || e.srcElement;
		this.type    = e.type.toLowerCase();
		if (this.type == "dommousescroll") {
			this.type = "mousewheel";
		}
	}

	/**
	 * Ä¿¼­ À§Ä¡ Á¤º¸ °´Ã¼¸¦ ¹ÝÈ¯ÇÑ´Ù.
	 * @id core.$Event.position
	 */
	$Event.prototype.pos = function() {
		var e   = this._event;
		var b   = document.body;
		var de  = document.documentElement;
		var pos = [b.scrollLeft || de.scrollLeft,b.scrollTop || de.scrollTop];

		return {
			clientX : e.clientX,
			clientY : e.clientY,
			pageX   : e.pageX || e.clientX+pos[0]-b.clientLeft,
			pageY   : e.pageY || e.clientY+pos[1]-b.clientTop,
			layerX  : e.offsetX || e.layerX - 1,
			layerY  : e.offsetY || e.layerY - 1
		};
	}

	/**
	 * Agent °´Ã¼¸¦ ¹ÝÈ¯ÇÑ´Ù. Agent °´Ã¼´Â ºê¶ó¿ìÀú¿Í OS¿¡ ´ëÇÑ Á¤º¸¸¦ ¾Ë ¼ö ÀÖµµ·Ï ÇÑ´Ù.
	 * @id core.$Agent
	 */
	function $Agent() {
		if (window !== this) return;

		var a = new $Agent;
		window.$Agent = function() {
			return a;
		}

		return a;
	}

	/**
	 * À¥ºê¶ó¿ìÀú¿¡ ´ëÇÑ Á¤º¸ °´Ã¼¸¦ ¹ÝÈ¯ÇÑ´Ù.
	 * @id core.$Agent.navigator
	 * @return {TypeNavigatorInfo} À¥ºê¶ó¿ìÀú Á¤º¸ °´Ã¼
	 */
	$Agent.prototype.navigator = function() {
		var info = new Object;
		var ver  = -1;
		var u    = navigator.userAgent;
		var v    = navigator.vendor||"";
		var f    = function(s,h){ return ((h||"").indexOf(s) > -1) };

		info.opera     = (typeof window.opera != "undefined") || f("Opera",u);
		info.ie        = !info.opera && f("MSIE",u);
		info.safari    = f("Apple",v);
		info.mozilla   = f("Gecko",u) && !info.safari;
		info.firefox   = f("Firefox",u);
		info.camino    = f("Camino",v);
		info.netscape  = f("Netscape",u);
		info.omniweb   = f("OmniWeb",u);
		info.icab      = f("iCab",v);
		info.konqueror = f("KDE",v);

		try {
			if (info.ie) {
				ver = u.match(/(?:MSIE) ([0-9.]+)/)[1];
			} else if (info.firefox||info.opera||info.omniweb) {
				ver = u.match(/(?:Firefox|Opera|OmniWeb)\/([0-9.]+)/)[1];
			} else if (info.mozilla) {
				ver = u.match(/rv:([0-9.]+)/)[1];
			} else if (info.safari) {
				ver = parseFloat(u.match(/Safari\/([0-9.]+)/)[1]);
				if (ver == 100) {
					ver = 1.1;
				} else {
					ver = [1.0,1.2,-1,1.3,2.0,3.0][Math.floor(ver/100)];
				}
			} else if (info.icab) {
				ver = u.match(/iCab[ \/]([0-9.]+)/)[1];
			}

			info.version = parseFloat(ver);
			if (isNaN(info.version)) info.version = -1;
		} catch(e) {
			info.version = -1;
		}

		$Agent.prototype.navigator = function() {
			return info;
		}

		return info;
	}
	//Áøµµ2 ·¦ÇÎ ³¡=========================================================================

	var cMenuManager = $Class({
		oMenuGroupInstance : {},		// °¢ ¸Þ´º±×·ì¿¡ °üÇÑ Á¤º¸
		oMenuNodeInstance : {},		// ¸Þ´º °¢°¢¿¡ °üÇÑ Á¤º¸

		oMapperNodeGroup : {},			//	°¢ ³ëµå°¡ °¡Áö°í ÀÖ´Â ÇÏÀ§¸Þ´º±×·ìÁ¤º¸
		oMapperGroupNode : {},			// °¢ ¸Þ´º±×·ìÀÌ ¼ÓÇØ ÀÖ´Â »óÀ§¸Þ´ºÀÇ ³ëµå Á¤º¸

		oTopGroupOffset : {},				// ÃÖ»óÀ§ ¸Þ´ºÀÇ ¿ÀÇÁ¼Â°ª

		aViewMenuGroup : [],				// ÇöÀç º¸¿©Áö°í ÀÖ´Â ¸Þ´º±×·ì ¸ñ·Ï
		aViewMenuNode : [],				// ÇöÀç ¸¶¿ì½º°¡ ¿Ã¶ó°¡ ÀÖ´Â ¸Þ´º ³ëµå ¸ñ·Ï
		aDefaultOpenGroup : [],			// ÃÊ±â init½Ã ÆîÄ§»óÅÂ·Î º¸¿©ÁÖ¾î¾ßÇÒ GroupµéÀÇ ¸ñ·Ï
		
		oData : {
			vertical : false,						// false: °¡·Î¸Þ´º(ÇÏÀ§¸Þ´º°¡ ¾Æ·¡³ëÃâ), true:¼¼·Î¸Þ´º(ÇÏÀ§¸Þ´º°¡ ¿À¸¥ÂÊ¿¡ ³ëÃâ)
			data : []
		},
		
		sTopGroupId : null,					// ÃÖ»óÀ§ ¸Þ´º GroupId
		sOpenGroupId : null,				// ÃÊ±â init½Ã ÆîÄ§»óÅÂ·Î º¸¿©ÁÖ¾î¾ßÇÒ GroupId
		sOverNodeId : null,					// ÃÊ±â init½Ã È°¼º»óÅÂ·Î º¸¿©ÁÖ¾î¾ßÇÒ NodeId
		evtOver : {},							// over ÀÌº¥Æ®¸¦ Àâ±âÀ§ÇÑ ÀÌº¥Æ® º¯¼ö
		evtMove : null,							// documentÀÇ mousemove¸¦ Àâ±âÀ§ÇÑ ÀÌº¥Æ® º¯¼ö
		evtClick : {},							// click ÀÌº¥Æ®¸¦ Àâ±âÀ§ÇÑ ÀÌº¥Æ® º¯¼ö
		evtResize : null,
		bResizing : null,
		oTimeout : null,

		/*
		 *	Å¬·¡½º »ý¼ºÀÚ
		 */
		$init : function(oData){
			// ¿É¼Ç Á¤º¸ È®Àå Ã³¸®
			for(var x in oData)		this.oData[x] = oData[x];

			for(var i = 0; i < this.oData["data"].length; i++)	{		
				// ¸Þ´º ±×·ìÀÇ ¿ÀºêÁ§Æ® »ý¼º
				this.oMenuGroupInstance[this.oData["data"][i].sId] = {
					bTopParents : (this.oData["data"][i].bTopParents) ? true : false,	// ÃÖ»óÀ§¸Þ´ºÀÎÁö
					nDepth : null,																					// µª½ºÁ¤º¸
					elMenuGroup : $(this.oData["data"][i].sId),										// ¸Þ´º±×·ì¿¤¸®¸ÕÆ®
					nTop : this.oData["data"][i].nTop,
					nLeft : this.oData["data"][i].nLeft,
					oPosition : {}
				};

				// ¸Þ´º ±×·ìÀÇ ½ºÅ¸ÀÏ ¼³Á¤
				$Element(this.oData["data"][i].sId).css({ 
					position : "absolute",
					cursor   : $Agent().IE ? "hand" : "pointer",
					display : (this.oData["data"][i].bTopParents) ? "block" : "none"
				});

				// ÃÖ»óÀ§ ¸Þ´ºÀÏ °æ¿ì Æ÷Áö¼Ç ¼¼ÆÃ
				if(this.oData["data"][i].bTopParents)  {
					this.sTopGroupId = this.oData["data"][i].sId;
					this.setGroupStartPosition(this.oData["data"][i].sId);
					this.setGroupEndPosition(this.oData["data"][i].sId);
					this.aViewMenuGroup.push(this.oData["data"][i].sId);

					//iframeÃ³¸®¸¦ À§ÇÑ Åõ¸í·¹ÀÌ¾î »ý¼º
					var divTransparency = document.createElement("div");
					$(this.sTopGroupId).parentNode.insertBefore(divTransparency, $(this.sTopGroupId));
					$Element(divTransparency).css({
						position : "absolute",
						left : 0,
						top : this.oMenuGroupInstance[this.sTopGroupId].oPosition["endY"] - this.oMenuGroupInstance[this.sTopGroupId].oPosition["startY"],
						width : this.oMenuGroupInstance[this.sTopGroupId].oPosition["endX"],
						height : 40,
						background : "url(http://images.hangame.co.kr/hangame/renewal_2007/lnb/blank.gif)"
					});
				}

				// ¸Þ´º ±×·ì³»ÀÇ °¢ ¸Þ´ºÀÇ ÀÎ½ºÅÏ½º »ý¼º
				var tmpMenu = this.oMenuGroupInstance[this.oData["data"][i].sId]["elMenuGroup"].getElementsByTagName(this.oData["data"][i].sTagName);
				for(var j = 0; j < tmpMenu.length; j++) {
					this.oMenuNodeInstance[this.oData["data"][i].sId + "." + j] = {
						sLabel : this.oData["data"][i].sId + "." + j,
						elMenuNode : tmpMenu[j],
						oPosition : {}
					};
				}

				// ¸Þ´º±×·ì°ú ¸Þ´º³ëµåÀÇ Á¤º¸µî·Ï(mapping data)
				if (!this.oData["data"][i].bTopParents) {
					this.oMapperGroupNode[this.oData["data"][i].sId] = this.oData["data"][i].sParentsGroupId + "." + this.oData["data"][i].nParentsIndex;
					this.oMapperNodeGroup[this.oData["data"][i].sParentsGroupId + "." + this.oData["data"][i].nParentsIndex] = this.oData["data"][i].sId;
				}

				// ¼­ºê±×·ìÁß Ã³À½ ¼¼ÆÃ¿É¼ÇÀÌ display=blockÀÏ °æ¿ì view¸ñ·Ï¿¡ push
				if (!(this.oData["data"][i].bTopParents) && this.oData["data"][i].sDisplay == "block")		this.sOpenGroupId = this.oData["data"][i].sId;

				// Ç×»óÈ°¼º »óÅÂ·Î º¸¿©Á®¾ß ÇÏ´Â ¸Þ´º³ëµå Á¤º¸µî·Ï
				if(this.oData["data"][i].nOverViewIndex == 0 || this.oData["data"][i].nOverViewIndex)	 {
					if(!this.sOverNodeId) this.sOverNodeId = (this.oData["data"][i].nOverViewIndex < 0) ? null : this.oData["data"][i].sId + "." + this.oData["data"][i].nOverViewIndex;
				}
			}
			// event È¿°ú ÇÔ¼ö°¡ ¼±¾ðµÇ¾úÀ»¶§ ¿À¹ö¶óÀÌµå
			if(this.oData["eventOverFunction"])		this.eventOverFunction = this.oData["eventOverFunction"];
			if(this.oData["eventClickFunction"])		this.eventClickFunction = this.oData["eventClickFunction"];

			// ¸Þ´º ±×·ìÀÇ Depth ¼¼ÆÃ
			this.setGroupDepth();

			// ¸Þ´º ±×·ì³»ÀÇ °¢ ¸Þ´ºÀÇ Æ÷Áö¼Ç ¼¼ÆÃ
			this.setNodePosition();

			//¼­ºê±×·ìÁß Ã³À½ ¼¼ÆÃ¿É¼ÇÀÌ display=blockÀÏ °æ¿ì Ã³¸®ÇÔ¼ö
			this.initDefaultMenu();

			// °¢ ¸Þ´º ³ëµå¿¡ ÀÌº¥Æ® µî·Ï
			this.bindEventToNode();
		},

		/*
		 * Default Display MenuµéÀÇ INIT Ã³¸®ÇÏ´Â ÇÔ¼ö (aDefaultOpenGroupÀÇ ³»¿ëÀ» Ã¤¿ì°í display=block ½ÃÅ²´Ù.)
		 */
		initDefaultMenu : function() {
			// ÃÊ±â È°¼ºÈ­ ³ëµå È°¼ºÈ­ Ã³¸®
			if(this.sOverNodeId)	 									this.eventOverFunction(this.sOverNodeId, true);

			var sGroupId = this.sOpenGroupId;
			if(!sGroupId)												this.aDefaultOpenGroup.length = 0;
			if(!this.oMapperGroupNode[sGroupId])		return false;
			if(this.aViewMenuNode.length > 0)				this.aViewMenuNode.length = 0;
			if(this.aViewMenuGroup.length > 1)				this.aViewMenuGroup.length = 1;
			if(this.aDefaultOpenGroup.length > 0)			this.aDefaultOpenGroup.length = 0;

			// ÀÚ½ÅÀÇ »óÀ§ Group¿ª½Ã display=blockµÇ¾î¾ß ÇÏ¹Ç·Î »óÀ§ Group Å½»ö
			var arrGroup = [];
			var th = this;
			arrGroup.push(sGroupId);
			searchUpperDepthGroup = function(th, gid) {
				var upper = th.oMapperGroupNode[gid];
				if (!upper)	 return false;
				if (th.oMenuGroupInstance[upper.split(".")[0]].bTopParents)	 return false;
				arrGroup.push(upper.split(".")[0]);
				searchUpperDepthGroup(th, upper.split(".")[0]);
			}
			searchUpperDepthGroup(th, sGroupId);

			this.aDefaultOpenGroup.length = arrGroup.length + 1;
			this.aDefaultOpenGroup[0] = this.sTopGroupId;
			for(var i = arrGroup.length-1; i >= 0; i--) {
				this.aDefaultOpenGroup[this.getDepth(arrGroup[i])] = arrGroup[i];
				this.aViewMenuNode.push(this.oMapperGroupNode[arrGroup[i]]);
				this.aViewMenuGroup.push(arrGroup[i]);
				this.eventOverFunction(this.oMapperGroupNode[arrGroup[i]], true);
				this.showMenuGroup(arrGroup[i]);
				this.setGroupEndPosition(arrGroup[i]);
				this.setNodePosition();
			}
			//console.log("[INIT]sOpenGroupId : " + this.sOpenGroupId)
			//console.log("[INIT]sOverNodeId : " + this.sOverNodeId)
			//console.log("[INIT]aViewMenuNode : " + this.aViewMenuNode)
			//console.log("[INIT]aViewMenuGroup : " + this.aViewMenuGroup)
			//console.log("[INIT]aDefaultOpenGroup : " + this.aDefaultOpenGroup)
		},

		/*
		 * Default Display MenuµéÀÇ Display¸¦ Ã³¸®ÇÏ´Â ÇÔ¼ö
		 */
		defaultMenuDisplay : function() {
			if(this.evtMove && this.evtMove._events.length > 0)		return false;
			//console.log("aViewMenuNode : " + this.aViewMenuNode)
			//console.log("aViewMenuGroup : " + this.aViewMenuGroup)
			//console.log("aDefaultOpenGroup : " + this.aDefaultOpenGroup)

			if(this.aViewMenuNode.length > 1) this.eventOverFunction(this.aViewMenuNode[this.aViewMenuNode.length-1], false);
			// default display menu°¡ ¾øÀ¸¸é ¸ðµÎ pop
			if(!this.aDefaultOpenGroup || this.aDefaultOpenGroup.length == 0) {
				this.popViewList(this.aViewMenuGroup.length-1, 1);
			} else {
				if(this.aViewMenuGroup.length > this.aDefaultOpenGroup.length)		this.popViewList(this.aViewMenuGroup.length-1, this.aDefaultOpenGroup.length);
				for(var i = 0; i < this.aDefaultOpenGroup.length; i++) {
					if(this.aDefaultOpenGroup[i] != this.aViewMenuGroup[i]) {
						this.popViewList(this.aViewMenuGroup.length-1, i);
						this.pushViewList(i, this.aDefaultOpenGroup.length - 1);
					}
				}
			}
			if(this.sOverNodeId)			this.eventOverFunction(this.sOverNodeId, true);
		},

		/*
		 * ÁÖ¾îÁø ÀÎµ¦½º ¹üÀ§¾ÈÀÇ ³»¿ë»èÁ¦ Ã³¸®ÇÔ¼ö (aViewMenuGroup / aViewMenuNode ÀÇ ³»¿ëÀ» ºñ¿î´Ù. µÚ¿¡¼­ºÎÅÍ ºñ¿î´Ù.)
		 */
		popViewList : function(nStartIndex, nEndIndex) {
			if(arguments.length < 2) return false;
			if(typeof nStartIndex != "number" || typeof nEndIndex != "number" || nStartIndex < 0 || nEndIndex < 0) return false;
			if(nStartIndex < nEndIndex)	return false;
			
			// ÃÖ»óÀ§ ³ëµå´Â Áö¿ì¸é ¾ÈµÇ¹Ç·Î nEndIndexÀÇ ÃÖ¼Ò°ªÀº 1ÀÌ´Ù.
			if (nEndIndex < 1)	nEndIndex = 1;

			for(var i = nStartIndex; i >= nEndIndex; i--) {
				this.hideMenuGroup(this.aViewMenuGroup[i]);
				this.eventOverFunction(this.aViewMenuNode[i-1], false);
			}
			this.aViewMenuGroup.length = nEndIndex;
			this.aViewMenuNode.length = nEndIndex - 1;

			//console.log("[DEL]aViewMenuNode : " + this.aViewMenuNode)
			//console.log("[DEL]aViewMenuGroup : " + this.aViewMenuGroup)
			//console.log("[DEL]aDefaultOpenGroup : " + this.aDefaultOpenGroup)
		},

		/*
		 * ÁÖ¾îÁø ÀÎµ¦½º ¹üÀ§¾È¿¡ ³»¿ëÃß°¡ Ã³¸®ÇÔ¼ö (aViewMenuGroup / aViewMenuNode ÀÇ ³»¿ëÀ» Ã¤¿î´Ù. ¾Õ¿¡¼­ºÎÅÍ Ã¤¿î´Ù.)
		 */
		pushViewList : function(nStartIndex, nEndIndex) {
			if(arguments.length < 2) return false;
			if(typeof nStartIndex != "number" || typeof nEndIndex != "number" || nStartIndex < 0 || nEndIndex < 0) return false;
			if(nStartIndex > nEndIndex)	return false;

			// ÃÖ»óÀ§ ³ëµå´Â ÀÌ¹Ì Ã¤¿öÁ® ÀÖÀ¸¹Ç·Î nStartIndex ÃÖ¼Ò°ªÀº 1ÀÌ´Ù.
			if (nStartIndex < 1)	nStartIndex = 1;

			for(var i = nStartIndex; i <= nStartIndex; i++) {
				this.aViewMenuGroup[i] = this.aDefaultOpenGroup[i];
				this.aViewMenuNode[i - 1] = this.oMapperGroupNode[this.aDefaultOpenGroup[i]];
				this.eventOverFunction(this.aViewMenuNode[i - 1], true);
				this.showMenuGroup(this.aViewMenuGroup[i]);
			}

			//console.log("[ADD]aViewMenuNode : " + this.aViewMenuNode)
			//console.log("[ADD]aViewMenuGroup : " + this.aViewMenuGroup)
			//console.log("[ADD]aDefaultOpenGroup : " + this.aDefaultOpenGroup)
		},

		/*
		 *	¸Þ´º ±×·ìÀÇ Depth ¼¼ÆÃ
		 */
		setGroupDepth : function() {
			var depth = 0;;
			searchDepth = function(th, gid) {
				if(gid == th.sTopGroupId)		return false;
				else {
					depth++;
					var upper = th.oMapperGroupNode[gid];
					if(upper) {
						upper = upper.split(".")[0];
						if(upper == th.sTopGroupId) return false;
						else searchDepth(th, upper);
					} else { return false; }
				}
			}

			var th = this;
			for(var x in this.oMenuGroupInstance) {
				searchDepth(th, x);
				this.oMenuGroupInstance[x].nDepth = depth;
				depth = 0;
			}
		},

		/*
		 *	¸Þ´º±×·ì ½ºÅ¸Æ®Æ÷Áö¼Ç ¼¼ÆÃ
		 */
		setGroupStartPosition : function(sGroupId) {
			var oGroup = this.oMenuGroupInstance[sGroupId];

			if(oGroup.bTopParents) {
				//ÃÖ»óÀ§ ±×·ìÀÏ °æ¿ì Ç×»óº¸¿©¾ßÇÑ´Ù.
				oGroup["elMenuGroup"].style.display == "block";
				this.oTopGroupOffset = $Element(this.oMenuGroupInstance[sGroupId].elMenuGroup.parentNode).offset();
				oGroup.oPosition["startX"] = this.oTopGroupOffset.top + oGroup.nLeft ; 
				oGroup.oPosition["startY"] = this.oTopGroupOffset.left + oGroup.nTop; 

				$Element(sGroupId).css({ 
					left : oGroup.nLeft,
					top : oGroup.nTop
				});
			} else {
				// ÀÚ½ÅÀÇ »óÀ§¸Þ´º°¡  display:noneÀÏ¶§´Â ÁÂÇ¥¸¦ °è»êÇÏÁö ¾Ê´Â´Ù.
				var sUpperGroup = this.oMapperGroupNode[sGroupId].split(".")[0];
				if($(sUpperGroup).style.display == "none")			return false;

				// ÁÂÇ¥°¡ ÇÑ¹ø °è»êµÈÈÄ¿£ ´Ù½Ã °è»êÇÏÁö ¾Ê´Â´Ù.
				if(oGroup.oPosition["startX"] && oGroup.oPosition["startY"])		return false;

				var oUpperNodePos = {};
				var tmpX = (this.oData.vertical) ? "endX" : "startX";
				var tmpY = (this.oData.vertical) ? "startY" : "endY";
				oUpperNodePos["x"] = this.oMenuNodeInstance[this.oMapperGroupNode[sGroupId]].oPosition[tmpX];
				oUpperNodePos["y"] = this.oMenuNodeInstance[this.oMapperGroupNode[sGroupId]].oPosition[tmpY];

				oGroup.oPosition["startX"] = (this.oData.vertical) ? oUpperNodePos["x"] : oUpperNodePos["x"] + oGroup.nLeft; 
				oGroup.oPosition["startY"] = (this.oData.vertical) ? oUpperNodePos["y"] + oGroup.nTop : oUpperNodePos["y"]; 

				$Element(oGroup.elMenuGroup).css({ 
					top : oUpperNodePos["y"] - this.oTopGroupOffset.top + oGroup.nTop,
					left : $Agent().IE ? oUpperNodePos["x"] - this.oTopGroupOffset.left + oGroup.nLeft : oUpperNodePos["x"] + oGroup.nLeft
				});
			}	
			//console.log("setStartGroup : " + sGroupId, oGroup.oPosition)
		},

		/*
		 *	¸Þ´º±×·ìÀÇ  ¿£µåÆ÷Áö¼Ç ¼¼ÆÃ
		 */
		setGroupEndPosition : function(sGroupId) {
			if(!sGroupId)			return false;
			var oGroup = this.oMenuGroupInstance[sGroupId];
			// ÁÂÇ¥°¡ ÇÑ¹ø °è»êµÈÈÄ¿£ ´Ù½Ã °è»êÇÏÁö ¾Ê´Â´Ù.
			if(oGroup.oPosition["endX"] && oGroup.oPosition["endY"])		return false;

			var nWidth = $Element(sGroupId).width();
			var nHeight = $Element(sGroupId).height();

			oGroup.oPosition["endX"] = (this.oData.vertical) ? oGroup.oPosition["startX"] + nWidth + oGroup.nLeft : oGroup.oPosition["startX"] + nWidth; 
			oGroup.oPosition["endY"] = (this.oData.vertical) ? oGroup.oPosition["startY"] + nHeight : oGroup.oPosition["startY"] + nHeight + oGroup.nTop; 
			//console.log("setEndGroup : " + sGroupId, oGroup.oPosition)
		},

		/*
		 *	¸Þ´º±×·ì ³»ÀÇ °¢ ¸Þ´º³ëµåÀÇ Æ÷Áö¼Ç ¼¼ÆÃ
		 */
		setNodePosition : function() {
			for(var x in this.oMenuNodeInstance) {
				var oNode = this.oMenuNodeInstance[x];
				// ÀÚ½ÅÀ» Æ÷ÇÔÇÑ ¸Þ´º±×·ìÀÌ display:noneÀÏ¶§´Â ÁÂÇ¥¸¦ °è»êÇÏÁö ¾Ê´Â´Ù.
				var sSelfGroup = this.findSelfGroup(x);
				if($(sSelfGroup).style.display == "none")			continue;

				// ÁÂÇ¥°¡ ÇÑ¹ø °è»êµÈÈÄ¿£ ´Ù½Ã °è»êÇÏÁö ¾Ê´Â´Ù.
				if(oNode.oPosition["startX"] && oNode.oPosition["startY"] && oNode.oPosition["endX"] && oNode.oPosition["endY"])		continue;

				var tmpPosition = $Element(oNode.elMenuNode).offset();
				oNode.oPosition["startX"] = $Agent().IE ? tmpPosition.left : tmpPosition.left - this.oTopGroupOffset.left;
				oNode.oPosition["startY"] = tmpPosition.top;
				oNode.oPosition["endX"] = tmpPosition.left + $Element(oNode.elMenuNode).width();
				oNode.oPosition["endY"] = tmpPosition.top + $Element(oNode.elMenuNode).height();		
				
				//console.log("setNode : " + x, oNode.oPosition)
				if(this.oMapperNodeGroup[x])		this.setGroupStartPosition(this.oMapperNodeGroup[x]);
			}
		},

		/*
		 *	ÀÌº¥Æ® Ã³¸®ÇÔ¼ö
		 */
		bindEventToNode : function() {
			this.evtResize = $Fn(this.onResize, this).attach(window, "resize");
			for(var x in this.oMenuNodeInstance) {
				if(x != this.sOverNodeId || this.oMapperNodeGroup[x]) {
					var elNode = this.oMenuNodeInstance[x]["elMenuNode"];
					(this.evtOver[x] = $Fn($Fn(this.onMouseOverToNode, this).bind(x), this)).attach(elNode, "mouseover");
					(this.evtClick[x] = $Fn($Fn(this.eventClickFunction, this).bind(x), this)).attach(elNode, "click");
				}
			}
		},
		
		/**
		 * ¸®»çÀÌÁî Ã³¸®ÇÔ¼ö - ÆäÀÌÁö°¡ ¸®»çÀÌÁî µÇ¸é ±âÁ¸¿¡ ¼¼ÆÃµÈ positionÀ» Àç¼³Á¤ÇÏµµ·Ï µ¥ÀÌÅÍ¸¦ »èÁ¦ÇÑ´Ù.
		 */
		onResize : function(evt) {
			if(this.bResizing)	return false;
			this.bResizing = true;
			
			for(var x in this.oMenuNodeInstance) {
				var oNode = this.oMenuNodeInstance[x];
				oNode.oPosition = {};
			}
			
			this.oTimeout = setTimeout($Fn(function(){
				this.bResizing = false;
				clearTimeout(this.oTimeout);
			}, this).bind(), 1000);
		},

		/*
		 *	mouseover ÀÌº¥Æ® Ã³¸®ÇÔ¼ö (event attach)
		 */
		onMouseOverToNode : function(sNodeId, evt) {
			// mouseover ÀÌº¥Æ®´Â Ã³À½ ÇÑ¹ø¸¸ Àâ´Â´Ù.
			//var overDepth = this.getSelfDepth(sNodeId);
			//if(this.aViewMenuNode[overDepth] == sNodeId &&)		return false;
			var nodeDepth = this.getSelfDepth(sNodeId);
			var subGroupDepth = nodeDepth + 1;

			// ÀÌº¥Æ® µô·¹ÀÌ·Î Á¦´ë·Î ¹è¿­ÀÌ ºñ¿öÁöÁö ¾ÊÀº °æ¿ì´Â ÀÚ½ÅÀÇ depthÀÌÈÄÀÇ °ÍÀº ºñ¿î´Ù.
			if(this.aViewMenuNode.length > nodeDepth) {
				for(var i = this.aViewMenuNode.length - 1; i >= nodeDepth; i--) {
					this.hideMenuGroup(this.aViewMenuGroup[this.aViewMenuNode.length]);
					this.eventOverFunction(this.aViewMenuNode[i], false);
					this.aViewMenuGroup.length = i+1;
					this.aViewMenuNode.length = i;
				}
			}

			// ÀÌº¥Æ® µô·¹ÀÌ·Î Á¦´ë·Î ¹è¿­ÀÌ Ã¤¿öÁöÁö ¾ÊÀº°æ¿ì´Â retrun false
			if(nodeDepth > 0 && !this.aViewMenuNode[nodeDepth-1]) {
				if(!this.evtMove || this.evtMove._events.length == 0)			this.defaultMenuDisplay();
				return false;
			}
			
			// ÃÊ±â È°¼ºÈ­ ³ëµå ºñÈ°¼ºÈ­ Ã³¸®
			if(this.sOverNodeId && this.getSelfDepth(this.sOverNodeId) == this.getSelfDepth(sNodeId))	this.eventOverFunction(this.sOverNodeId, false);

			this.aViewMenuNode[nodeDepth] = sNodeId;
			this.aViewMenuGroup[subGroupDepth] = this.findSubGroup(sNodeId);
			this.eventOverFunction(sNodeId, true);

			//console.log("[ADD]aViewMenuNode : " + this.aViewMenuNode)
			//console.log("[ADD]aViewMenuGroup : " + this.aViewMenuGroup)

			// ÃÖÃÊ ÀÌº¥Æ® attach
			if(!this.evtMove || this.evtMove._events.length == 0) {
				(this.evtMove = $Fn(this.onMouseMove, this)).attach(document, "mousemove");
				//console.log("attach >>>>>>>>>>>>>>>>>>", this.evtMove);
			}

			this.showMenuGroup(this.aViewMenuGroup[this.aViewMenuGroup.length - 1]);
			this.setGroupEndPosition(this.aViewMenuGroup[this.aViewMenuGroup.length - 1]);
			this.setNodePosition();
		},

		/*
		 *	mousemove Ã³¸®ÇÔ¼ö (event detach)
		 */
		onMouseMove : function(evt) {
			for(var i = this.aViewMenuNode.length - 1; i >= 0; i--) {
				var chkNode = this.checkMouseInTarget("node",  this.aViewMenuNode[i], evt);
				if(chkNode){
					return false;
				} else {
					var chkSubGroup = (this.aViewMenuGroup[i+1] == false || !this.aViewMenuGroup[i+1]) ? this.checkMouseInTarget("group",  this.aViewMenuGroup[i], evt) : this.checkMouseInTarget("group",  this.aViewMenuGroup[i+1], evt);
					if(chkSubGroup) {
					} else {
						var th = this;
						setTimeout(function(){
							th.defaultMenuDisplay();
						}, 1);
						if(this.evtMove._events.length > 0)			this.evtMove.detach(document, "mousemove");
						//console.log("[hideMenuGroup] >>> detach >>>", this.evtMove);
						break;
					}
				}
			}
		},

		/*
		 *	¸¶¿ì½º°¡ Target ¿µ¿ª³»¿¡ ÀÖ´ÂÁö Ã¼Å©ÇÏ´Â ÇÔ¼ö - (Target(¸Þ´º±×·ì/¸Þ´º³ëµå)Àº tid·Î ±¸ºÐ)
		 */
		checkMouseInTarget : function (tid, sTargetId, evt) {
			if(!sTargetId)	return false;
			var chk = true;
			var pos = (tid == "node") ? this.oMenuNodeInstance[sTargetId].oPosition : this.oMenuGroupInstance[sTargetId].oPosition;
			var mousepos = evt.pos();
			var gap = $Agent().IE ? 1 : -1;

			if(mousepos.pageX < pos["startX"] + gap) 				chk = false;
			if(mousepos.pageX > pos["endX"] - gap) 					chk = false;
			if(mousepos.pageY < pos["startY"] + gap) 				chk = false;
			if(mousepos.pageY > pos["endY"] - gap) 					chk = false;
			return chk;
		},

		/*
		 * ¸Þ´º±×·ì µð½ºÇÃ·¹ÀÌ Ã³¸® ÇÔ¼ö (Show)
		 */
		showMenuGroup : function(sGroupId) {
			if(!sGroupId) return false;
			this.oMenuGroupInstance[sGroupId].elMenuGroup.style.display = "block";
		},

		/*
		 * ¸Þ´º±×·ì µð½ºÇÃ·¹ÀÌ Ã³¸® ÇÔ¼ö (Show)
		 */
		hideMenuGroup : function(sGroupId) {
			if(!sGroupId) return false;
			this.oMenuGroupInstance[sGroupId].elMenuGroup.style.display = "none";
		},

		/*
		 * ÀÚ½ÅÀÇ depth °Ë»ö(group)
		 */
		getDepth : function(sGroupId) {
			var depth = this.oMenuGroupInstance[sGroupId].nDepth;
			return depth;
		},

		/*
		 * ÀÚ½ÅÀÇ depth °Ë»ö(node)
		 */
		getSelfDepth : function(sNodeId) {
			var depth = this.getDepth(this.findSelfGroup(sNodeId));
			return depth;
		},

		/*
		 * ¼­ºê menugroup °Ë»ö
		 */
		findSubGroup : function(sNodeId) {
			var sub = this.oMapperNodeGroup[sNodeId];
			if(!sub)		return false;
			else			return sub;
		},
		
		/*
		 * ÀÚ½ÅÀÇ menugroup °Ë»ö
		 */
		findSelfGroup : function(sNodeId) {
			var self = sNodeId.split(".")[0];
			return self;
		},

		/*
		 * mouseclick½Ã È¿°ú Ã³¸®ÇÔ¼ö
		 */
		eventClickFunction : function(sNodeId, evt) {
			//console.log("click");
		},

		/*
		 * mouseover½Ã È¿°ú Ã³¸®ÇÔ¼ö
		 */
		eventOverFunction : function(sNodeId, flag) {
			if(!sNodeId)						return false;
			//console.log("eventOverFunction : " + sNodeId + "["+flag+"]")
			var Target = this.oMenuNodeInstance[sNodeId];
			var selfDepth = this.getSelfDepth(sNodeId);

			if(flag) {	// mouseover Ã³¸®
				if(selfDepth == 0)					this.changeClassName(Target["elMenuNode"], true);		//ÃÖ»óÀ§±×·ìÀÇ ¸Þ´º³ëµåÀÏ°æ¿ì
				else										this.changeImage(Target["elMenuNode"].getElementsByTagName("img")[0], true);			//¼­ºê¸Þ´º±×·ìÀÇ ¸Þ´º³ëµåÀÏ°æ¿ì
			} else {	// mouseout Ã³¸®
				if(selfDepth == 0)					this.changeClassName(Target["elMenuNode"], false);					//ÃÖ»óÀ§±×·ìÀÇ ¸Þ´º³ëµåÀÏ°æ¿ì
				else										this.changeImage(Target["elMenuNode"].getElementsByTagName("img")[0], false);		//¼­ºê¸Þ´º±×·ìÀÇ ¸Þ´º³ëµåÀÏ°æ¿ì
			}
		},

		/*
		 * °¢ ¸Þ´º³ëµåÀÇ ÀÌ¹ÌÁö»óÅÂ(È°¼º/ºñÈ°¼º) º¯°æ Ã³¸® ÇÔ¼ö
		 */
		changeImage : function(oImage, bFlag) {
			var src = oImage.src;
			var newsrc = new String();
			var reg = /^(.+[^_on])(_on)*(\.[a-z]{3})$/igm;
			var loadFail = /.*\/$/igm;

			// ÀÌ¹ÌÁö °æ·Î¸¦ ÀÐ¾î¿ÀÁö ¸øÇßÀ»¶§ return false
			if(loadFail.test(src))			return false;

			if(bFlag) {
				if (reg.test(src))		newsrc = src.replace(reg, "$1_on$3");
			} else {
				if (reg.test(src))		newsrc = src.replace(reg, "$1$3");
			}
			oImage.src = newsrc;
		},

		/*
		 * ÃÖ»óÀ§ ¸Þ´º±×·ì³»ÀÇ °¢ ¸Þ´º³ëµåÀÇ Å¬·¡½º¸í(È°¼º/ºñÈ°¼º) º¯°æ Ã³¸® ÇÔ¼ö
		 */
		changeClassName : function(oElement, bFlag) {
			if(bFlag) {
				oElement.className = "selected";
			} else {
				oElement.className = "";
			}
		},

		/*
		 * sOpenGroupId, sOverNodeId º¯°æ Ã³¸® ÇÔ¼ö
		 */
		changeOverNode : function(sGroupId, nIndex) {
			if(arguments.length != 0) {
				// sGroupId°¡ ¿À·ùÀÏ¶§ return false
				if(!this.oMenuGroupInstance[sGroupId]) return false;
				// ±âÁ¸ sOverNodeId ¿Í Àç¼³Á¤ÇÏ·Á´Â sOverNodeId°¡ °°À»°æ¿ì retufn false;
				if(this.sOverNodeId == sGroupId + "." + nIndex)	return false;
				// nodeId°¡ ¿À·ùÀÏ¶§ return false
				if(nIndex > -1 && !this.oMenuNodeInstance[sGroupId + "." + nIndex])			return false;
			}

			// ±âÁ¸ sOverNode ¿¡ Event Attach
			if(this.sOverNodeId) {
				var elNode = this.oMenuNodeInstance[this.sOverNodeId]["elMenuNode"];
				(this.evtOver[this.sOverNodeId] = $Fn($Fn(this.onMouseOverToNode, this).bind(this.sOverNodeId), this)).attach(elNode, "mouseover");		
				(this.evtClick[this.sOverNodeId] = $Fn($Fn(this.eventClickFunction, this).bind(this.sOverNodeId), this)).attach(elNode, "click");
				this.eventOverFunction(this.sOverNodeId, false);
			}

			// È°¼ºÈ­µÈ ¸Þ´º Áö¿ò
			for(var i = this.aViewMenuNode.length - 1; i >= 0; i--) {
				this.eventOverFunction(this.aViewMenuNode[i], false);
				this.hideMenuGroup(this.aViewMenuGroup[i+1]);
			}
			this.aViewMenuNode.length = 0;
			this.aViewMenuGroup.length = 1;
			
			if(arguments.length == 0) {
				this.sOpenGroupId = null;
				this.sOverNodeId = null;
				this.aDefaultOpenGroup.length = 0;
			} else {
				this.sOverNodeId = (nIndex > -1) ? sGroupId + "." + nIndex : null;
				this.sOpenGroupId = (sGroupId == this.sTopGroupId) ? null : sGroupId;
			
				// »õ sOverNode ¿¡ Event Detach (¼­ºê±×·ìÀÌ ¾øÀ»¶§-ÃÖÇÏÀ§¸Þ´ºÀÏ¶§¸¸ event detach)
				if(this.sOverNodeId && !this.oMapperNodeGroup[this.sOverNodeId]) {
					var elNode = this.oMenuNodeInstance[this.sOverNodeId]["elMenuNode"];
					this.evtOver[this.sOverNodeId].detach(elNode, "mouseover");
					this.evtClick[this.sOverNodeId].detach(elNode, "click");
					this.eventOverFunction(this.sOverNodeId, true);
				}
				this.initDefaultMenu();
			}
		},

		/*
		 * //consoleLog Ã³¸®ÇÔ¼ö
		 */
		console : function() {
			var tmp = "";
			for(var i = 0; i < arguments.length; i++) {
				tmp += arguments[i];
			}
			$("console").innerHTML = tmp + "<br>" + $("console").innerHTML;;
		}
	});

	this.cMenuManager = cMenuManager;
}
