///////////////// Firefox 버그
// FireFox suggest버그 수정을 위한 플러그 코드 
(function($) {
	$.FFInputBoxFix = {
		startWatch: function() {
			 focusFunc();
		}	
	}
	
	
	$.fn.FFInputBoxFix = function(suggestIframeId) {
		if (jQuery.browser.mozilla == false)
			return false;

		var db = "";
		var keyEventId = null;
		var inputTextId = $(this).attr("id");
		var suggestId = suggestIframeId;
		$(this).bind("focus", focusFunc);
		$(this).bind("blur", blurFunc);

		this.keyEventCheck = null;
		focusFunc();

		function focusFunc() {
			if (keyEventId != null)
				clearTimeout(keyEventId);
				
			keyEventId = setTimeout(function() {
				checkInputText()
			}, 250);

		}
		function blurFunc() {
			if (keyEventId != null)
				clearTimeout(keyEventId);
		}
		
		function checkInputText() {
			//console.log(new Date()+"------"+ 11111);
			inputSearchKeywordBox = $("#"+inputTextId);
			if (db != $(inputSearchKeywordBox).val() && $(inputSearchKeywordBox).val() != "") {
				var suggestObj = $("#"+suggestId).contents();
				if ($('div.autoComp li a.suggestHover', suggestObj).length <= 0) {
					
					// 트리거 발생..
					var event = jQuery.Event("keyup");
					event.keyCode = -1;
					$(inputSearchKeywordBox).trigger(event);
					
					//db에다가 저장..
					db = $(inputSearchKeywordBox).val();
				}
			}
			// 타이머 초기화
			clearTimeout(keyEventId);
			// 재귀호출
			keyEventId = setTimeout(
						function() {
							checkInputText();
						}, 250);
		}	
	}	
})(jQuery);




////////////////////////////////////////
// Search Text Event

var shBanners = [['http://member.about.co.kr/Information/WhatIsAbout.aspx', 'open', 'rgb(98, 106, 217)', ''],
								 ['http://member.about.co.kr/Information/WhatIsAbout.aspx', 'open', 'rgb(98, 106, 217)', '']];

var shBannerIndex = 0;
var lpPage = "http://finding.about.co.kr/Category/List.aspx?DisplayCategories=";
var srpPage = "http://finding.about.co.kr/Search/Search.aspx?istop=y&Keyword=";
var departmentPage = "http://finding.about.co.kr/Corner/Department/List.aspx?displayCategories=";
var luxuryPage = "http://finding.about.co.kr/Corner/Luxury/List.aspx?displayCategories=";
var overSeaPage = "http://finding.about.co.kr/Corner/Overseas/List.aspx?displayCategories=";
var cppPage = "http://finding.about.co.kr/Category/CPP.aspx?DisplayCategories=";
var gAboutTic = 0; // 우측배너 전역변수

	
var serviceItems = [
	{	"serviceType":"0",
		"serviceItem":[
			{
				"itemName": "휴대폰",	"cssClass" : "sv_0101",	"linkUrl" : srpPage + "휴대폰"										
			},
			{
				"itemName": "노트북/넷북",	"cssClass" : "sv_0102",	 "linkUrl" : srpPage + "노트북"				
			},
			{
				"itemName": "디지털카메라",	"cssClass" : "sv_0103",	"linkUrl" : srpPage + "디지털카메라"
			}				
		]
	},
		{
			"serviceType":"2",
			"serviceItem":[
				{
					"itemName": "클럽엣지",	"cssClass" : "sv_0201",	"linkUrl" : "http://finding.about.co.kr/corner/topfashion/main.aspx"								
				},
				{
					"itemName": "패션엣",	"cssClass" : "sv_0202",	"linkUrl" : "http://finding.about.co.kr/Corner/SShop/Main.aspx"				
				}				
			]
		},
		{
			"serviceType":"0",
			"serviceItem":[
				{
					"itemName": "분유",	"cssClass" : "sv_0301",	"linkUrl" : srpPage + "분유"									
				},
				{
					"itemName": "기저귀",	"cssClass" : "sv_0302",	"linkUrl" : srpPage + "기저귀"
				},
				{
					"itemName": "유모차",	"cssClass" : "sv_0303",	"linkUrl" : srpPage + "유모차"				
				}				
			]
		},
		{
			"serviceType":"2",
			"serviceItem":[
				{
					"itemName": "백화점",	"cssClass" : "sv_0401", "linkUrl" : "http://finding.about.co.kr/Corner/Department/DepartmentMain.aspx"									
				},
				{
					"itemName": "명품",	"cssClass" : "sv_0402",	"linkUrl" : "http://finding.about.co.kr/Corner/Luxury/LuxuryMain.aspx"				
				},
				{
					"itemName": "해외쇼핑",	"cssClass" : "sv_0403",	"linkUrl" : "http://finding.about.co.kr/Corner/Overseas/Main.aspx"				
				}				
			]
		},
		{
			"serviceType":"0",
			"serviceItem":[
				{
					"itemName": "타이어",	"cssClass" : "sv_0501",	"linkUrl" : srpPage + "타이어"									
				},
				{
					"itemName": "네비게이션",	"cssClass" : "sv_0502",	"linkUrl" : srpPage + "네비게이션"									
				},
				{
					"itemName": "골프클럽","cssClass" : "sv_0503","linkUrl" : srpPage + "골프"				
				}				
			]
		}
];



function shBannerChange() {
	var istop = GetUrlParamVal("istop");
	if (istop != "y") {
		var tnum;
		if(typeof(gAboutSearchAD) != 'undefined' && gAboutSearchAD.length>0)
		{
			tnum = Math.floor(Math.random() * gAboutSearchAD.length);
			//$("#htxtHeaderSearch").css("color", shBanners[tnum][2]);
			$("#htxtHeaderSearch").css("color", 'rgb(98, 106, 217)' );
			$("#htxtHeaderSearch").css("font-family", "Dotum,돋움,Gulim,굴림");
			$("#htxtHeaderSearch").css("font-style", "normal");
			$("#htxtHeaderSearch").css("font-variant", "normal");
			$("#htxtHeaderSearch").css("font-weight", "normal");
			$("#htxtHeaderSearch").css("font-size", "12px");
			$("#htxtHeaderSearch").css("line-height", "30px");
			$("#htxtHeaderSearch").css("font-size-adjust", "none");
			$("#htxtHeaderSearch").css("font-stretch", "normal");
			$("#htxtHeaderSearch").css("-x-system-font", "none");
			$("#htxtHeaderSearch").val(gAboutSearchAD[tnum].title);
	
			$("#hbtnHeaderSearch").unbind("click");
			$("#hbtnHeaderSearch").click(function() {
					window.open(gAboutSearchAD[tnum].linkUrl,'','');			
			});
		}
		else
		{
			tnum = Math.floor(Math.random() * shBanners.length);
			$("#htxtHeaderSearch").css("color", shBanners[tnum][2]);
			$("#htxtHeaderSearch").css("font-family", "Dotum,돋움,Gulim,굴림");
			$("#htxtHeaderSearch").css("font-style", "normal");
			$("#htxtHeaderSearch").css("font-variant", "normal");
			$("#htxtHeaderSearch").css("font-weight", "normal");
			$("#htxtHeaderSearch").css("font-size", "12px");
			$("#htxtHeaderSearch").css("line-height", "30px");
			$("#htxtHeaderSearch").css("font-size-adjust", "none");
			$("#htxtHeaderSearch").css("font-stretch", "normal");
			$("#htxtHeaderSearch").css("-x-system-font", "none");
			$("#htxtHeaderSearch").val(shBanners[tnum][3]);

        	/*	
            // 20120126 어바웃 소개 페이지 삭제로 링크 삭제
            
			$("#hbtnHeaderSearch").unbind("click");
			$("#hbtnHeaderSearch").click(function() {
			
			
			if (shBanners[tnum][1] != "open") {
			top.document.location.href = shBanners[tnum][0];
			}
			else {
			window.open(shBanners[tnum][0],'','scrollbars=no,fullscreen=yes,toolbar=no,directories=yes,status=yes,status=yes,top=0,resizable=no');
	
				}
			
			});
			*/
		}
	}
} 



////////////////////////////////////////
// SSL 인증
var locationProtocol = document.location.protocol + "//";
////////////////////////////////////////

// 인기 검색어
var searchRanking = '';

// 인기 검색어 Link 생성
GenSearchRankingStr();

// 버튼 이벤트
$(document).ready(function()
{
	var $f = $("#suggestIframe_ass");
	
	if(locationProtocol == "http://")
	{
		if( typeof($f[0]) != 'undefined')
		{
			var fd = $f[0].contentWindow;
				
			// 검색어 이벤트 처리.. 
			$("#htxtHeaderSearch").keyup(
				function(e){
					if(typeof(fd.txtHeader_Keyup)!="undefined")
						fd.txtHeader_Keyup(e);  // run function
				}
			)
		}
	}
	
	$('#htxtHeaderSearch').FFInputBoxFix("suggestIframe_ass");
	//if (jQuery.browser.mozilla == true){	$('#htxtHeaderSearch').focusFunc(); };
	
	$("#hbtnHeaderSearch").click(function()
	{
		TopHeader.hbtnHeaderSearchClick();
	});

	$("#htxtHeaderSearch").focus(function(e)
	{
		var istop = GetUrlParamVal("istop");

		if (istop.toLowerCase() != "y") {
			$("#htxtHeaderSearch").val("");
		}

		$("#htxtHeaderSearch").css("color", "");
		$("#htxtHeaderSearch").css("font-family", "");
		$("#htxtHeaderSearch").css("font-style", "");
		$("#htxtHeaderSearch").css("font-variant", "");
		$("#htxtHeaderSearch").css("font-weight", "");
		$("#htxtHeaderSearch").css("font-size", "");
		$("#htxtHeaderSearch").css("line-height", "");
		$("#htxtHeaderSearch").css("font-size-adjust", "");
		$("#htxtHeaderSearch").css("font-stretch", "");
		$("#htxtHeaderSearch").css("-x-system-font", "");

		$("#hbtnHeaderSearch").unbind("click");
		$("#hbtnHeaderSearch").click(function()
		{
			TopHeader.hbtnHeaderSearchClick();
		});
	});

	$("#htxtHeaderSearch").keyup(function(e)
	{
		var searchValue = jQuery.trim($("#htxtHeaderSearch").val());

		if (e.keyCode == 13) {
			TopHeader.hbtnHeaderSearchClick();
		}		
	});

	$("#htxtHeaderSearch").click(function(event)
	{
		// To Do : 검색창 클릭시 검색어를 삭제하지 않고 전체선택을 해줌.
		//         focus -> click순으로 일어나 focus에서 선택을 해놓으면 safari계열에서 선택이 풀리는 경향이 있어 click에 검색을 선택하도록 함.
//		keyword = $.trim(this.value); 

//		if (keyword != "" && keyword.length > 0) {
//			this.select();
//		}

		return false;
	});

	// document 를 클릭시 사이즈를 줄여준다.
	$(document).click(function(obj)
	{
		if (document.getElementById("suggestIframe_ass") != null) {
			document.getElementById("suggestIframe_ass").style.height = "0px";
		}
	});

	if(headerType != "S")
	{
		shBannerChange();
	}

});

// 인기 검색어 Link 생성
function GenSearchRankingStr()
{
	try
	{
		for(i = 0; i < keywordRankingJSON.RankingItem.length; i++)
		{
			if(searchRanking.length == 0)
			{
				searchRanking = GenLinkStr(keywordRankingJSON.RankingItem[i].keyword);
			}
			else
			{
				searchRanking += ", " +  GenLinkStr(keywordRankingJSON.RankingItem[i].keyword);
			}

		}
	}
	catch (e)
	{
		searchRanking = '';
	}

}

// 인기검색어 Link 문자열 생성
function GenLinkStr(keyword)
{
	var returnValue = "<a href='" + "http://finding.about.co.kr/Search/Search.aspx?istop=y&Keyword=" + encodeURIComponent(keyword) + "' target='_top'>" + keyword + "</a>";
	return returnValue;
}

// 즐겨찾기 추가
function addfavorite() {
	window.external.AddFavorite('http://www.about.co.kr', 'about');
}

function TopHeader() { }

TopHeader.hbtnHeaderSearchClick = function() {
	var searchValue = jQuery.trim($("#htxtHeaderSearch").val());

	if (searchValue.length > 0) {
		top.document.location.href = "http://finding.about.co.kr/Search/Search.aspx?istop=y&Keyword=" + encodeURIComponent(searchValue);
	}
	else {
		alert("검색어를 입력해주세요");
		$("#htxtHeaderSearch").focus();
		return false;
	}
}


