/*$(document).ready(function(){ $("#gnb").hover( function(){ $("#snb01").slideDown('500'); }, function(){ $("#snb01").hide(); } ); }); */ $(document).ready(function(){ $(".topnav").hover(function() { $(this).parent().find(".subnav").slideDown('normal').show(); $(this).parent().hover(function() { }, function(){ $(this).parent().find(".subnav").slideUp('fast'); }); }); }); /* $(function(){ $('.gnb li').hover(function(){ $('.sub',this).stop().slideDown(); }, function(){ $('.sub',this).stop().slideUp(); }); }); */ /* $(function() { var offset = $("#quick").offset(); var topPadding = 30; $(window).scroll(function() { if ($(window).scrollTop() > offset.top) { $("#quick").stop().animate({ marginTop: $(window).scrollTop() - offset.top + topPadding }, 500); } else { $("#quick").stop().animate({ marginTop: 0 }); }; }); }); */ function setPage(arg) { //navigation hn:1depth, sn:2depth, cn:3depth 를 받음 page = jQuery.extend({ hn : "", sn : "", cn : "" }, arg || {}); if(window.console) { console.log("hn : " + page.hn + "\nsn : " + page.sn + "\ncn : " + page.cn); } if(page.hn != 10) { $(".snb > ul > li.hn" + page.hn + " > a").addClass("on"); //1depth 활성 } if(page.hn >= 11) { $(".snb > ul > li.hn" + page.hn + " > a").addClass("on"); //유틸 1depth 활성 } $(".snb ul li.sn" + page.sn).find("> a").addClass("on").end().find("> ul").addClass("on").find("> li.cn" + page.cn + " a").addClass("on"); //2depth 활성 }