Improved the code to add attributes to the main <ul> in theme_menu().