///////////////////////////////////////////////////////////////////////////////////////////////////////////
//검색키워드값 추출(url 내 istop = y 파라메터로 헤더에서 키워드 검색여부 추측)
function GetUrlParamVal(name) {

	var keyWord = "";
	try {
		var keyWordname = (name != "") ? name : "keyword";

		var isTop = false;
		var urlString = new String(window.location);
		var markLocation = urlString.search(/\?/);

		if (markLocation != -1) {

			urlString = urlString.substr(markLocation + 1);
			var paramArray = urlString.split(/&/g); 
			for (var i = 0; i < paramArray.length; i++) {

				var arrayValue = paramArray[i].split(/=/);
				if ((keyWordname == "istop") && (arrayValue[0].toLowerCase() == keyWordname.toLowerCase())) {
					keyWord = arrayValue[1].toLowerCase().replace("#keyword", "");
				}
				else if ((keyWordname != "istop") && (arrayValue[0].toLowerCase() == keyWordname.toLowerCase())) {
					//keyWord = decodeURIComponent(arrayValue[1].toLowerCase()).replace("#keyword", "");  // 공백이들어갈 자리에 + 기호가 나오는 현상 보정 by 이동열(2011.1.4)
					keyWord = decodeURIComponent(arrayValue[1].toLowerCase().replace(/\+/g, ' ')).replace("#keyword", ""); 
				} 
			}
		}
	}
	catch (e) { 
		keyWord = "";
	}

	return keyWord;
}
 
///////////////////////////////////////////////////////////////////////////////////////////////////////////

TopHeader.setNavigationTab = function(headerType) {

    //검색어Search와 자동완성기능(Suggest.htm)에서 쓰임 
    var istop = GetUrlParamVal("istop");
    var keyWord = ((istop == "y") ? GetUrlParamVal("keyword") : "");

    //0건 검색결과 재검색에 대한 키워드 처리.
    if (GetUrlParamVal("isZeroResultRetry") == "true") {
        keyWord = GetUrlParamVal("userTypedKeyword");
    }

    var retValue = '';
    var loginLinkUrl = "";

    if (location.href.toLowerCase().indexOf("member.about.co.kr/login") < 0)	//로그인 후 로그인 페이지로 Redirect되는 것을 방지.
    {
        loginLinkUrl = encodeURIComponent(location.href);
    }
    else {
        loginLinkUrl = "";
    }

    // 모든페이제서 공통 헤더 스크립트를 쓴다.. 
    // 분기탈 내용이 있으면 (headerType == "H" --> Home , headerType == "H" --> PCP , headerType == "A" --> otherPage로 세팅)

    // 실제 날보다 하루 많게 세팅했음.. 주의
    // 그리고 new Date()는 한달 적게 나옵니다. 주의 하시길.. 
    var nowYear = new Date().getFullYear();
    var nowMonth = new Date().getMonth() + 1;
    var nowDay = new Date().getDate();
    var dateTimeNow = new Date();

    dateTimeNow.setFullYear(nowYear, nowMonth, nowDay);

    var worldcupFinal = new Date().setFullYear(2010, 7, 12);

    retValue += '<div id="headerSZ3">';
    retValue += '	<div class="hsz_in">';
    retValue += '		<div class="hsz_inner" id="hsz_inner">';
    retValue += '			<!-- IE 이외의 브라우저 플래시 플러그인 설치 알림 -->';
    retValue += '			<div id="flashPluginContainer" style="position:absolute; width:0; height:0px; left:0px; top:0px; border:0px solid black;">';
    retValue += '				<embed src="' + locationProtocol + 'pics.about.co.kr/os2/flash/flashPlugin.swf" wmode="transparent" quality="high" width="0" height="0" name="flashPluginSwf" align="middle" allowScriptAccess="always" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';
    retValue += '			</div>';
    retValue += '			<!-- IE 이외의 브라우저 플래시 플러그인 설치 알림 -->';
    retValue += '			<!-- topN Start -->';
    retValue += '			<div class="topN">';

    retValue += '		<div id="aboutLogoDiv" class="logoArea" > ';
    retValue += '			<h1>about shopping search</h1>  ';

    //alert(aboutCiBanner);
    if (typeof (aboutCiBanner) == 'undefined') {
        retValue += '	<div class="ci_area" id="ci_img">\n';
        retValue += ' <a href="http://www.about.co.kr"><img src="' + locationProtocol + 'pics.about.co.kr/os2/common/header_sz3/logo_big.gif" alt="about" title="" /></a>';
        retValue += ' </div>';
    }
    else {
        if (aboutCiBanner.imageType == "0") {
            retValue += '	<div class="ci_area" id="ci_img">\n';
            retValue += ' <a href="http://www.about.co.kr"><img src="' + locationProtocol + aboutCiBanner.imageUrl.replace('http://', '') + '" alt="about" title="" /></a>';
            retValue += ' </div>';

        }
        else if (aboutCiBanner.imageType == "1") {
            retValue += '	<div class="ci_area" id="ci_flash">\n';
            retValue += '	    <script type="text/javascript"> \n';
            retValue += '     var ciflashvars={ \n';
            retValue += '     // link  :  배너 클릭 시 이동할 링크 url \n';
            retValue += '     // target : 배너 클릭 시 이동할 링크 target \n';
            retValue += '     link : \'http://www.about.co.kr\', \n';
            if (headerType == "H") {
                retValue += '		type : "main",';
            }
            else {
                retValue += '		type : "sub",';
            }
            retValue += '     target : \'_top\' \n';
            retValue += '     }; \n';
            retValue += "     embedFlash('" + locationProtocol + aboutCiBanner.imageUrl.replace('http://', '') + "', 'ci_flash', '100%', '100%', \"opaque\", ciflashvars); \n";
            retValue += '    <\/script>\n';
            retValue += '   <\/div>\n';
        }
        else {
            var hCiHtml = aboutCiBanner.htmlContents.replace("[%=이미지%]", locationProtocol + aboutCiBanner.imageUrl.replace('http://', ''));
            hCiHtml = hCiHtml.replace("[%=링크%]", aboutCiBanner.linkUrl);
            retValue += hCiHtml;
        }
    }
    retValue += '							</div> ';



    retValue += '				<!-- topmenuN Start -->                                                                 ';
    retValue += '				<div class="topmenuN">                                                                  ';
    if (!loginCheck) {
        retValue += '	<ul> ';
        retValue += '		<li class="login"><a href="https://member.about.co.kr/login/login.aspx?next_url=' + loginLinkUrl + '" target="_top" ><span class="vNone">로그인</span></a></li>  ';
        retValue += '		<li><a href="https://member.about.co.kr/SignUp/MemberJoinIntro.aspx" target="_top" >회원가입</a></li> ';
        retValue += '		<li><a href="http://member.about.co.kr/MyBuy/default.aspx" target="_top" >about me</a></li> ';
        retValue += '		<li class="last"><a href="http://member.about.co.kr/CustomerCenter/Default.aspx" target="_top" >고객센터</a></li> ';
        retValue += '	</ul> ';
    }
    else {
        retValue += '	<ul id="aboutLoginInfo"> ';
        retValue += '		<li class="logout"><a href="http://member.about.co.kr/login/logout.aspx" target="_top" ><span class="vNone">로그아웃</span></a></li> ';
        retValue += '		<li><a href="https://member.about.co.kr/MyBuy/MyInfo/MyInfoConfirmPwd.aspx" target="_top">회원정보수정</a></li> ';
        retValue += '		<li><a href="http://member.about.co.kr/MyBuy/default.aspx" target="_top">about me</a></li> ';
        retValue += '		<li class="last"><a href="http://member.about.co.kr/CustomerCenter/Default.aspx" target="_top">고객센터</a></li> ';
        retValue += '	</ul> ';
        retValue += '<iframe src="' + locationProtocol + 'member.about.co.kr/login/GetMembIdForHeader.aspx" style="display:none"></iframe>'
    }

    retValue += '				</div>                                                                                  ';
    retValue += '				<!-- topmenuN End -->                                                                   ';
    retValue += '				<!-- browserOpt Start -->                                                               ';
    retValue += '				<div class="browserOpt">                                                                ';
    retValue += '					<dl>                                                                                  ';
    retValue += '						<dt><span class="vNone">어바웃</span></dt>                                          ';
    retValue += '						<dd class="hotkey"><a onclick="HeaderCorner.shortCut();" style="cursor:pointer"><span class="vNone">바로가기</span></a></dd>         ';
    retValue += '						<dd class="bookmarker"><a onclick="HeaderCorner.addFavorite()" style="cursor:pointer;" ><span class="vNone">즐겨찾기</span></a></dd>     ';
    retValue += '					</dl>                                                                                 ';
    retValue += '				</div>																																									';
    retValue += '				<!-- browserOpt End -->';
    retValue += '				<!-- 검색바 -->';
    retValue += '				<div class="searchArea">';
    retValue += '					<fieldset>';
    retValue += '						<legend>검색하기</legend>';
    retValue += '						<input type="text" id="htxtHeaderSearch" autocomplete="off" name="htxtHeaderSearch" class="input-box" value="' + keyWord + '" style="ime-mode:active;" /><!-- style="color:#000;font:bold 14px/1 Dotum,돋움,Gulim,굴림;" --> ';
    retValue += '						<img id="hbtnHeaderSearch" name="btnHeaderSearch" src="' + locationProtocol + 'pics.about.co.kr/os2/common/header_sz3/searchB_btn.gif" class="btn" alt="Search" title="검색"  style="cursor:pointer;"  /> ';
    retValue += '					</fieldset> ';
    retValue += '					<!-- 자동완성기능 --> ';
    if (locationProtocol == "http://") {
        retValue += '						<div id="suggestionLayer_ass" headerType="' + headerType + '" ><iframe id="suggestIframe_ass"    class="drop-layer" style="height:0px;" scrolling="no" frameborder="0" marginwidth="0" marginheight="0" allowtransparency="true" src="http://finding.about.co.kr/Search/suggest.htm"></iframe></div>';
    }
    //retValue += '					<iframe id="" src="/about/common/include/drop_layer_new.asp" class="drop-layer" style="display:none;height:500px;" scrolling="no" frameborder="0" marginwidth="0" marginheight="0" allowtransparency="true"></iframe> ';
    retValue += '					<!-- 자동완성기능 -->                                                                             ';
    retValue += '				</div>                                                                                              ';
    retValue += '				<!-- 검색바 -->  ';

    retValue += '				<!-- promoArea Start -->';
    retValue += '				<div class="promoArea" id="gnbEventBannerDiv">';
    // 우측 상단 광고 배너 영역	
    retValue += '				</div>';
    retValue += '				<!-- promoArea End -->';
    retValue += '			</div>';
    retValue += '			<!-- topN End -->';
    retValue += '			<!-- cornerLink Start -->';
    retValue += '			<div class="cornerLink"> ';
    retValue += '			</div> ';
    retValue += '			<!-- cornerLink End -->';
    retValue += '			<!-- couponLink Start -->';
    //retValue += TopHeader.getCouponList();
    retValue += '		<div class="tCoupon" onmouseover="TopHeader.couponTabOver(this)"  onmouseOut="TopHeader.couponTabOut(this)" > ';
    retValue += '		</div> ';
    retValue += '			<!-- couponLink End -->';

    // about pbp banner 노출
 
    retValue += ' <div class="bnrRateArea">';
    retValue += ' 	<dl>';
    retValue += '   	<dt><img src="' + locationProtocol + 'pics.about.co.kr/os2/common/bnr_rate/bnr_title2.gif" alt="어바웃특별할인" /></dt>';
    retValue += '     <dd>';
    retValue += '      </dd>';
    retValue += '     </dl>';
    retValue += '     <div class="btn-pn">';
    retValue += '      <a class="btn_prev"><span class="vnon">&lt;</span></a>';
    retValue += '      <a class="btn_next"><span class="vnon">&gt;</span></a>';
    retValue += '     </div>';
    retValue += '</div> ';
 
    // about pbp banner 노출


    retValue += '			<!-- cateList Start-->';
    retValue += '			<div class="cateList">';
    retValue += '				<!-- 카테고리 전체보기 -->';
    retValue += '				<div class="cateN">';
    retValue += '					<div class="catekeyList">';
    retValue += '						<h2 class="cTitle">';
    retValue += '							<span class="vNone">';
    retValue += '								카테고리 전체보기';
    retValue += '							</span>                                                                                       ';
    retValue += '						</h2>                                                                                           ';
    retValue += '						<div class="in-line"><!-- style="visibility:visible;" -->                                       ';
    // 카테고리 전체 보기 
    retValue += '						</div>';
    retValue += '					</div><!-- category End-->';
    retValue += '				</div>';
    retValue += '				<!-- 카테고리 전체보기 -->';

    retValue += '				<!-- hotcateList Start -->';
    retValue += '				<div class="hotcateList">';
    retValue += '					<div class="hcate hc1">';
    retValue += '						<h3><span class="vNone">디지털 가전 컴퓨터</span></h3>';
    // 디지털 가전 컴퓨터
    retValue += '					</div>';
    retValue += '					<div class="hcate hc2">';
    retValue += '						<h3><span class="vNone">의류 잡화 화장품</span></h3>';
    // 의류잡화 화장품
    retValue += '					</div>';
    retValue += '					<div class="hcate hc3">';
    retValue += '						<h3><span class="vNone">유아동 생활 가구</span></h3>';
    // 유아동 생활 가구
    retValue += '					</div>';
    retValue += '					<div class="hcate hc4">';
    retValue += '						<h3><span class="vNone">해외 명품 백화점</span></h3>';
    // 해외 명품 백화점
    retValue += '					</div>';
    retValue += '					<div class="hcate hc5">';
    retValue += '						<h3><span class="vNone">레저 자동차 취미</span></h3>';
    // 레저 자동차 취미
    retValue += '					</div> ';
    retValue += '				</div> ';
    retValue += '				<!-- hotcateList End --> ';
    retValue += '			</div> ';
    retValue += '			<!-- cateList End --> ';

    //gMenuLocation;

	//retValue += '			<!-- 퀵바이 플래시 버튼  --> ';
	//retValue += '			<div class="flashBtn" id="quickBuy2BtnDiv"> ';
	//retValue += '				<div id="quickBuyBtn"> ';
	//retValue += '					<script type="text/javascript"> ';
	//retValue += '						setTimeout(function(){ ';
	//// sty_detail_url           : 스타일검색 - 더보기 link URL
  //// sty_detail_target       : 스타일검색 - 더보기 link target
  //// sty_upload_url         : 스타일검색 - 직접스타일 올리기 link URL
  //// sty_upload_target     : 스타일검색 - 직접스타일 올리기 link target
  //// scaleWidth              : quickBuy의 width값 지정 ( document.getElementById("hsz_inner ").offsetWidth )
  //// name                      : quickBuy2Btn의 div id
  //
	//retValue += '				var flashvars={';
  //retValue += '        sty_detail_url : "http://finding.about.co.kr/Corner/StyleSearch/Main.aspx",';
  //retValue += '        sty_detail_target : "_self",';
  //retValue += '        sty_upload_url : "http://finding.about.co.kr/Corner/StyleSearch/StyleUpload.aspx",';
  //retValue += '        sty_upload_target : "_self",';
  //retValue += '        scaleWidth: document.getElementById("hsz_inner").offsetWidth,';
  //retValue += '        name : "quickBuy2BtnDiv"';
  //retValue += '        }; ';
  //
  //retValue += "						embedFlash('" + locationProtocol + "pics.about.co.kr/os2/flash/quickBuy3Btn.swf?date=20110816_1500', 'quickBuyBtn', '100%', '100%', \"transparent\", flashvars); ";
	//retValue += '						}, 10); ';
	//retValue += '					<\/script> ';
	//retValue += '				</div> ';
	//retValue += '			</div> ';
	//retValue += '			<!-- 퀵바이 플래시 버튼 --> ';
	retValue += '		<!-- hotService Start --> ';
	retValue += '		<div class="hotService"> ';
  retValue += '			<a href="http://finding.about.co.kr/Corner/StyleSearch/Main.aspx" target="_self" class="img_search"><span>이미지검색</span></a> ';
  retValue += '			<a href="http://finding.about.co.kr/Corner/SocialShopping/Main.aspx" target="_self" class="social_shopping"><span>소셜쇼핑</span></a> ';
    retValue += '			</div> ';
	retValue += '		<!-- hotService End --> ';
	
    retValue += '		</div> ';
    retValue += '		<!-- hsz_inner End --> ';
    retValue += '	</div>';
	//retValue += '	<!-- 퀵바이 플래시 --> ';
	//retValue += '	<div class="flashArea" id="quickBuyContainer"> ';
	//retValue += '		<div class="quickBuyLayout"> ';
	//retValue += '			<div id="quickBuySwf"> ';
	//retValue += '				<script type="text/javascript"> ';
	//retValue += '					setTimeout(function(){ ';
	//retValue += '						var flashvars={ ';
	//retValue += '							quickbuy_xml_url: "http://pics.about.co.kr/os2/flash/data/newQuickBuy2XmlData_111027.xml", ';
	////retValue += '							quickbuy_pr_xml_url: "http://is.iabout.kr/w/flash/QuickBuyPRXmlData.xml",';
	//retValue += '							scaleWidth: document.getElementById("hsz_inner").offsetWidth ';
	//retValue += '							}; ';
	//retValue += "						embedFlash('" + locationProtocol  + "pics.about.co.kr/os2/flash/quickBuy3.swf?date=20110318_1500', 'quickBuySwf', '100%', '100%', \"opaque\", flashvars); ";
	//retValue += '					}, 10); ';
	//retValue += '				<\/script>';
	//retValue += '			</div>';
	//retValue += '		</div> ';
	//retValue += '	</div>';
	//retValue += '	<!-- 퀵바이 플래시 -->     '; 
	
	retValue += '</div><!-- headerSZ3 End --> ';
  
	return retValue;
} 

