$(function(){ if($('#nav').length > 0) { var tom = null; $('#nav >li:not(.nav-sp)').mouseover(function(){ cleartimeout(tom); if($(this).find('dl')) { $('#nav li dl.open').stop(); $('#nav li dl.open').hide().removeclass('open'); $('#nav div.darrow').hide(); $(this).find('dl').addclass('open'); $(this).find('dl').show(); $(this).find('div.darrow').show(); } return false; }).mouseout(function(){ var ul = $(this).find('dl'); var t = $(this); tom = settimeout(function(){ ul.stop(true,true); ul.hide(); ul.removeclass('open'); t.find('div.darrow').hide(); }, 200); }); }; });