/*
 * Author: CM
 */
(function($) {
	$.event.special.clickConfirmed = {
		bindType: "click",
		delegateType: "click",

		settings: {
			message: 'Please Confirm'
		},

		handle: function(event) {
			var $this = $(this);

			var activateButton = function() {
				$this.addClass('confirmClick');
				$this.attr('title', $.event.special.clickConfirmed.settings.message).tooltip({trigger: 'manual'}).tooltip('show');
				$this.data('timeoutId', setTimeout(function() {
					deactivateButton();
				}, 5000));
				setTimeout(function() {
					$(document).one('click.clickConfirmed', function(e) {
						if (!$this.length || e.target !== $this[0] && !$.contains($this[0], e.target)) {
							deactivateButton();
						}
					});
				}, 0);
			};

			var deactivateButton = function() {
				$this.removeClass('confirmClick');
				$this.removeAttr('title').tooltip('hide');
				clearTimeout($this.data('timeoutId'));
				$(document).off('click.clickConfirmed');
			};

			if ($this.hasClass('confirmClick')) {
				deactivateButton();
				return event.handleObj.handler.call(this, event);
			}
			activateButton();

			return false;
		}
	};
})(jQuery);

@@ -212,16 +212,49 @@
 $(this);
+%0A%09%09%09var deactivateTimeout = null;
 %0A%0A%09%09%09var
@@ -447,31 +447,27 @@
 %09%09%09%09
-$this.data('t
+deactivateT
 imeout
-Id',
+ =
  set
@@ -524,17 +524,16 @@
 %7D, 5000)
-)
 ;%0A%09%09%09%09se
@@ -908,31 +908,25 @@
 out(
-$this.data('t
+deactivateT
 imeout
-Id')
 );%0A%09

Store timeoutId in local variable