// 로그인 팝업 띄위기
TopHeader.loginPopUp= function()
{
	var popUrl = 'https://member.about.co.kr/Login/LoginPop.aspx';//?next_url=?next_url=' + linkurl; 
	window.open(popUrl, "", "toolbar=no,location=yes,directories=no,status=no,menubar=no,scrollbars=no, resizable=no,copyhistory=no ,width=1188 height=880, left=10,top=10");
	
}


  
TopHeader.setSocialShoppingGNB = function(headerType) {

	//검색어Search와 자동완성기능(Suggest.htm)에서 쓰임 
	var istop = GetUrlParamVal("istop");
	var keyWord = ((istop == "y") ? GetUrlParamVal("keyword") : "");
	

	var retValue = '';
	var loginLinkUrl = "";

	if (location.href.toLowerCase().indexOf("member.about.co.kr/login") < 0)	//로그인 후 로그인 페이지로 Redirect되는 것을 방지.
	{
		loginLinkUrl = encodeURIComponent(location.href);
	}
	else {
		loginLinkUrl = "";
	}
	
	
	retValue += '		<!-- socialTop Start --> ';
	retValue += '		<div id="socialTop"> ';
	retValue += '			<div class="inner"> ';
	retValue += '				<h1><a href="http://www.about.co.kr"><img src="' + locationProtocol + 'pics.about.co.kr/os2/social_cms/logo_about.gif" alt="about" /></a></h1> ';
	retValue += '				<div class="searchArea"> ';
	retValue += '					<fieldset> ';
	retValue += '						<legend>어바웃 검색하기</legend> ';
	retValue += '						<input type="text"  id="htxtHeaderSearch" autocomplete="off" name="htxtHeaderSearch" class="input-text" /> ';
	retValue += '						<img  id="hbtnHeaderSearch" name="btnHeaderSearch" src="' + locationProtocol + 'pics.about.co.kr/os2/social_cms/btn_search.gif" alt="Search" title="검색"  style="cursor:pointer;"  /> ';
	retValue += '					</fieldset> ';
	retValue += '				</div> ';
	retValue += '				<div class="topmenuN"> ';
	if (!loginCheck) {
		//retValue += '	<ul> ';
		//retValue += '		<li class="login"><a href="https://member.about.co.kr/login/login.aspx?next_url=' + loginLinkUrl + '" target="_top" ><span class="vNone">로그인</span></a></li>  ';
		//retValue += '		<li><a href="https://member.about.co.kr/SignUp/MemberJoinIntro.aspx" target="_top" >회원가입</a></li> ';
		//retValue += '		<li><a href="http://member.about.co.kr/MyBuy/default.aspx" target="_top" >about me</a></li> ';
		//retValue += '		<li class="last"><a href="http://member.about.co.kr/CustomerCenter/Default.aspx" target="_top" >고객센터</a></li> ';
		//retValue += '	</ul> ';
		retValue += '			<ul> ';
		retValue += '				<li class="login"><a style="cursor:pointer;" onclick="TopHeader.loginPopUp()" target="_blank" >로그인</a></li> ';
		retValue += '				<li><a href="https://member.about.co.kr/SignUp/MemberJoinIntro.aspx" target="_top" >회원가입</a></li> ';
		retValue += '				<li><a href="http://member.about.co.kr/CustomerCenter/Default.aspx" target="_top" >고객센터</a></li> ';
		retValue += '			</ul> ';
	}
	else {
		retValue += '	<ul id="aboutLoginInfo"> ';
		retValue += '		<li class="logout"><a href="http://member.about.co.kr/login/logout.aspx" target="_top" >로그아웃</a></li> ';
		retValue += '		<li><a href="https://member.about.co.kr/MyBuy/MyInfo/MyInfoConfirmPwd.aspx" target="_top">회원정보수정</a></li> ';
		retValue += '		<li><a href="http://member.about.co.kr/MyBuy/default.aspx" target="_top">about me</a></li> ';
		retValue += '		<li class="last"><a href="http://member.about.co.kr/CustomerCenter/Default.aspx" target="_top">고객센터</a></li> ';
		retValue += '	</ul> ';
		retValue += '<iframe src="' + locationProtocol + 'member.about.co.kr/login/GetMembIdForHeader.aspx" style="display:none"></iframe>'
	}
	
	retValue += '				</div> ';
	retValue += '			</div> ';
	retValue += '		</div> ';                  
	retValue += '		<!-- socialTop End --> ';	
    return retValue;
}




TopHeader.getSubDiv = function( cateItem , linkType)
{ 
	//"00" --> lpPage , "25" --> departmentPage  , '18' --> luxuryPage , 20 --> overSeaPage
		if(typeof(linkType) == 'undefined' || linkType == '')
			linkType = "00";

		var retValue = new String();
		// 서브 카테 시작 
		retValue += '<div class="cateSList-sub">';
		retValue += '<div class="box">';
		retValue += '<div class="outline top"></div>';
		retValue += '<ul class="sin-line">';
		for (idx = 0; idx < cateItem.length; idx++) { 
			//alert(cateItem[idx][2]);
			retValue += "<li>";
			if( linkType == "25")
			{
				retValue += '<a href="' + departmentPage + cateItem[idx][0] +'" target="_top" ><span>' + cateItem[idx][1] + '</span></a>';
			}
			else if( linkType == "18")
			{
				retValue += '<a href="' + luxuryPage + cateItem[idx][0] +'" target="_top" ><span>' + cateItem[idx][1] + '</span></a>';
			}
			else if( linkType == "20")
			{
				retValue += '<a href="' + overSeaPage + cateItem[idx][0] +'" target="_top" ><span>' + cateItem[idx][1] + '</span></a>';
			}			
			else
			{
				retValue += '<a href="' + lpPage + cateItem[idx][0] +'" target="_top" ><span>' + cateItem[idx][1] + '</span></a>';
			}
			if( cateItem[idx][2] != null && cateItem[idx][2] != "")
			{
				if(!cateItem[idx][2].startsWith("http://"))
				{
					retValue += '<a href="' + srpPage + cateItem[idx][2] +'" title="검색" class="qcate" target="_top" ></a>';
				}
				else
				{
					retValue += '<a href="' + cateItem[idx][2] +'" title="검색" class="qcate" target="_top" ></a>';
				}
					
			}
			 
			retValue += "</li>";
			
		}

		retValue += '</ul> ';
		
		
		//alert('11');
		//if(linkType == '02')
		//{
			
			//var dateTimeNow = new Date();
	
			// new Date생성시 한달이 많게 나옴
			//var adEndDate = new Date(2011, 10 - 1 , 1, 0, 0, 0);
			
			//if(dateTimeNow < adEndDate)
			//{
			aboutCategoryAD1Banner = TopHeader.getAboutCategoryAD1Banner(linkType);
			if(aboutCategoryAD1Banner != null)
			{
				retValue += '<div class="cate_bnr">';
				retValue += '	<a href="'+ aboutCategoryAD1Banner.linkUrl +'" target="_top" >';
				if(locationProtocol == "http://")
				{
					//retValue += "<a href=\"" + rWingBanner.linkUrl +"\" target=\"_blank\"> <img src='" + locationProtocol + "i.iabout.kr/w/"  +rWingBanner.imageUrl +"'  width='80' height='250' > </a>";		
					retValue += '		<img alt="'+ aboutCategoryAD1Banner.title +'" src="'  + locationProtocol + "i.iabout.kr/w/"  +aboutCategoryAD1Banner.imageUrl +'" width="137" >';
				}
				else
				{
					//retValue += "<a href=\"" + rWingBanner.linkUrl +"\" target=\"_blank\"> <img src='" + locationProtocol + "is.iabout.kr/w/"  +rWingBanner.imageUrl +"'  width='80' height='250'  > </a>";					
					retValue += '		<img alt="'+ aboutCategoryAD1Banner.title  +'" src="'  + locationProtocol + "is.iabout.kr/w/"  +aboutCategoryAD1Banner.imageUrl +'" width="137" >';
				}
				
				retValue += '	</a> ';
				retValue += '</div>	';			
			}
			//}
		//}
		
		retValue += '<div class="outline btm"></div> ';
		retValue += '</div> ';
		retValue += '</div>   ';
		// 서브 카테 끝
		return retValue;		
}

