(function() {
    var window = this, undefined, jsx = window.jsx = {};
    
    jsx.initialize = function(element, className, options) {
        var initObj, jqelem;
		if (typeof className.onInitialize == "function") {
			className.onInitialize(element, options);
		}
        $(function() {
			jqelem = $(element).get(0);
			if (!jqelem) {
				jqelem = $("#"+element).get(0);
			}
            if (typeof className == "function") {
                initObj = new className(jqelem, options);
            }
        });
        return initObj;
    }
})();
