var UIDialog = makeClass(); UIDialog.prototype.init = function(options) { var dialog = this; dialog.defaultOptions = { type: 'Error', content: null, buttons: null } dialog.options = $.extend({}, dialog.defaultOptions, options); switch(dialog.options.type) { case 'Error': dialog.content = '