TopHeader.getAboutCategoryAD1Banner = function(categoryCode)
{
	if(typeof(gAboutCategoryAD1Banner) != 'undefined' && gAboutCategoryAD1Banner.length > 0)
	{
		for(i = 0; i< gAboutCategoryAD1Banner.length ; i++)
		{
			if(gAboutCategoryAD1Banner[i].categoryCode == categoryCode)
			{
				return gAboutCategoryAD1Banner[i];
			}
		}
	}
	return null;
}


TopHeader.getLinkUrl = function(categoryCode)
{
		//alert(categoryCode.substring(2,6));
		linkType = categoryCode.substring(0,2);
		if( linkType == "25")
		{
			retValue = departmentPage + categoryCode;
		}
		else if( linkType == "18")
		{
			retValue = luxuryPage + categoryCode;
		}
		else if( linkType == "20")
		{
			retValue = overSeaPage + categoryCode;
		}			
		else
		{
			if(categoryCode.substring(2,8) == "000000")
			{
				// 대분류 카테고리일경우 cpp로 이동
				retValue = cppPage + categoryCode;
			}
			else
			{
				// 아니면 listing page로 이동..
				retValue = lpPage + categoryCode;
			}
		}
		return retValue;
}

TopHeader.getTotalCateNavi = function()
{
	
		//01	가전제품
	var cate01Item = new Array(
			new Array("01130000", "브랜드관",""),
			new Array("01010000", "휴대폰",""),
			new Array("01190000", "휴대폰액세서리",""),
			new Array("01140000", "디지털카메라",""),
			new Array("01150000", "캠코더",""),
			new Array("01160000", "필름카메라",""),
			new Array("01040000", "카메라관련용품",""),
			new Array("01050000", "MP3",""),
			new Array("01170000", "PMP",""),
			new Array("01060000", "비디오게임",""),
			new Array("01070000", "통신/학습/사무",""),
			new Array("01080000", "영상/음향가전",""),
			new Array("01090000", "계절가전",""),
			new Array("01100000", "생활가전",""),
			new Array("01110000", "주방가전",""),
			new Array("01180000", "건강가전","")
		);

	//02	컴퓨터/주변기기
	var cate02Item = new Array(
			new Array("02130000", "브랜드관",""),
			new Array("02020000", "노트북/넷북",""),
			new Array("02010000", "데스크탑",""),
			new Array("02030000", "모니터",""),
			new Array("02090000", "멀티미디어",""),
			new Array("02040000", "주변기기",""),
			new Array("02050000", "PC부품",""),
			new Array("02060000", "저장장치",""),
			new Array("02070000", "네트워크",""),
			new Array("02080000", "PC소모품",""),
			new Array("02140000", "PC액세서리",""),
			new Array("02150000", "소프트웨어","")
			
		);
	//03	여성의류
	var cate03Item = new Array(
			new Array("03290000", "브랜드의류",""),
			new Array("03390000", "겨울코디제안",""),
			new Array("03330000", "패딩/다운",""),
			new Array("03220000", "점퍼",""),
			new Array("03350000", "코트",""),
			new Array("03210000", "자켓",""),
			new Array("03200000", "원피스",""),
			new Array("03140000", "가디건",""),			
			new Array("03120000", "니트",""),
			new Array("03340000", "조끼",""),      
			new Array("03100000", "티셔츠",""),
			new Array("03110000", "블라우스/셔츠",""),
			new Array("03180000", "미니스커트",""),
			new Array("03360000", "미디스커트",""),
			new Array("03410000", "롱스커트",""),
			new Array("03170000", "청바지",""),
			new Array("03160000", "바지",""),
			new Array("03370000", "레깅스",""),			
			new Array("03240000", "정장/세트",""),
			new Array("03260000", "빅사이즈",""),
			new Array("03270000", "스포츠의류",""),
			new Array("03280000", "테마/시즌의류","")			
		);

	//04	패션슈즈
	var cate04Item = new Array(
			new Array("04180000", "겨울 패션슈즈",""),
			new Array("04120000", "정장슈즈브랜드",""),
			new Array("04150000", "스포츠/캐주얼슈즈브랜드",""),			
			new Array("04010000", "여성구두/신발",""),
			new Array("04020000", "남성구두/신발",""),
			new Array("04030000", "캐주얼화",""),
			new Array("04040000", "기능화",""),
			new Array("04050000", "빅사이즈화",""),
			new Array("04060000", "신발소품",""),
			new Array("04140000", "풋관련아이템","")
		);
	//05	시계/액세서리
	var cate05Item = new Array(
			new Array("05200000", "겨울인기아이템",""),
			new Array("05010000", "시계",""),
			new Array("05020000", "여성액세서리",""),
			new Array("05030000", "남성액세서리",""),
			new Array("05040000", "커플액세서리",""),
			new Array("05080000", "귀금속액세서리",""),
			new Array("05050000", "유아동액세서리",""),
			new Array("05150000", "기타액세서리",""),
			new Array("05070000", "액세서리소품",""),
			new Array("05060000", "헤어액세서리",""),
			new Array("05090000", "명품브랜드시계",""),
			new Array("05100000", "정장/예물브랜드시계",""),
			new Array("05120000", "스포츠브랜드시계",""),
			new Array("05110000", "패션브랜드시계", ""),
			new Array("05130000", "보석/준보석브랜드",""),
			new Array("05140000", "트랜드주얼리브랜드","")
		);

	//06	화장품/향수
	var cate06Item = new Array(
			new Array("06180000", "향수",""),
			new Array("06160000", "국내브랜드",""),
			new Array("06170000", "수입브랜드",""),
			new Array("06220000", "브랜드 기획세트",""),
			new Array("06010000", "기초화장품",""),
			new Array("06200000", "스페셜케어",""),
			new Array("06070000", "남성화장품",""),
			new Array("06030000", "메이크업",""),
			new Array("06040000", "클렌징",""),
			new Array("06130000", "마사지/팩/마스크",""),
			new Array("06020000", "선케어",""),
			new Array("06050000", "바디케어",""),
			new Array("06060000", "헤어케어",""),
			new Array("06190000", "바디/헤어케어세트",""),
			new Array("06140000", "다이어트/슬리밍",""),
			new Array("06210000", "제모용품",""),			
			new Array("06100000", "맘/베이비케어",""),
			new Array("06080000", "네일케어",""),			
			new Array("06090000", "뷰티소품","")			
		);

	//07	면세점
	var cate07Item = new Array(
			new Array("07010000", "화장품",""),
			new Array("07020000", "향수",""),
			new Array("07030000", "가방/지갑/벨트",""),
			new Array("07040000", "패션잡화",""),
			new Array("07050000", "시계/액세서리",""),
			new Array("07060000", "전자제품",""),
			new Array("07070000", "식품",""),
			new Array("07090000", "생활용품",""),
			new Array("07080000", "코리안기프트","")
		);
		
	//08	유아동/출산
	var cate08Item = new Array(
			new Array("08230000", "새학기 준비",""),
			new Array("08210000", "겨울아이템",""),
			new Array("08010000", "분유",""),
			new Array("08020000", "이유식",""),
			new Array("08030000", "아기간식",""),
			new Array("08040000", "기저귀",""),
			new Array("08160000", "물티슈"),		
			new Array("08050000", "외출/안전용품",""),
			new Array("08060000", "위생용품",""),
			new Array("08170000", "유아화장품",""),
			new Array("08070000", "도서/미디어",""),
			new Array("08080000", "완구",""),
			new Array("08260000", "연령별완구",""),
			new Array("08270000", "유아용스포츠용품",""),
			new Array("08090000", "출산/수유용품",""),
			new Array("08100000", "임부용품",""),
			new Array("08110000", "유아동의류",""),
			new Array("08120000", "유아동잡화",""),
			new Array("08250000", "아동문구",""),
			new Array("08130000", "유아가구",""),			
			new Array("08140000", "아동/주니어가구",""),
			new Array("08150000", "유아동침구",""),
			new Array("08240000", "유기농제품","")			
		);

	//09	가구/인테리어
	var cate09Item = new Array(
			new Array("09180000", "침대/매트리스",""),
			new Array("09190000", "소파",""),
			new Array("09020000", "수납가구",""),
			new Array("09050000", "침실가구",""),
			new Array("09010000", "거실가구",""),
			new Array("09030000", "주방가구",""),
			new Array("09040000", "홈오피스가구",""),
			new Array("09160000", "의자",""),
			new Array("09170000", "사무/교구용가구",""),
			new Array("09070000", "아동/주니어가구",""),
			new Array("09060000", "유아가구",""),
			new Array("09080000", "전통고가구",""),
			new Array("09090000", "인테리어",""),
			new Array("09220000", "플라워/가드닝",""),
			new Array("09100000", "DIY/리폼",""),
			new Array("09150000", "사랑스런 신혼공간",""),
			new Array("09200000", "화이트가구",""),
			new Array("09210000", "앤틱가구",""),
			new Array("09230000", "브랜드관","")			
		);
	//10	침구/커튼/수예
	var cate10Item = new Array(
			new Array("10100000", "겨울침구",""),
		  new Array("10160000", "침구단품",""),
		  new Array("10170000", "침구세트",""),
		  new Array("10110000", "사이즈별 침구",""),
		  new Array("10120000", "소재별 침구",""),
			new Array("10130000", "무늬별 침구",""),			
		  new Array("10020000", "유아동 침구",""),
		  new Array("10150000", "솜류",""),
		  new Array("10030000", "커튼/블라인드",""),
			new Array("10040000", "카페트/러그",""),
			new Array("10050000", "홈데코",""),
			new Array("10060000", "수예","")
	//new Array("10070000", "계절침구")   // 삭제 (2010.07.05)
		);
	//11	생활/건강/주방
	var cate11Item = new Array(
			new Array("11210000", "겨울철 생활 아이템",""),
			new Array("11220000", "식기류",""),
			new Array("11230000", "냄비/솥/프라이팬",""),
			new Array("11040000", "주방용품",""),
			new Array("11250000", "DIY홈쿠킹/제과제빵",""),
			new Array("11010000", "욕실용품",""),
			new Array("11270000", "구강청결용품",""),
			new Array("11020000", "생활용품",""),
			new Array("11080000", "세제류",""),
			new Array("11090000", "방향/실내청결용품",""),
			new Array("11100000", "여성위생용품",""),
			new Array("11110000", "화장지/제지류",""),
			new Array("11030000", "공구용품",""),
			new Array("11130000", "원예용품",""),
			new Array("11170000", "안전용품",""),
			new Array("11140000", "보안용품",""),
			new Array("11260000", "커피용품",""),
			new Array("11050000", "와인용품",""),
			new Array("11280000", "안마기",""),
			new Array("11060000", "건강용품",""),
			new Array("11290000", "헬스/다이어트용품","")			
		);

	//12	레저/스포츠
	var cate12Item = new Array(
			new Array("12270000", "브랜드관",""),
			new Array("12090000", "스키/보드",""),
			new Array("12340000", "실내스포츠",""),
			new Array("12160000", "레저/스포츠 예약예매",""),
			new Array("12060000", "등산용품",""),
			new Array("12310000", "아웃도어의류",""),			
			new Array("12240000", "캠핑용품",""),
			new Array("12030000", "자전거",""),
			new Array("12010000", "골프",""),
			new Array("12320000", "골프의류/잡화",""),
			new Array("12080000", "헬스/다이어트",""),
			new Array("12100000", "낚시",""),
			new Array("12020000", "구기스포츠",""),
			new Array("12260000", "라켓스포츠",""),
			new Array("12040000", "인라인/X-GAME기구",""),
			new Array("12050000", "모터사이클",""),
			new Array("12070000", "수영용품",""),
			new Array("12110000", "요가/댄스",""),
			new Array("12120000", "격투/수련",""),
			new Array("12130000", "런닝/마라톤",""),
			new Array("12140000", "스케이트",""),
			
			new Array("12150000", "기타스포츠잡화",""),
			new Array("12330000", "스포츠의류/잡화","")			
		);

	//13	자동차용품
	var cate13Item = new Array(
			new Array("13130000", "브랜드관",""),
			new Array("13010000", "네비게이션/GPS",""),
			new Array("13150000", "블랙박스/하이패스",""),
			new Array("13020000", "차량용 시트/매트",""),
			new Array("13090000", "인테리어",""),
			new Array("13080000", "익스테리어",""),
			new Array("13110000", "타이어/휠/체인",""),
			new Array("13100000", "차량세차/관리용품",""),
			new Array("13120000", "튜닝/DIY용품",""),
			new Array("13050000", "램프",""),
			new Array("13070000", "차량용 전자제품",""),
			new Array("13030000", "오디오/AV용품",""),		
			new Array("13180000", "차량용 전기용품",""),
			new Array("13170000", "모터사이클","")			
		);
	//14	문구/팬시/취미
	var cate14Item = new Array(
			new Array("14130000", "새학기 아이템",""),
			new Array("14060000", "오피스/일반문구",""),
			new Array("14070000", "디자인팬시",""),
			new Array("14050000", "애완용품",""),
			new Array("14030000", "모형미니어쳐 ",""),
			new Array("14010000", "악기",""),
			new Array("14100000", "파티/포장용품",""),
			new Array("14020000", "퍼즐/보드게임",""),
			new Array("14080000", "미술/제도용품",""),
			new Array("14090000", "아동문구",""),
			new Array("14120000", "교재용악기",""),
			new Array("14150000", "다이어리/캘린더","")
		);

	//15	음반/DVD/티켓
	var cate15Item = new Array(
			new Array("15040000", "블루레이",""),
			new Array("15010000", "DVD/비디오",""),
			new Array("15020000", "음반",""),
			new Array("15050000", "한류스타 총집합","")
		);

	//16	꽃배달/상품권
	var cate16Item = new Array(
			new Array("16080000", "공기 정화",""),
			new Array("16010000", "꽃",""),
			new Array("16020000", "꽃선물세트 ",""),
			new Array("16030000", "인테리어플라워",""),
			new Array("16040000", "원예식물",""),
			new Array("16060000", "상품권",""),
			new Array("16070000", "e쿠폰 ","")
		);	
		

	//17	성인용품
	var cate17Item = new Array(
			new Array("17010000", "콘돔",""),
			new Array("17020000", "성인기구/용품",""),
			new Array("17030000", "섹시의류/잡화","")
		);


	//18	 명품관
	var cate18Item = new Array(
			new Array("18010000", "가방",""),
			new Array("18020000", "지갑/벨트",""),
			new Array("18030000", "슈즈",""),
			new Array("18040000", "시계",""),
			new Array("18050000", "패션액세서리",""),
			new Array("18070000", "선글라스",""),
			new Array("18060000", "섬유잡화",""),
			new Array("18110000", "의류",""),
			new Array("18100000", "화장품/향수","")
		);

	//19	남성의류
	var cate19Item = new Array(
			new Array("19160000", "브랜드의류",""),
			new Array("19190000", "겨울 코디 제안",""),
			new Array("19260000", "패딩/다운",""),
			new Array("19080000", "점퍼",""),
			new Array("19210000", "코트",""),
			new Array("19090000", "자켓",""),
			new Array("19050000", "가디건",""),			
			new Array("19040000", "니트",""),
			new Array("19200000", "조끼",""),			
			new Array("19010000", "티셔츠",""),
			new Array("19020000", "셔츠/남방",""),
			new Array("19070000", "청바지",""),
			new Array("19060000", "바지",""),			
			new Array("19120000", "정장/세트",""),
			new Array("19130000", "빅사이즈",""),
			new Array("19140000", "스포츠의류",""),
			new Array("19240000", "테마/시즌의류","")
		);

	//20	해외쇼핑
	var cate20Item = new Array(
			new Array("20010000", "의류",""),
			new Array("20020000", "언더웨어",""),
			new Array("20030000", "슈즈",""),
			new Array("20040000", "가방/지갑",""),
			new Array("20050000", "패션잡화",""),
			new Array("20060000", "뷰티",""),
			new Array("20070000", "시계/액세서리",""),
			new Array("20080000", "맘/베이비/키즈",""),
			new Array("20090000", "레저/스포츠/취미",""),
			new Array("20100000", "리빙/홈",""),
			new Array("20110000", "가전/컴퓨터","")
		);

	//21	언더웨어
	var cate21Item = new Array(
			new Array("21080000", "브랜드언더웨어",""),
			new Array("21010000", "여성언더웨어",""),
			new Array("21020000", "남성언더웨어",""),
			new Array("21090000", "잠옷",""),
			new Array("21030000", "기능성언더웨어",""),
			new Array("21050000", "커플언더웨어",""),
			new Array("21060000", "빅사이즈언더웨어",""),
			new Array("21100000", "임산부언더웨어",""),
			new Array("21070000", "주니어언더웨어",""),
			new Array("21040000", "란제리소품","")
			
		);

	//23	패션가방/잡화
	var cate23Item = new Array(
			new Array("23110000", "겨울 패션잡화",""),
			new Array("23060000", "가방/잡화브랜드",""),
			new Array("23080000", "스포츠/캐주얼잡화브랜드",""),			
			new Array("23010000", "가방",""),
			new Array("23020000", "지갑/벨트",""),
			new Array("23040000", "선글라스/안경테",""),
			new Array("23030000", "모자/비니/두건",""),
			new Array("23050000", "섬유/시즌잡화","")			
		);

	//24	식품/슈퍼마켓
	var cate24Item = new Array(	
		  new Array("24130000", "겨울 별미 BEST",""),
			new Array("24170000", "쌀/잡곡류",""),
			new Array("24180000", "과일/견과류",""),
		  new Array("24020000", "농산물",""),
			new Array("24030000", "수산물",""),
			new Array("24040000", "축산물",""),
			new Array("24190000", "김치",""),
			new Array("24200000", "즉석식품",""),			
			new Array("24050000", "반찬/가공식품",""),
			new Array("24210000", "커피",""),
			new Array("24220000", "음료/차류",""),			
			new Array("24230000", "간식류",""),			
			new Array("24070000", "양념/소스",""),
			new Array("24240000", "DIY홈쿠킹/제과제빵",""),
			new Array("24250000", "홍삼/인삼",""),			
			new Array("24090000", "건강식품",""),
			new Array("24150000", "웰빙 다이어트식품","")
		);


	//25	백화점
	var cate25Item = new Array(
			new Array("25010000", "여성의류",""),
			new Array("25020000", "남성의류",""),
			new Array("25030000", "캐주얼의류",""),
			new Array("25040000", "언더웨어",""),
			new Array("25050000", "패션잡화",""),
			new Array("25060000", "시계/보석/액세서리",""),
			new Array("25070000", "명품화장품",""),
			new Array("25080000", "스포츠/레저",""),
			new Array("25090000", "유아동/출산용품",""),
			new Array("25100000", "식품",""),
			new Array("25110000", "침구/수예",""),
			new Array("25120000", "가구/인테리어",""),
			new Array("25130000", "주방/식기",""),
			new Array("25140000", "가전","")
		);		
		
	//30 크리스마스
	//var cate30Item = new Array(
	//		new Array("30030100", "크리스마스 파티",""),
	//		new Array("30010200", "연인을 위한 선물",""),
	//		new Array("30010300", "아이를 위한 선물",""),
	//		new Array("30010100", "부모님을 위한 선물","")			
	//	);	
	
	// 3002 설날선물
	//var cate30Item = new Array(
	//		new Array("30021000", "오일세트",""),
	//		new Array("30021100", "햄/소세지세트",""),
	//		new Array("30021200", "통조림세트",""),
	//		new Array("30021300", "떡/한과세트",""),
	//		new Array("30021400", "정육세트",""),
	//		new Array("30021500", "굴비/조기세트",""),
	//		new Array("30021600", "과일세트",""),
	//		new Array("30021800", "생활용품세트",""),
	//		new Array("30021700", "건강보조식품",""),
	//		new Array("30020900", "효도선물",""),
	//		new Array("30020400", "상품권",""),
	//		new Array("30020300", "아동선물",""),
	//		new Array("30020200", "한복","")
	//);	
	
	// 3013 발렌타인데이
	var cate30Item = new Array(
			new Array("30130100","초콜렛",""),
			new Array("30130200","커플링",""),
			new Array("30130300","커플시계",""),
			new Array("30130800","남성시계",""),
			new Array("30130700", "커플속옷",""),
			new Array("30130400", "남자향수",""),
			new Array("30130500", "꽃",""),
			new Array("30130600", "꽃선물세트",""),
			new Array("30130900", "초콜릿 포장용품","")
	);	
	
	
		
	//32 도서
	var cate32Item = new Array(
			new Array("32010000", "소설",""),
			new Array("32020000", "시/에세이",""),
			new Array("32030000", "인문",""),
			new Array("32080000", "경제/경영",""),
			new Array("32090000", "자기계발",""),
			new Array("32170000", "외국어",""),
			new Array("32190000", "취업/수험서",""),
			new Array("32260000", "유아",""),
			new Array("32270000", "아동",""),
			new Array("32280000", "어린이영어",""),
			new Array("32250000", "초등학습",""),
			new Array("32150000", "중/고등학습",""),
			new Array("32040000", "가정/생활",""),
			new Array("32050000", "요리",""),
			new Array("32060000", "건강",""),
			new Array("32200000", "여행/기행","")
		);		
		
	
	
	
	var retValue ='';
	retValue += '							<ul class="catekey-top">';
	retValue += '								<li>';
	retValue += '									<a href="http://finding.about.co.kr/Category/CPP.aspx?DisplayCategories=02020000" target="_top" >노트북</a>                                                                    ';
	retValue += '								</li>';
	retValue += '								<li>';
	retValue += '									<a href="http://finding.about.co.kr/Category/CPP.aspx?DisplayCategories=30000000" target="_top" >겨울 상품 모음전</a>';
	retValue += '								</li>';
	retValue += '								<li> ';
	retValue += '									<a href="http://finding.about.co.kr/Category/CPP.aspx?DisplayCategories=01010000" target="_top">휴대폰</a>                                                                    ';
	retValue += '								</li> ';
	retValue += '								<li>';
	retValue += '									<a href="http://finding.about.co.kr/Category/CPP.aspx?DisplayCategories=01050000" target="_top">MP3</a></li>                                                              ';
	retValue += '								<li>';
	retValue += '									<a href="http://finding.about.co.kr/Category/CPP.aspx?DisplayCategories=01140000" target="_top">디지털카메라</a>                                                              ';
	retValue += '								</li>';
	retValue += '								<li>';
	retValue += '									<a href="http://finding.about.co.kr/Category/CPP.aspx?DisplayCategories=13010000" target="_top" >네비게이션</a>                                                                ';
	retValue += '								</li>';
	retValue += '							</ul>';
	retValue += '							<div class="catekey-sub">';
	retValue += '								<ul class="cateSList"> ';
	retValue += '									<li>';
	retValue += '									<a href="http://finding.about.co.kr/Category/CPP.aspx?DisplayCategories=01000000" target="_top" ><span>가전</span></a>';
	retValue += TopHeader.getSubDiv(cate01Item,'01');
	retValue += '									</li>';
	retValue += '									<li>';
	retValue += '									<a href="http://finding.about.co.kr/Category/CPP.aspx?DisplayCategories=02000000" target="_top"><span>컴퓨터</span></a>';
	retValue += TopHeader.getSubDiv(cate02Item,'02');
	retValue += '									</li>';
	retValue += '								</ul> ';
	retValue += '								<ul class="cateSList">';
	retValue += '									<li>';
	retValue += '										<a href="http://finding.about.co.kr/Category/CPP.aspx?DisplayCategories=03000000" target="_top"><span>여성의류</span></a>';
	retValue += TopHeader.getSubDiv(cate03Item, '03');
	retValue += '									</li>';
	retValue += '									<li>';
	retValue += '										<a href="http://finding.about.co.kr/Category/CPP.aspx?DisplayCategories=19000000" target="_top" ><span>남성의류</span></a>';
	retValue += TopHeader.getSubDiv(cate19Item , '19');
	retValue += '									</li>';
	retValue += '									<li>';
	retValue += '										<a href="http://finding.about.co.kr/Category/CPP.aspx?DisplayCategories=21000000" target="_top"><span>언더웨어</span></a>';
	retValue += TopHeader.getSubDiv(cate21Item , '21');
	retValue += '									</li>';
	retValue += '									<li>';
	retValue += '										<a href="http://finding.about.co.kr/Category/CPP.aspx?DisplayCategories=04000000" target="_top"><span>패션슈즈</span></a>';
	retValue += TopHeader.getSubDiv(cate04Item , '04');
	retValue += '									</li>';
	retValue += '									<li>';
	retValue += '										<a href="http://finding.about.co.kr/Category/CPP.aspx?DisplayCategories=23000000" target="_top" ><span>패션가방/잡화</span></a>';
	retValue += TopHeader.getSubDiv(cate23Item , '23');
	retValue += '									</li>';
	retValue += '									<li>';
	retValue += '										<a href="http://finding.about.co.kr/Category/CPP.aspx?DisplayCategories=05000000" target="_top" ><span>시계/액세서리</span></a>';
	retValue += TopHeader.getSubDiv(cate05Item , '05');
	retValue += '									</li>';
	retValue += '									<li>';
	retValue += '										<a href="http://finding.about.co.kr/Category/CPP.aspx?DisplayCategories=06000000" target="_top"><span>화장품/향수</span></a>';
	retValue += TopHeader.getSubDiv(cate06Item , '06');
	retValue += '									</li>';
	retValue += '								</ul>';
	retValue += '								<ul class="cateSList">';
	retValue += '									<li>  ';
	retValue += '										<a href="http://finding.about.co.kr/Corner/Department/DepartmentMain.aspx" target="_top"><span>백화점</span></a>';
	retValue += TopHeader.getSubDiv(cate25Item, '25');
	retValue += '									</li> ';
	retValue += '									<li>  ';
	retValue += '										<a href="http://finding.about.co.kr/Corner/Luxury/LuxuryMain.aspx" target="_top"><span>명품관</span></a>';
	retValue += TopHeader.getSubDiv(cate18Item, '18');
	retValue += '									</li>';
	retValue += '									<li>';
	retValue += '										<a href="http://finding.about.co.kr/Corner/Overseas/Main.aspx" target="_top"><span>해외쇼핑</span></a>';
	retValue += TopHeader.getSubDiv(cate20Item, '20');
	retValue += '									</li>';
	retValue += '									<li>';
	retValue += '										<a href="http://finding.about.co.kr/Category/CPP.aspx?DisplayCategories=07000000" target="_top"><span>면세점</span></a>';
	retValue += TopHeader.getSubDiv(cate07Item , '07');
	retValue += '									</li>';
	
	retValue += '									<li>';
	retValue += '									<a href="http://finding.about.co.kr/Category/List.aspx?displaycategories=30130000" target="_top"><span>발렌타인데이</span></a>';
	retValue += TopHeader.getSubDiv(cate30Item , '30');
	retValue += '									</li>';
	
	
	retValue += '								</ul>';
	retValue += '								<ul class="cateSList">';
	retValue += '									<li>';
	retValue += '										<a href="http://finding.about.co.kr/Category/CPP.aspx?DisplayCategories=08000000" target="_top"><span>유아동/출산</span></a>';
	retValue += TopHeader.getSubDiv(cate08Item , '08');
	retValue += '									</li>';
	retValue += '									<li>';
	retValue += '										<a href="http://finding.about.co.kr/Category/CPP.aspx?DisplayCategories=09000000" target="_top" ><span>가구/인테리어</span></a>';
	retValue += TopHeader.getSubDiv(cate09Item, '09' );
	retValue += '									</li>';
	retValue += '									<li>';
	retValue += '										<a href="http://finding.about.co.kr/Category/CPP.aspx?DisplayCategories=10000000" target="_top"><span>침구/커튼/수예</span></a>';
	retValue += TopHeader.getSubDiv(cate10Item, '10' );
	retValue += '									</li>';
	retValue += '									<li>';
	retValue += '										<a href="http://finding.about.co.kr/Category/CPP.aspx?DisplayCategories=24000000" target="_top"><span>식품/슈퍼마켓</span></a>';
	retValue += TopHeader.getSubDiv(cate24Item, '24' );
	retValue += '									</li>';
	retValue += '									<li>';
	retValue += '										<a href="http://finding.about.co.kr/Category/CPP.aspx?DisplayCategories=11000000" target="_top"><span>생활/건강/주방</span></a>';
	retValue += TopHeader.getSubDiv(cate11Item , '11' );
	retValue += '									</li>';
	retValue += '									<li>';
	retValue += '								</ul>';
	retValue += '								<ul class="cateSList last">';
	retValue += '									<li>';
	retValue += '										<a href="http://finding.about.co.kr/Category/CPP.aspx?DisplayCategories=12000000" target="_top"><span>레저/스포츠</span></a>';
	retValue += TopHeader.getSubDiv(cate12Item , '12' );	
	retValue += '									</li>';
	retValue += '									<li>';
	retValue += '										<a href="http://finding.about.co.kr/Category/CPP.aspx?DisplayCategories=13000000" target="_top" ><span>자동차용품</span></a>';
	retValue += TopHeader.getSubDiv(cate13Item, '13' );
	retValue += '									</li>';
	retValue += '									<li>';
	retValue += '										<a href="http://finding.about.co.kr/Category/CPP.aspx?DisplayCategories=14000000" target="_top" ><span>문구/팬시/취미</span></a>';
	retValue += TopHeader.getSubDiv(cate14Item , '14' );
	retValue += '									</li>';
	retValue += '									<li>';
	retValue += '										<a href="http://finding.about.co.kr/Category/CPP.aspx?DisplayCategories=15000000" target="_top"><span>음반/DVD</span></a>';
	retValue += TopHeader.getSubDiv(cate15Item , '15' );
	retValue += '									</li>';
	retValue += '									<li>';
	retValue += '										<a href="http://finding.about.co.kr/Category/CPP.aspx?DisplayCategories=16000000" target="_top"><span>꽃배달/상품권</span></a>';
	retValue += TopHeader.getSubDiv(cate16Item , '16' );
	retValue += '								</li>';
	retValue += '								<li>';
	retValue += '										<a href="http://finding.about.co.kr/Category/CPP.aspx?DisplayCategories=32000000" target="_top"><span>도서</span></a>';
	retValue += TopHeader.getSubDiv(cate32Item , '32' );
	retValue += '									</li>';
	retValue += '								</ul>';
	retValue += '							</div>';
	//retValue += '							<div id=\'debug\'></div>';
	return retValue;
}


