Loading
Please wait...
var timeout = 500; var closetimer = 0; var menuitem = 0; function nav_open() { nav_canceltimer(); nav_close(); menuitem = $(this).find('ul').eq(0).css('visibility', 'visible'); } function nav_close() { if (menuitem) menuitem.css('visibility', 'hidden'); } function nav_timer() { closetimer = window.setTimeout(nav_close, timeout); } function nav_canceltimer() { if (closetimer) { window.clearTimeout(closetimer); closetimer = null; } } $(document).ready(function () { $('#nav-top > li').bind('mouseover', nav_open); $('#nav-top > li').bind('mouseout', nav_timer); $('#brand').bind('mouseover', nav_open); $('#brand').bind('mouseout', nav_timer); }); document.onclick = nav_close;