/* gnb ¸Þ´º */ function gnbMenu(depth1,depth2,depth3){ $("#header .gnb li a").bind('focusin mouseenter',function() { $(this).parent().find("ul").slideDown("fast"); $(this).parent().find("ul").css("display", "block"); $(this).addClass('on'); $(this).parent().siblings().find("ul").css("display", "none"); $(this).parent().siblings().find("a").removeClass('on'); }); $("#header .gnb").bind('mouseleave',function() { $(this).children('li').find('ul').css("display", "none"); $(this).children('li').find("a").removeClass('on'); $('#header .gnb > li:eq('+depth1+') > a').addClass("on") $('#header .gnb > li:eq('+depth1+') > a').parent().find("ul").css("display", "none"); $('#header .gnb > li:eq('+depth1+') ul li:eq('+depth2+') > a').addClass("on") }); if ( $('#header .gnb > li').size() > depth1){ $('#header .gnb > li:eq('+depth1+') > a').addClass("on") $('#header .gnb > li:eq('+depth1+') > a').parent().find("ul").css("display", "none"); $('#header .gnb > li:eq('+depth1+') ul li:eq('+depth2+') > a').addClass("on") } if ( $('.lnb ul > li').size() > depth2){ //¿ÞÂÊ $('.lnb ul > li:eq('+depth2+') > a').addClass("on") $('.lnb ul > li:eq('+depth2+') .lnbdep2 li:eq('+depth3+') > a').addClass("on") } }