//jquery.multiChooser.js
//mysewingcircle.com

//jQuery extension to providea reusable popup chooser

(function($) {
    $.widget("ui.multichooser", {
        options : {
            editable: true,
            selectedClass: "button-category"
        },
        _create: function() {
		    alert("test");
            var self = this;
            var el = self.element;

            el.hide();
            //create a choose button
            //this.prepend("<a>Choose...</a>");
        },
        destroy: function() {
            $.Widget.prototype.destroy.apply( this, arguments );
        },
        _setOption: function(option, value) {
            $.Widget.prototype._setOption.apply(this, arguments);
        }
    });

//    $.extend($.ui.multichooser, {
//    });

})(jQuery);




        //make choose category button work
//        $("#choose-category").click(function(e) {
//           //$("#attach-pattern-id").val(""); //clear selection
//           $('#category-popup').dialog('open');
//           e.preventDefault();
//        });

        //create a dialog
        //make the category dialog
//        $("#category-popup").dialog({
//            bgiframe: true,
//            autoOpen: false,
//            width: 700,
////            height: 480,
//            modal: true,
//            buttons: {
//                'close': function() {
//                    $(this).dialog('close');
//                }
//            },
//            close: function() {
//                //what to do when you exit.
//            }
//        });


        //create a readonly representation

        //create delete buttons

