accordion with cufon replacemant

accordion with cufon replacemant

Hello from an absolute newbie!

I downloaded and use the jquery UI accordion, wich is working well - of course no problem!
At the next step i tried to replace the clickable headlines at the accordion (for me these are the h6-tags!) with cufon font-replacement - the following js-lines (sorry, js-newbie!):
  1. $(function(){

                    // Accordion
                    $("#accordion").accordion({
                    header: "h6",
                    autoHeight: false
                    });
                   
                    //hover states on the static widgets
                    $('#dialog_link, ul#icons li').hover(
                        function() { $(this).addClass('ui-state-hover'); },
                        function() { $(this).removeClass('ui-state-hover'); }
                    );
                                   
                    $('h6').click(function() {
                            Cufon.replace('h6', {hover: true});
                   
                    });
                   
                    $('h6').hover(function() {
                    Cufon.replace('h6', {hover: true});
           
                    });



    });

























The solution works nearly well in IE6 IE7 IE8 and of course in Firefox. My only Problem is, that if you're loading the page and haven't hovered or clicked any h6-tag, then i'm missing my active-color of the first open element h6-tag of the accordion! Of course the replacement in my solution is only working with hover and click, but i'm not sure how to get the first h6-tag in my desired active accordion-color...

Any suggestions for an newbie at js?!?

thx in advance