$(function(){ $(".links li").eq(0).children(".link").css("display","block").siblings(".title").css("color","#005a99").css("font-weight","bold").css("background","url(/news/web/images/links_li_bg.jpg) repeat-x"); var h1=$(".links li").eq(0).children(".link").height(); $(".links").height(h1+32); $(".links li").mouseenter(function(){ var h=$(this).children(".link").height(); $(".links").height(h+32); $(this).children(".title").css("cursor","pointer").css("color","#005a99").css("font-weight","bold").css("background","url(/news/web/images/links_li_bg.jpg) repeat-x").siblings(".link").css("display","block").end().parent("li").siblings("li").children(".title").css("color","#444444").css("font-weight","normal").css("background","#f3f3f3").siblings(".link").css("display","none"); }); });