animate if a class exist

animate if a class exist

Not sure if I am planning to make this to work using this direction but.

ON this site. http://hegele.bolderimage.com/ I have a carousel , when you hover over a label slides down with fading red background. And it slides up when you hover over another one.

Each label has a red background on the active CSS class.

For the active labels, I was wandering to have the them to slides down and up the same way they do when you rollover them. But I want them to do that automatically in addition to the red background.

Here is what I use for animated rollovers:

  1. $(".coda-nav li").hover(function(){  
  2.       $(this).stop().animate({ backgroundColor: "#ED1C2D", height: "85px" }, 300); }, 
  3.       function() {  
  4.       $(this).stop().animate({ backgroundColor: "#999B9E", height: "55px" }, 300);
This is what I was trying to implement but it does not work
  1. function HegeleDown() {       
  2. if ($('.coda-nav li').hasClass("current")) {  
  3.       $('.coda-nav li').animate({ backgroundColor: "#ED1C2D", height: "85px" }, 300); }        
  4. else {  
  5.       $('.coda-nav li').animate({ backgroundColor: "#999B9E", height: "55px" }, 300);   } }  
  6. HegeleDown();