TopHeader.getHotcateList = function(cateItemsIdx)
{ 
	var cateItems = hotSubCateMenu[cateItemsIdx];
	var retValue = "";
	var subMenuIdx = 0;
	
	retValue += '<div class="in-line"> ';
	retValue += ' <div class="catekey-sub"> ';  
	//debugger
	for(var idx1 = 0; idx1< cateItems.menu.length; idx1++)
	{
		retValue += '		<ul class="cateSList"> '; 
		retValue += '			<li>    ';
		if(cateItems.menu[idx1].subMenu != null && typeof(cateItems.menu[idx1].subMenu) != 'undefined'  )
		{
			subMenuIdx++;
				
			if($.browser.msie )
			{
				retValue += "				<a href=\""+ TopHeader.getLinkUrl(cateItems.menu[idx1].categoryCode) +"\" target=\"_top\"   onMouseleave=\"hotcateOut('cateSList-sub_"+cateItemsIdx+ "_" + subMenuIdx  +"');\" onMouseOver=\"hotcateOver('cateSList-sub_"+cateItemsIdx+ "_" + subMenuIdx +"');\"><span>"+cateItems.menu[idx1].menuName +"</span></a>";
			}
			else
			{
				retValue += "				<a href=\"" + TopHeader.getLinkUrl(cateItems.menu[idx1].categoryCode) + "\" target=\"_top\"  onMouseOut=\"hotcateOut('cateSList-sub_"+cateItemsIdx+ "_" + subMenuIdx  +"');\" onMouseOver=\"hotcateOver('cateSList-sub_"+cateItemsIdx+ "_" + subMenuIdx +"');\"><span>"+cateItems.menu[idx1].menuName +"</span></a>";				
			}
			
			retValue += TopHeader.getHotcateSubList(cateItems.menu[idx1].subMenu,cateItemsIdx, subMenuIdx);
		}
		else
		{
		
			retValue += '				<a href="'+ TopHeader.getLinkUrl(cateItems.menu[idx1].categoryCode) +'" target=\"_top\" ><span>'+cateItems.menu[idx1].menuName +'</span></a>';			
		}
		
		retValue += '				<ul class="cSList">';
		if(cateItems.menu[idx1].middleMenu != null && typeof(cateItems.menu[idx1].middleMenu) != 'undefined'  )
		{
			for( var idx2 = 0; idx2< cateItems.menu[idx1].middleMenu.length; idx2++)
			{
				// middleMenu
				if(cateItems.menu[idx1].middleMenu[idx2].isPoint != 'false')
				{
					retValue += '	<li class="point">';
				}
				else
				{
					retValue += '	<li>';
				}
				
				spanClass = "";
				
				if(cateItems.menu[idx1].middleMenu[idx2].isNew == 'true')
				{
					spanClass += 'ico_n';
				}			
				
				if(cateItems.menu[idx1].middleMenu[idx2].isHit == 'true')
				{
						spanClass += " ico_h";
				}
				
				//var lpPage3 = "http://finding.about.co.kr/Category/List.aspx?DisplayCategories=" + cateItems.menu[idx1].middleMenu[idx2].categoryCode;
				var middleCateCode = cateItems.menu[idx1].middleMenu[idx2].categoryCode;
				var middleLinkUrl = "";
				if( cateItems.menu[idx1].middleMenu[idx2].linkUrl != "")
				{
					middleLinkUrl = cateItems.menu[idx1].middleMenu[idx2].linkUrl;
				}
				else
				{
					middleLinkUrl = TopHeader.getLinkUrl(middleCateCode);
				}
				
				if(cateItems.menu[idx1].middleMenu[idx2] != null && typeof(cateItems.menu[idx1].middleMenu[idx2]) != 'undefined'  )
				{
					// 서브 메뉴가 있는 경우
					subMenuIdx++;
					if($.browser.msie )
					{
						//retValue += "				<a href=\""+ lpPage1 +"\" target=\"_top\"   onMouseleave=\"hotcateOut('cateSList-sub_"+cateItemsIdx+ "_" + subMenuIdx  +"');\" onMouseOver=\"hotcateOver('cateSList-sub_"+cateItemsIdx+ "_" + subMenuIdx +"');\"><span>"+cateItems.menu[idx1].menuName +"</span></a>";
						retValue += "	<a href=\"" + middleLinkUrl + "\" target=\"_top\" onMouseleave=\"hotcateOut('cateSList-sub_"+cateItemsIdx+ "_" + subMenuIdx  +"');\" onMouseOver=\"hotcateOver('cateSList-sub_"+cateItemsIdx+ "_" + subMenuIdx +"');\"    ><span class=\"" + spanClass + "\">";
					}
					else
					{
						//retValue += "				<a href=\"" + lpPage1 + "\" target=\"_top\"  onMouseOut=\"hotcateOut('cateSList-sub_"+cateItemsIdx+ "_" + subMenuIdx  +"');\" onMouseOver=\"hotcateOver('cateSList-sub_"+cateItemsIdx+ "_" + subMenuIdx +"');\"><span>"+cateItems.menu[idx1].menuName +"</span></a>";				
						retValue += "	<a href=\"" + middleLinkUrl + "\" target=\"_top\" onMouseOut=\"hotcateOut('cateSList-sub_"+cateItemsIdx+ "_" + subMenuIdx  +"');\" onMouseOver=\"hotcateOver('cateSList-sub_"+cateItemsIdx+ "_" + subMenuIdx +"');\"    ><span class=\"" + spanClass + "\">";
					}
					retValue += cateItems.menu[idx1].middleMenu[idx2].menuName+'</span></a>';
					retValue += TopHeader.getHotcateSubList(cateItems.menu[idx1].middleMenu[idx2].subMenu,cateItemsIdx, subMenuIdx);;
			  }
			  else
			  {
			  	retValue += "	<a href=\"" + TmiddleLinkUrl + "\" target=\"_top\" ><span class=\"" + spanClass + "\">";
			  	retValue += cateItems.menu[idx1].middleMenu[idx2].menuName+'</span></a>';			  	
			  }
			  
				retValue += '		</li>';			
			}
		}
		retValue += '				</ul>';
		retValue += '			</li>';
		retValue += '		</ul> '; 	
	}	 
	
	retValue += ' </div>';
	retValue += '	<!-- catekey-sub End -->';
	var serviceMenu = serviceItems[cateItemsIdx].serviceItem;
	var serviceType = serviceItems[cateItemsIdx].serviceType;
	retValue += TopHeader.getHotcateServiceList(serviceMenu,serviceType);
	
	aboutCategoryAD2Banner = TopHeader.getAboutCategoryAD2Banner(cateItemsIdx);
	if(aboutCategoryAD2Banner != null)
	{
		retValue += '<div class="cate_bnr">';
		retValue += '	<a href="'+ aboutCategoryAD2Banner.linkUrl +'" target="_blank" >';
		if(locationProtocol == "http://")
		{
			//retValue += "<a href=\"" + rWingBanner.linkUrl +"\" target=\"_blank\"> <img src='" + locationProtocol + "i.iabout.kr/w/"  +rWingBanner.imageUrl +"'  width='80' height='250' > </a>";		
			if(headerType == "H")
			{
				retValue += '		<img alt="'+ aboutCategoryAD2Banner.title +'" src="'  + locationProtocol + "i.iabout.kr/w/"  +aboutCategoryAD2Banner.imageUrl1 +'" width="153" height="56" >';
			}
			else
			{
				retValue += '		<img alt="'+ aboutCategoryAD2Banner.title +'" src="'  + locationProtocol + "i.iabout.kr/w/"  +aboutCategoryAD2Banner.imageUrl2 +'" width="141" height="56" >';
			}
				
		}
		else
		{
			//retValue += "<a href=\"" + rWingBanner.linkUrl +"\" target=\"_blank\"> <img src='" + locationProtocol + "is.iabout.kr/w/"  +rWingBanner.imageUrl +"'  width='80' height='250'  > </a>";					
			if(headerType == "H")
			{
				retValue += '		<img alt="'+ aboutCategoryAD2Banner.title  +'" src="'  + locationProtocol + "is.iabout.kr/w/"  +aboutCategoryAD2Banner.imageUrl1 +'" width="153" height="56" >';
			}
			else
			{
				retValue += '		<img alt="'+ aboutCategoryAD2Banner.title  +'" src="'  + locationProtocol + "is.iabout.kr/w/"  +aboutCategoryAD2Banner.imageUrl2 +'" width="141" height="56" >';				
			}
		}
		
		retValue += '	</a> ';
		retValue += '</div>	';			
	}
	
	
	//retValue += '<div class="cate_bnr">';
	//retValue += '	<a href=" http://promotion.about.co.kr/EventAbout.aspx?eventID=201188173921" target="_top" >';
	//retValue += '		<img alt="HP" src="http://pics.about.co.kr/os2/main/hp_110904_137x44.gif">';
	//retValue += '	</a> ';
	//retValue += '</div>	';			
	
	
	retValue += '</div>';  
                       
	return retValue;		
}

