function makeDropdown(source, callbackFunc) {
	// get selected option, and the list of options in the selectbox
	var selected = $(source).find("option[selected]");
	var options = $("option", source);
	
	// start a dl in which we will put all our html
	var newDropdown = $('<dl class="dropdown"></dl>').hide();

	// we start with the selected option as it should sit in the top box
	if ($(selected).attr("icon")) {
		text = "<img src=" + $(selected).attr("icon") + " />";
	} else {
		text = $(selected).text();
	}	
		
	newDropdown.append(
		'<dt>' +
		'<span class="text">' + text + '</span>' +
		'<span class="value">' + selected.val() + '</span>' +
		'</dt>');

	// we start a new ul to hold all the options
	var newDropdownList = $('<ul></ul>');

	// fill in the options
	options.each(function(){			
					if ($(this).attr("icon")) {
						text = "<img src=" + $(this).attr("icon") + " />";
					} else {
						text = $(this).text();
					}	
					
					$(newDropdownList).append(
						'<li>' + 
						'<span class="text">' + text + '</span>' +
						'<span class="value">' + $(this).val() + '</span>' +
						'</li>');
				});
	
	// wrap the options-ul in a dd
	$('<dd></dd>').append(newDropdownList).appendTo(newDropdown);
	
	// append to the source's parent
	$(source).parent().append(newDropdown);
	
	// handle some events
	// 1) if you click the main link, open or close the dropdown
	$(newDropdown).find("dt").click(function() {
		if ($(this).parent().parent().find("ul").css("display") == "none") {
			$("dl.dropdown").removeClass("opened"); $(newDropdown).addClass("opened");
			
			$("dl.dropdown ul").hide();
			$(this).parent().parent().find("ul").show();
		} else {
			$("dl.dropdown").removeClass("opened");		
			$("dl.dropdown ul").hide();
		}
	});				
	// 2) if you click on an option, make it the selected value
	$(newDropdown).find("dd ul li").click(function() {
		var text = $(this).find("span.text").html();
		var selectedValue = $(this).find("span.value").html()
		
		$(this).parent().parent().parent().find("dt span.text").html(text);
		$(this).parent().parent().parent().find("dt span.value").html(selectedValue);
		$("dl.dropdown").removeClass("opened");				
		$(this).parent().hide();					
		
		// return callback function
		$(source).val(selectedValue);
		callbackFunc(selectedValue);				
	});
	// 3) if you click anywhere else, close the dropdown
	$(document).bind('click', function(e) {
		var $clicked = $(e.target);
		if (! $clicked.parents().hasClass("dropdown")) {
			$("dl.dropdown").removeClass("opened");				
			$(".dropdown dd ul").hide();
		}
	});	            
	
	// hide the source!
	$(source).hide();
	
	// enter new dropdown!
	$(newDropdown).show();
}
