  (function($) {
/**
* jQuery delayed event execution.
*/
		$.fn.delay = function(options) {
			var timer;
			var delayImpl = function(domElem,eventObj) {
				if (timer != null) {
					clearTimeout(timer);
				}
				var newFn = function() {
					options.fn.call(domElem, eventObj);
				};
				timer = setTimeout(newFn, options.delay);
			}	

			return this.each(function() {
				var obj = $(this);
				obj.bind(options.event, function(eventObj) {
					delayImpl(this,eventObj);
				});
			});
		};
	})(jQuery);