TopHeader.getAboutCategoryAD2Banner = function(locationType )
{
	if(typeof(gAboutCategoryAD2Banner) != 'undefined' && gAboutCategoryAD2Banner.length > 0)
	{
		for(i = 0; i< gAboutCategoryAD2Banner.length ; i++)
		{
			if(gAboutCategoryAD2Banner[i].locationType  == locationType)
			{
				return gAboutCategoryAD2Banner[i];
			}
		}
	}
	return null;
}

TopHeader.getHotcateSubList = function(subItems, cateItemsIdx , subMenuIdx)
{ 
	var retValue = "";
	if(typeof(subItems) !=  'undefined' && subItems != null)
	{
		if(subItems.length > 0)
		{
			if($.browser.msie )
			{
				retValue +="<div class=\"cateSList-sub\" id='cateSList-sub_"+cateItemsIdx+ "_" + subMenuIdx +"'  onMouseleave=\"hotcateOut('cateSList-sub_" + cateItemsIdx + "_" + subMenuIdx  +"');\" onMouseOver=\"hotcateOver('cateSList-sub_"+cateItemsIdx+ "_" + subMenuIdx   +"');\"       > ";
			}
			else
			{
				retValue +="<div class=\"cateSList-sub\" id='cateSList-sub_"+cateItemsIdx+ "_" + subMenuIdx +"'  onMouseOut=\"hotcateOut('cateSList-sub_" + cateItemsIdx + "_" + subMenuIdx  +"');\" onMouseOver=\"hotcateOver('cateSList-sub_"+cateItemsIdx+ "_" + subMenuIdx   +"');\"       > ";			
			}
			
			if(subItems.length > 12)
			{ 
				retValue +='	<div class="box" style="width:170px;" > ';
			}
			else if(subItems.length == 12)
			{
				//if( $browser.version == "8.0" && $browser.msie)
				//{
				//	retValue +='	<div class="box"> ';
				//}
				if($.browser.version != "8.0" && $.browser.msie)
				{
					retValue +='	<div class="box" style="width:170px;" > ';					
				}
				else
				{
					retValue +='	<div class="box" > ';										
				}
									
			}			
			else
			{
				retValue +='	<div class="box" > ';				
			}
			retValue +='		<ul class="sin-line"> ';
			for(var idx = 0 ; idx < subItems.length; idx++)
			{
				retValue +='<li>';
				var linkUrl1 = TopHeader.getLinkUrl(subItems[idx].categoryCode); 
				
				retValue +=' <a href="'+ linkUrl1 +'"><span>' + subItems[idx].menuName  + '</span></a>';
				if( subItems[idx].keyword != null && subItems[idx].keyword != "")
				{
					if(subItems[idx].keyword.startsWith("http://"))
					{
						var linkUrl2 = subItems[idx].keyword;						
					}
					else
					{
						var linkUrl2 = srpPage + subItems[idx].keyword;						
					}
					retValue += '<a href="' + linkUrl2 +'" title="검색" class="qcate" target="_top" ></a>';
				}

				retValue +='</li> ';
			}
			retValue +='		</ul> ';
			retValue +='	</div> ';
			retValue +='</div> ';
		}
	}
	return retValue;


}

