$.ui.dialog.prototype._createButtons = function(buttons) {
	var self = this,
		hasButtons = false,
		uiDialogButtonPane = $('<div></div>')
			.addClass(
				'ui-dialog-buttonpane ' +
				'ui-widget-content ' +
				'ui-helper-clearfix'
			);

	// if we already have a button pane, remove it
	this.uiDialog.find('.ui-dialog-buttonpane').remove();

	(typeof buttons == 'object' && buttons !== null &&
		$.each(buttons, function() { return !(hasButtons = true); }));
	if (hasButtons) {
		$.each(buttons, function(name, fn) {
			$('<button type="button"><span></span></button>')
				.addClass(
					'ui-state-default ' +
					'ui-corner-all'
				)
				.find("span")
				.text(name)
				.parent()
				.click(function() { fn.apply(self.element[0], arguments); })
				.hover(
					function() {
						$(this).addClass('ui-state-hover');
					},
					function() {
						$(this).removeClass('ui-state-hover');
					}
				)
				.focus(function() {
					$(this).addClass('ui-state-focus');
				})
				.blur(function() {
					$(this).removeClass('ui-state-focus');
				})
				.appendTo(uiDialogButtonPane);
		});
		uiDialogButtonPane.appendTo(this.uiDialog);
	}
}