Here's my answer using jQuery:
jQuery.fn.ddnav = function() {
this.wrap("");
this.each(function() {
var sel = document.createElement('select');
jQuery(this).find("li.label, li a").each(function() {
jQuery("
And then in your onready handler:
$("ul.dropdown_nav").ddnav();
But I would point out that these are terrible for usability. Better to use a list and show people all of the options at once, and it's better to not navigate away after a selection and/or require a different button to be pushed to get to where they want.
I think you're best off never using the above (and I wrote the code!)