TopHeader.getCornerList = function()
{
		var CornerItems = [
		{	
			"className":"corner_menu01",
			"linkUrl":"http://finding.about.co.kr/Corner/Best100/CornerBestMain.htm",
			"title":"BEST100",
			"target":"_top"
		},
		{	
			"className":"corner_menu11",
			"linkUrl":"http://finding.about.co.kr/Corner/StyleSearch/Main.aspx",
			"title":"스타일검색",
			"target":"_top"
		},		
		{	
			"className":"corner_menu04",
			"linkUrl":"http://finding.about.co.kr/corner/topfashion/main.aspx",
			"title":"클럽엣지",
			"target":"_top"
		},
		{	
			"className":"corner_menu03",
			"linkUrl":"http://finding.about.co.kr/Corner/SShop/Main.aspx",
			"title":"Fashion@",
			"target":"_top"
		},	
		{	
			"className":"corner_menu05",
			"linkUrl":"http://finding.about.co.kr/Corner/Department/DepartmentMain.aspx",
			"title":"백화점관",
			"target":"_top"
		},
		{	
			"className":"corner_menu06",
			"linkUrl":"http://finding.about.co.kr/Corner/Luxury/LuxuryMain.aspx",
			"title":"명품관",
			"target":"_top"
		},
		{	
			"className":"corner_menu07",
			"linkUrl":"http://finding.about.co.kr/Corner/Overseas/Main.aspx",
			"title":"해외쇼핑",
			"target":"_top"
		}		
	];
	
	var retValue = "";
	
	retValue += '				<ul>';
	
	for(var i = 0; i< CornerItems.length; i++)
	{
		if(CornerItems[i].className == "corner_menu11")
		{
			 retValue += '<li class="flowerg">';
			 if(CornerItems[i].className == gMenuLocation)
			 {
			   retValue += '					<a class="' +  CornerItems[i].className + 'on" onclick="HeaderCorner.OpenFlowerGarden()"  style="cursor:pointer;" ><span>' +CornerItems[i].title + '</span></a></li> ';
			 }
			 else
			 {
				retValue += '					<a class="' +  CornerItems[i].className + '" onclick="HeaderCorner.OpenFlowerGarden()" style="cursor:pointer;" ><span>' +CornerItems[i].title + '</span></a></li> ';			
			 }
		}
		else
		{
			retValue += '<li>';
			if(CornerItems[i].className == gMenuLocation)
			{
				retValue += '					<a href="'+CornerItems[i].linkUrl+'" target="' + CornerItems[i].target + '" class="' +  CornerItems[i].className + 'on"><span>' +CornerItems[i].title + '</span></a></li> ';
			}
			else
			{
				retValue += '					<a href="'+CornerItems[i].linkUrl+'" target="' + CornerItems[i].target + '" class="' +  CornerItems[i].className + '"><span>' +CornerItems[i].title + '</span></a></li> ';			
			}
		}
	}
	retValue += '				</ul> ';
	return retValue;
}

TopHeader.getCouponList = function()
{
		var CouponItems = [
		{	// 쿠폰북
			"className":"corner_menu2_3",
			"linkUrl":"http://finding.about.co.kr/Corner/CouponBook/CouponBookCategory.aspx",
			"title":"쿠폰북",
			"target":"_top"
		},
		{	// 기획전
			"className":"corner_menu2_4",
			"linkUrl":"http://finding.about.co.kr/Corner/Promotion/Main.aspx",
			"title":"기획전",
			"target":"_top"
		}
		
	];
	
	var retValue = "";
	//retValue += '		<div class="tCoupon" onmouseover="TopHeader.couponTabOver(this)"  onmouseOut="TopHeader.couponTabOut(this)" > ';
	retValue += '			<a class="corner_menu2_1"  href="http://www.about.co.kr/ClickChaak/daoneday/Main.aspx" target="_top"><span>기획전 쿠폰</span></a> ';
	retValue += '			<div class="tcLayer" style="display:none;"> ';
	retValue += '			<ul >';
	
	for(var i = 0; i< CouponItems.length; i++)
	{
		retValue += '<li>';
		retValue += '					<a href="'+CouponItems[i].linkUrl+'"   onmouseover="TopHeader.couponMenuOver(this)"  onmouseOut="TopHeader.couponMenuOut(this)"  target="' + CouponItems[i].target + '" class="' +  CouponItems[i].className + '"><span>' +CouponItems[i].title + '</span></a></li> ';
	}
	retValue += '			</ul> ';
	retValue += '			</div> ';
	//retValue += '		</div> ';
	return retValue;
}

TopHeader.couponTabOver = function(obj){
	$("a.corner_menu2_1",obj).addClass("corner_menu2_1on");
	$("div.tcLayer",obj).show();
}

TopHeader.couponTabOut = function(obj){
	$("a.corner_menu2_1",obj).removeClass("corner_menu2_1on");
	$("div.tcLayer",obj).hide();
}

TopHeader.couponMenuOver = function(obj){
	var cName =$(obj).attr("class")+"on";
	$(obj).attr("class",cName);
}

TopHeader.couponMenuOut = function(obj){
	var cName =$(obj).attr("class").replace('on','');
	$(obj).attr("class",cName);
}

	

TopHeader.getHotcateServiceList = function(serviceMenu, serviceType){
	if( serviceType =="0")
	{
		return "";
	}
	 
	var retValue = "";
	retValue += '	<div class="service">';
	if( serviceType == "1" )
	{ 
		retValue += '		<h4 class="quick"><span class="vNone">Quick Buy</span></h4>';
	}
	retValue += '		<ul>';	
	
	for(var i = 0; i< serviceMenu.length; i++)
	{
		retValue += '<li class="' + serviceMenu[i].cssClass  + '">';
		retValue += '<a href="'+serviceMenu[i].linkUrl +'">'+serviceMenu[i].itemName+'</a></li> ';
	}
	retValue += '		</ul> ';
	retValue += '	</div> '; 
	return retValue;	
}


function HeaderCorner() { }

HeaderCorner.mouseOut = function(obj) {
	$(obj).attr("class",$(obj).attr("class").replace("on",""));							
}

HeaderCorner.mouseOver = function(obj) {
	$(obj).attr("class",$(obj).attr("class")+"on");
}

HeaderCorner.addFavorite = function(obj) {
	window.external.AddFavorite("http://www.about.co.kr","about - Shopping Search");
}

HeaderCorner.shortCut = function(obj) {
	window.open("http://www.about.co.kr/popup/AboutShortCut.htm", "AboutShortCut", "width=330, height=295, status=no, resizable=no, scrollbars=no ");
}


HeaderCorner.mouseOverSaleR = function(obj){
	$("#divSaleR").show();	
}

HeaderCorner.mouseOutSaleR = function(obj){
	$("#divSaleR").hide();
}


HeaderCorner.mouseOverBtnCompare = function(obj) {
	$(".topAdv .inner .topAdvLayer").show();
}
HeaderCorner.mouseOutDivCompare = function(obj) {
	$(".topAdv .inner .topAdvLayer").hide();	
}

HeaderCorner.setCookie = function( name, value, expiredays ) 
{ 
	var todayDate = new Date(); 
	todayDate.setDate( todayDate.getDate() + expiredays ); 
	todayDate.setHours(0,0,0,0);
	if(typeof(expiredays) == 'undefined' || expiredays == null || expiredays == "")
	{
		document.cookie = name + "=" + escape( value ) + ";path=/;domain=about.co.kr;";
		
	}
	else
	{
		document.cookie = name + "=" + escape( value ) + ";path=/;domain=about.co.kr;expires=" + todayDate.toGMTString() + ";" 
	}
		
		
}

HeaderCorner.getCookie = function( name ){
	var nameOfCookie = name + "=";
	var x = 0;
	while ( x <= document.cookie.length )
	{
		var y = (x+nameOfCookie.length);
		if ( document.cookie.substring( x, y ) == nameOfCookie ) {
		if ( (endOfCookie=document.cookie.indexOf( ";", y )) == -1 )
		endOfCookie = document.cookie.length;
		return unescape( document.cookie.substring( y, endOfCookie ) );
	}
	x = document.cookie.indexOf( " ", x ) + 1;
	if ( x == 0 )
		break;
	}
	return "";
}

