accordion and IE6, 7

accordion and IE6, 7


I'm using the accordion function to display a dynamic menu on the left
of my page.
Using firefox this works perfectly and scrolls the menus as expected.
Using IE the output is not corrected. The menu options are not
correctly folded, etc.
I'm using the following code;
<script type="text/javascript">
$(document).ready(function(){
     $('#accordion').accordion({ autoHeight: false });
});
and then the php to generate the menu structure;
<div id="menu_items" title="Links">
    <div id="accordion">
            <?php
            // Load Menus
            $menus = doquery("select paglnk, pageid from cgilib/ur3897pf where
lnkact='Y' and pagchl='M'");
            foreach ($menus as $menu_item)
            {
                // get all items for current menu
                $options = doquery("select paglnk, pagurl from cgilib/ur3897pf
where lnkact='Y' and pagchl<>'M' and pageid='".$menu_item
["PAGEID"]."'");
                print '<h3><a href="#">'.$menu_item["PAGLNK"].'</a></h3><div >';
                if ($options)
                {
                    foreach ($options as $opt)
                    {
                        print "

<a href='".$opt["PAGURL"]."'>".$opt["PAGLNK"]."

";
                    }
                }
                else {
                    print "

No menu items currently setup

";
                }
                print '</div>';
            }
            ?>
    </div>
</div>
All this works perfectly in Firefox......Is there something setting I
need to change?
Thanks
Steve