Accordion Hover Issue

Accordion Hover Issue


Hello,
I am working with the accordion and everything works great except for
the fact that when I slowly hover over the next "li", it puts the
class on the new element, but doesn't adjust the elements through
javascript. The .selected be on the previous element, but the
mouseover function will not fire until later. It is not very
consistant either. I don't know if this is a bug or just my code.
Here is my code
jQuery("#slider").accordion({
active: '.selected',
navigation: true,
fillSpace: true,
autoheight: true,
animated: "easeslide",
event: "mouseover"
});
$("#slider li").mouseover(function(){
$("#slider li a").animate({visibility:"visible", opacity:1,
height:"25px"},{duration: 250, queue: false, easing: "easein"});
$("#slider li a.selected").animate({visibility:"visible",
opacity:.01, height:"150px"},{duration: 250, queue: false, easing:
"easein"});
});
$("#slider li").mouseout(function(){
$("#slider li a").animate({visibility:"visible", opacity:1,
height:"50px"},{duration: 250, queue: false, easing: "easein"});
});
Thanks