var $j = jQuery.noConflict();

function selectItem(obj) {
    if (obj) {
        var text = $j(obj).html();
        $j(obj).closest('dl').children("dt").children("a").children("span").html(text);
        $j(".dropdown dd ul").hide();
        $j(obj).closest('dl').children("input").attr("value", $j(obj).attr('attr_value'));
    }
}

function create_combos() {
    $j(".dropdown dt a").click(function () {
        $j(this).closest('dl').children("dd").children("ul").toggle();
        return (false);
    });

    $j(".dropdown dd ul li a").click(function () { selectItem(this); return (false); });

    $j(document).bind('click', function (e) {
        var $jclicked = $j(e.target);
        if (!$jclicked.parents().hasClass("dropdown"))
            $j(".dropdown dd ul").hide();
    });


};

