Style link for current page

Style link for current page

I'm using this to animate link color on hover...

  1. <script type="text/javascript">
  2. $(document).ready(function(){
  3.     $(".hamenu a").stop().hover(function() {
  4.                 $(this).stop().animate({ color: "#a56a32" }, 500);
  5.         },function() {
  6.     $(this).animate({ color: "#5f6062" }, 1000);
  7.         });
  8.   });
  9. </script>

I now want to apply the hover color to the link that matches the current page.

I found this code...

  1. <script type="text/javascript" charset="utf-8">
  2. //<![CDATA[
  3. jQuery(function() {
  4.   jQuery('.primary-nav a').each(function() {
  5.     if (jQuery(this).attr('href')  ===  window.location.pathname) {
  6.       jQuery(this).addClass('current');
  7.     }
  8.   });
  9. }); 
  10. //]]>
  11. </script>

... but I need help integrating it into the animate code.

One issue I see is that applying a class will not override the 'style="#color' that get's applied to the href in the animate script, correct?