	var sysMenu = new Array();
	sysMenu[0]=[['È¨À¸·Î °¡±â',0,'/'],['·Î±×ÀÎ',1,'get_auth_log(1)'],['È¸¿ø°¡ÀÔ',1,'get_auth_log(2)'],['·Î±×¾Æ¿ô',1,'get_auth_log(0)'],['¸¶ÀÌÆäÀÌÁö °¡±â',0,'/mypage/'],['Àå¹Ù±¸´Ï °¡±â',1,'go_shop("/mall/cart.asp")'],['Âò¸ñ·Ï °¡±â',1,'go_shop("/mypage/wish_list.asp")'],['ÁÖ¹®/¹è¼Û Á¶È¸',0,'/mypage/delivery.asp']];

	var sysGoods = new Array();
	sysGoods[0]=[['°¡¹æ&Á¤¸®¿ëÇ°',11],['¿©Çà¼ÒÇ°',12],['¿©Çà¿ë Àü±â¿ëÇ°',13],['ÆíÀÇ, ¾ÈÀü¿ëÇ°',14],['À§»ý,ºäÆ¼ ¾ÆÀÌÅÛ',15,],['¿©Çàµµ¼­&Áöµµ',16]];



	var check_win_dim = function(){
		$modalTarget = $('#wrapper');

		if($('#wrapper_modal').width() != null){
			pos_modal();
		}
	}

	function init_menu(){
		$(window).resize(check_win_dim);
		$(window).scroll(check_win_dim);
		$(document).focusin(bluring);

		$('#head_top').click(function(event){
			var vTarget = $(event.target);
			var vCat = vTarget.attr('cat');
			var vAct = vTarget.attr('act');

			if(vCat == 0){
				var vType = sysMenu[vCat][vAct][1];
				if(vType == 0){location.href= sysMenu[vCat][vAct][2]}
				else{
					var fncObj = eval(sysMenu[vCat][vAct][2]);
					fncObj
				}
			}
		});

		$('#head_home').click(function(){
			location.href = '/';
		});
		
		$('#head_search dd.sb_b').click(function(){
			if($('#search_key').val().length < 1){
				alert('°Ë»ö¾îÀ» ÀÔ·ÂÇÏ¿© ÁÖ¼¼¿ä.');
				$('#search_key').focus();
			}
			else if($('#search_key').val().length > 20){
				alert('°Ë»ö¾î´Â 20ÀÚ ÀÌ³»·Î ÇÏ¿© ÁÖ¼¼¿ä.');
				$('#search_key').val('');
				$('#search_key').focus();
			}
			else{
				location.href = '/search/default.asp?search_key=' + escape($('#search_key').val());
			}
		});

		var vFadeS = 400;

		$('#main_menu dd.menu1').bind({
			click: function(e){
				var vType = $(this).attr('type');
				var vFlag = $(this).attr('act');
				act_main(vFlag, vType);
			},
			mouseover: function(e){
				var $vT = $('#main_menu_hover div.menu1');
				$vT.fadeIn(vFadeS);	
			},
			mouseleave: function(e){
				var $vT = $('#main_menu_hover div.menu1');
				$vT.fadeOut(vFadeS);	
			}
		});

		$('#main_menu dd.menu2').bind({
			click: function(e){
				var vType = $(this).attr('type');
				var vFlag = $(this).attr('act');
				act_main(vFlag, vType);
			},
			mouseover: function(e){
				var $vT = $('#main_menu_hover div.menu2');
				$vT.fadeIn(vFadeS);	
			},
			mouseleave: function(e){
				var $vT = $('#main_menu_hover div.menu2');
				$vT.fadeOut(vFadeS);	
			}
		});

		$('#main_menu dd.menu3').bind({
			click: function(e){
				var vType = $(this).attr('type');
				var vFlag = $(this).attr('act');
				act_main(vFlag, vType);
			},
			mouseover: function(e){
				var $vT = $('#main_menu_hover div.menu3');
				$vT.fadeIn(vFadeS);	
			},
			mouseleave: function(e){
				var $vT = $('#main_menu_hover div.menu3');
				$vT.fadeOut(vFadeS);	
			}
		});

		$('#main_menu dd.menu4').bind({
			click: function(e){
				var vType = $(this).attr('type');
				var vFlag = $(this).attr('act');
				act_main(vFlag, vType);
			},
			mouseover: function(e){
				var $vT = $('#main_menu_hover div.menu4');
				$vT.fadeIn(vFadeS);	
			},
			mouseleave: function(e){
				var $vT = $('#main_menu_hover div.menu4');
				$vT.fadeOut(vFadeS);	
			}
		});

		$('#main_menu dd.menu5').bind({
			click: function(e){
				var vType = $(this).attr('type');
				var vFlag = $(this).attr('act');
				act_main(vFlag, vType);
			},
			mouseover: function(e){
				var $vT = $('#main_menu_hover div.menu5');
				$vT.fadeIn(vFadeS);	
			},
			mouseleave: function(e){
				var $vT = $('#main_menu_hover div.menu5');
				$vT.fadeOut(vFadeS);	
			}
		});

		$('#main_menu dd.menu6').bind({
			click: function(e){
				var vType = $(this).attr('type');
				var vFlag = $(this).attr('act');
				act_main(vFlag, vType);
			},
			mouseover: function(e){
				var $vT = $('#main_menu_hover div.menu6');
				$vT.fadeIn(vFadeS);	
			},
			mouseleave: function(e){
				var $vT = $('#main_menu_hover div.menu6');
				$vT.fadeOut(vFadeS);	
			}
		});

		$('#main_menu dd.menu7').bind({
			click: function(e){
				var vType = $(this).attr('type');
				var vFlag = $(this).attr('act');
				act_main(vFlag, vType);
			},
			mouseover: function(e){
				var $vT = $('#main_menu_hover div.menu7');
				$vT.fadeIn(vFadeS);	
			},
			mouseleave: function(e){
			var $vT = $('#main_menu_hover div.menu7');
				$vT.fadeOut(vFadeS);	
			}
		});

		$('li.foot_announce dl').click(function(e){
			var $FB = $(e.target);
			var vText = '';
			if($FB.attr('code') == '1'){
				location.href = '/counter/aboutus.asp';
			}
			else if($FB.attr('code') == '2'){
				set_modal(700, 550,'m_terms_member')
				$.ajax({
					type: 'GET',
					url: '/counter/terms_member.xml',
					dataType: 'xml',
					success: function(objJSON){
						vText = objJSON.text;
						var regExp = /\n/;
						vText = vText.replace(/\n/g, '<BR/>');
						vText = vText.replace(/\r/g, '<BR/>');

						vText = '<center><span class="text_message_600">' + vText + '</span><span class="m_bt_close" onclick="close_modal()"></span>';
						$('#modal_content').html(vText);
					}
				});
			}
			else if($FB.attr('code') == '3'){
				set_modal(700, 550,'m_terms_mall')
				$.ajax({
					type: 'GET',
					url: '/counter/terms_mall.xml',
					dataType: 'xml',
					success: function(objJSON){
						vText = objJSON.text;
						var regExp = /\n/;
						vText = vText.replace(/\n/g, '<BR/>');
						vText = vText.replace(/\r/g, '<BR/>');

						vText = '<center><span class="text_message_600">' + vText + '</span><span class="m_bt_close" onclick="close_modal()"></span>';
						$('#modal_content').html(vText);
					}
				});
			}
			else if($FB.attr('code') == '4'){
				set_modal(700, 550,'m_privacy');

				$.ajax({
					type: 'GET',
					url: '/counter/privacy.xml',
					dataType: 'xml',
					success: function(objJSON){
						vText = objJSON.text;
						var regExp = /\n/;
						vText = vText.replace(/\n/g, '<BR/>');
						vText = vText.replace(/\r/g, '<BR/>');

						vText = '<center><span class="text_message_600">' + vText + '</span><span class="m_bt_close" onclick="close_modal()"></span>';
						$('#modal_content').html(vText);
					}
				});
			}
			else if($FB.attr('code') == '5'){
				window.open('http://www.hanaescrow.com/hnbecc/serviceJoinSrchManagement/escser003l.jsp?shopBsnNo=2028153591&mid=ESmyswissc','winHana', 'width=640, height=500, scrollbars=yes,status=no,resizable=yes');
			}
			else if($FB.attr('code') == '6'){
				set_modal(700, 550,'m_MailToMaster')
			}
		});
	}

	function get_auth_log(flag){
		if(flag==0){
			$.getJSON('/system/json/member/logout.asp', function(data) {
				location.href = location.href
			});
		}
		else{
			var vQ = '?path=' + escape(location.pathname) + '&query=' + escape(location.search)
			if(flag==2){
				location.href = '/member/join_find.asp' + vQ
			}
			else{
				location.href = '/member/login.asp' + vQ
			}
		}
	}

	function go_shop(flag){
		var vQ = '?path=' + escape(location.pathname) + '&query=' + escape(location.search)
		location.href = flag+vQ
	}

	function act_main(vFlag, vType){
		if (vType==0){
			location.href = '/mall/display.asp?cat=' + sysGoods[0][vFlag][1];
		}
		else if(vType==1){
			location.href = '/customer/';
		}
	}

	function go_home(){
		location.href = '/';
	}

	function go_refresh(){
		location.href = location.href;
	}

function board_submenu(){
	var vText = '<ul id="sub_menu">';
	vText += '<li url="notice_list.asp">NEWS &amp; NOTICE</li>';
	vText += '<li url="question_list.asp">SHOPPING QnA</li>';
	vText += '<li url="faq.asp">FAQ</li>';
/*	vText += '<li url="review_list.asp">REVIEW</li>';*/
	vText += '</ul>';

	$('#sub_menu').html(vText);
}

function patrol_board_submenu(){
	$('#sub_menu li').click(function(){
		location.href = $(this).attr('url');
	});
}

