var menuRight = document.getElementById( 'cbp-spmenu-s2' ), showRightPush = document.getElementById( 'showRightPush' ), body = document.body; showRightPush.onclick = function() { classie.toggle( this, 'active' ); classie.toggle( body, 'cbp-spmenu-push-toleft' ); classie.toggle( menuRight, 'cbp-spmenu-open' ); disableOther( 'showRightPush' ); }; function disableOther( button ) { if( button !== 'showRightPush' ) { classie.toggle( showRightPush, 'disabled' ); } } $(document).ready(function(){ $(".topnav").click(function() { //마우스를 topnav에 오버시 $(this).parent().find(".subnav").toggle(10).show(); //subnav가 내려옴. }); $(window).load(function() { $('.flexslider').flexslider({ animation: "slide" }); });; }); 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 != 15) { $(".gnb li.hn" + page.hn + " a").addClass("on"); //1depth 활성 } if(page.hn >= 11) { $(".snb 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 활성 }