/* Grab the quick jump menu and
   turn it into a flyout menu
------------------------------------ */
$(document).ready(function() {
  
  // assign a class to the menu to know we've taken control of it
  $("#accountlnks").addClass("flyout");
  
  // for the account links flyout menu, let's add a default option
  // that is not clickable for the drop-down and then put the remaining
  // list items as a sub-list to this default option
  $("#accountlnks").prepend("<ul><li>Your Account</li></ul>");
  $("#accountlnks ul:first li:first").append($("#accountlnks ul:last"));
  
  // for IE's sake, let's add a class to the top-level LI element
  // so that IE can mimic the hover effect on list items
  if ($.browser.msie) {
      
      $("#accountlnks ul:first li:first ul:first").wrap("<div></div>");
    
      $("#accountlnks ul:first li:first").bind("mouseover", function() {
          $(this).addClass("sfhover");
      });
      
      $("#accountlnks ul:first li:first").bind("mouseout", function() {
          $(this).removeClass("sfhover");
      });
  }
  
});