HeaderCorner.OpenFlowerGarden = function() {
	var url = "http://finding.about.co.kr/Corner/FlowerGarden/Main.aspx";
	window.open(url, "", "toolbar=no,location=yes,directories=no,status=no,menubar=no,scrollbars=no, resizable=no,copyhistory=no ,width=1188 height=880, left=10,top=10");
}

HeaderCorner.LMoveRightBanner = function(){
	gAboutTic--;
	if(gAboutTic <= -1)
		gAboutTic = aboutHeaderBanner.length -1 ;
	HeaderCorner.BindRightBanner();
}

HeaderCorner.RMoveRightBanner = function(){
	gAboutTic++;
	if(gAboutTic >= aboutHeaderBanner.length)
		gAboutTic = 0;
	HeaderCorner.BindRightBanner();
}
HeaderCorner.BindRightBanner = function(){
		var bindHtml ="";
		if(typeof(aboutHeaderBanner) != 'undefined' && aboutHeaderBanner.length > 0)
		{
			if(aboutHeaderBanner[gAboutTic].imageType == "0")// 이미지 타입
			{
				bindHtml += ' <a href="'+ aboutHeaderBanner[gAboutTic].linkUrl +'" target="_self">';
				bindHtml += '	<img width="200px" height="70px" src="'+ locationProtocol + aboutHeaderBanner[gAboutTic].imageUrl.replace('http://','') + '" alt="'+''+'" />';
				bindHtml += '	</a>';
			} 
			else if(aboutHeaderBanner[gAboutTic].imageType == "1")// 플래시타입
			{
				bindHtml += '	<div id="gnbEventBannerSwf">\n';
				bindHtml += '	    <script type="text/javascript"> \n';
				bindHtml += '     var hbflashvars={ \n';
				bindHtml += '     // link  :  배너 클릭 시 이동할 링크 url \n';
				bindHtml += '     // target : 배너 클릭 시 이동할 링크 target \n';
				bindHtml += '     link : \''+ aboutHeaderBanner[aboutTic].linkUrl +'\', \n';
				bindHtml += '     target : \'_blank\' \n';
				bindHtml += '     }; \n';
				bindHtml += "     embedFlash('" + locationProtocol + aboutHeaderBanner[aboutTic].imageUrl.replace('http://','')  + "', 'gnbEventBannerSwf', '100%', '100%', \"opaque\", hbflashvars); \n";
				bindHtml += '    <\/script>\n';
				bindHtml += '   <\/div>\n';
			} 
			else
			{
				var hBannerHtml =  aboutHeaderBanner[gAboutTic].htmlContents.replace("[%=이미지%]", locationProtocol + aboutHeaderBanner[gAboutTic].imageUrl.replace('http://','') );			
				hBannerHtml = hBannerHtml.replace("[%=링크%]", aboutHeaderBanner[gAboutTic].linkUrl );
				bindHtml += hBannerHtml;
			}
			if(aboutHeaderBanner.length>1)
			{
				bindHtml += '<div class="btn_rolling">';
				bindHtml += '<a onclick="HeaderCorner.LMoveRightBanner()" style="cursor:pointer;" class="prev" title="이전배너"></a>';
				bindHtml += '	<a onclick="HeaderCorner.RMoveRightBanner()" style="cursor:pointer;" class="next" title="다음배너"></a>';
				bindHtml += '</div>';
				
			}
			$("#gnbEventBannerDiv").html(bindHtml);
		}	
}

////////////////////////////////////////
// Header Display 호출
////////////////////////////////////////
if (typeof(headerType) == "undefined") var headerType = "A";

if (typeof(gMenuLocation ) == "undefined") var gMenuLocation  = '';

var txtHeader = '';
if(headerType != "S")
{
	txtHeader = TopHeader.setNavigationTab(headerType);
}
else
{
	txtHeader = TopHeader.setSocialShoppingGNB();	
}

//if (locationProtocol == "http://")
//{

document.write(txtHeader);

var istop = GetUrlParamVal("istop");
if (istop.toLowerCase() == "y") {
    //0건 검색결과 재검색에 대한 키워드 처리.
    if (GetUrlParamVal("isZeroResultRetry") == "true") {
        $("#htxtHeaderSearch").val(GetUrlParamVal("userTypedKeyword"));
    }
    else {
        $("#htxtHeaderSearch").val(GetUrlParamVal("keyword")); 	// 추가(2010.11.11) // [&#50939] 검색시 [웻] 으로 보이는 현상등으로 인해서 이곳에서 셋팅을 해준다
    }
}


function headerPbpBanner() {  };

headerPbpBanner.index = 0;
headerPbpBanner.maxLength = 0;

headerPbpBanner.getRand = function(n) {
		var r = Math.round(Math.random()*n-0.5);
					if ( r < 0 ) { r=0; } return r;
}

headerPbpBanner.pbpInit = function() {
	
	if(typeof(aboutPbpBanners) == "undefined")
	{
		return;
	}
	
	randPosition = headerPbpBanner.getRand(aboutPbpBanners.length);
	
	
	if(headerType == "H")
	{
		headerPbpBanner.maxLength = 8;
	}
	else
	{
		headerPbpBanner.maxLength = 7;		
	}
	
	headerPbpBanner.movePbpBanner(randPosition);
	
}


headerPbpBanner.clickPbpBtn = function(movePoint) {
	headerPbpBanner.movePbpBanner(movePoint);
}

headerPbpBanner.movePbpBanner = function(movePoint)
{
	headerPbpBanner.index =  headerPbpBanner.index + movePoint;
	
	if(headerPbpBanner.index < -1)
	{
		headerPbpBanner.index = aboutPbpBanners.length -1;
	}
	else if( headerPbpBanner.index > aboutPbpBanners.length)
	{
		headerPbpBanner.index = 0;
	}
	var curPos = headerPbpBanner.index;
	var pbpListHtml = "<ul>";
	var maxLength = 0;
	if(headerPbpBanner.maxLength >= aboutPbpBanners.length)
	{
		maxLength = aboutPbpBanners.length;
	}
	else
	{
		maxLength =	headerPbpBanner.maxLength;	
	}
		
	for(i = 0 ; i< maxLength ;i++)
	{
		if(curPos < 0)
		{
			curPos = aboutPbpBanners.length -1;
		}
		else if( curPos >= aboutPbpBanners.length)
		{
			curPos = 0;
		}
		var linkUrl = 	aboutPbpBanners[curPos].linkUrl;
		if(linkUrl.indexOf("?")>0)
		{
			linkUrl += "&viewCode=0270020" + headerPbpBanner.fillZeroNum((curPos + 1),2);	
		}
		pbpListHtml += '<li><a href="'+ linkUrl +'"  target="_blank" >';
		var imgUrl = aboutPbpBanners[curPos].imageUrl1.replace('http://','');
		if(locationProtocol == "https://")
		{
			imgUrl = imgUrl.replace("i.iabout.kr","is.iabout.kr");
		}
		
		pbpListHtml += '<img src="'+ locationProtocol + imgUrl +'" alt="'+ aboutPbpBanners[curPos].title1 +'"  width="88px" height="23px" />';
		pbpListHtml += '</a></li>';
		curPos++;
	}
	pbpListHtml += "</ul>";
	
	$("div.bnrRateArea > dl > dd ").html(pbpListHtml);
}

headerPbpBanner.fillZeroNum = function(num,len) {
				var temp = num.toString();
				var length = len - temp.length;
				var ret = "";
				for (idx = 0; idx < length; idx++) {
					ret += "0"
				}
				ret += temp;
				return ret;
			}
	
	


	$(document).ready(function() {

				if(headerType != "S")
				{
					// 코너링크 바인딩.     
					setTimeout(function() {
						// 코너링크 바인딩
						$("div#hsz_inner.hsz_inner div.cornerLink").html(TopHeader.getCornerList());
						// 코너링크 이벤트 처리
						$("div#hsz_inner.hsz_inner div.cornerLink ul li a").each(function(index) {
							$(this).mouseleave(function() {
								if (gMenuLocation == '' || $(this).attr("class").indexOf(gMenuLocation) == -1) {
									var className = $(this).attr("class").replace("on", "");
									$(this).attr("class", className);
								}
	
							});
							$(this).mouseover(function() {
								if (gMenuLocation == '' || $(this).attr("class").indexOf(gMenuLocation) == -1) {
									var className = $(this).attr("class") + "on";
									$(this).attr("class", className);
								}
							});
	
						}
					);
						// 오늘의 쿠폰 랜더링
						$("div#hsz_inner.hsz_inner div.tCoupon").html(TopHeader.getCouponList());
	
						// 네비게이션 전체보기
						$(".cateList .cateN .catekeyList .in-line").append(TopHeader.getTotalCateNavi());
						// 이 메서드는 design.js에 있음. 카테고리 전체 보기 
						mcategoryKeyword();
	
	
					}, 5);
	
	
					// 네비게이션바 바인딩
	
	
					setTimeout(function() {
	
						$(".cateList .hotcateList .hcate:eq(0)").append(TopHeader.getHotcateList(0));
						$(".cateList .hotcateList .hcate:eq(1)").append(TopHeader.getHotcateList(1));
						$(".cateList .hotcateList .hcate:eq(2)").append(TopHeader.getHotcateList(2));
						$(".cateList .hotcateList .hcate:eq(3)").append(TopHeader.getHotcateList(3));
						$(".cateList .hotcateList .hcate:eq(4)").append(TopHeader.getHotcateList(4));
	
						// 최상단 노드 마우스 오버 이벤트		
						$(".hsz_in .hotcateList div.hcate").mouseover(function() {
							var tempClass = $(this).attr("class");
	
							$(this).addClass("cateOn");
							$(this).css("z-index", "100");
							$("h3", this).addClass("on");
							$("div.in-line", this).css("z-index", "100");
							$("div.in-line", this).css("display", "block");
							//$("div.in-line .box", this).css("visibility","visible");
							//$(".box", this).css("visibility","visible");
							//$($(this).attr("class"));
	
						});
	
						// 최상단 노드 마우스 아웃 이벤트
						$(".hsz_in .hotcateList div.hcate").mouseleave(function() {
							var tempClass = $(this).attr("class");
	
							$(this).removeClass("cateOn");
							$(this).css("z-index", "0");
							$("h3", this).removeClass("on");
							$("div.in-line", this).css("z-index", "0");
							$("div.in-line", this).css("display", "none");
							//$("div.in-line div.catekey-sub div.cateSList-sub", this).css("visibility","");
						});
	
						// li이벤트 처리
						$(".hsz_in .hotcateList div.hcate div.box ul li").mouseover(function() {
							$(this).addClass("mhover");
						});
	
						$(".hsz_in .hotcateList div.hcate div.box ul li").mouseleave(function() {
							$(this).removeClass("mhover");
						});
					}, 500);
	
					// 우측배너 바인딩
					setTimeout(function() {
						if (typeof (aboutHeaderBanner) == 'undefined') return;
						if (aboutHeaderBanner.length > 0) {
							gAboutTic = new Date().getSeconds() % aboutHeaderBanner.length;
						}
						HeaderCorner.BindRightBanner();
					}, 2500);
	
					// pbp Banner 바인딩
					if (typeof (aboutPbpBanners) != "undefined") {
						setTimeout(function() {
							headerPbpBanner.pbpInit();
	        
							//if	
							if ((headerType == "H" && aboutPbpBanners.length > 8) || (headerType != "H" && aboutPbpBanners.length > 7)) {
								$("div.bnrRateArea div.btn-pn a.btn_prev").css("cursor", "pointer");
								$("div.bnrRateArea div.btn-pn a.btn_next").css("cursor", "pointer");
								$("div.bnrRateArea div.btn-pn a.btn_prev").click(function() {
									headerPbpBanner.clickPbpBtn(1);
								}
						);
	        
								$("div.bnrRateArea div.btn-pn a.btn_next ").click(function() {
									headerPbpBanner.clickPbpBtn(-1);
								}
						);
							}
	        
						}, 1000);
					}
			}
	})

	
	function hotcateOver(obj)
	{
		$("#"+ obj).css("visibility","visible");
		$("#"+ obj).addClass("mhover");
		$("a:first",$("#"+ obj).parent()).addClass("on");		
	}
	
	function hotcateOut(obj)
	{
		$("#"+ obj).css("visibility","");
		//$("#"+ obj).attr("class","mhover");
		$("#"+ obj).removeClass("mhover");
		$("a:first",$("#"+ obj).parent()).removeClass("on");		
	}
	
	function logoScreensaverClick()
	{
		window.open("http://www.about.co.kr/popup/aboutScreenSaverDownload.htm", "aboutScreenSaverDownload", "width=330, height=355, status=no, resizable=no, scrollbars=no ");
	}
	
	String.prototype.startsWith = function(str){     return (this.indexOf(str) === 0); } 