(function($) {
	$.delay = function( callback, object ) {
		var found = false;
		$.each( $.delay.list, function() {
			if( this.callback == callback && this.obejct == object ) {
				found = true;
			}
		});
		
		if( !found ) {
			$.delay.list.push({'callback':callback,'object':object});
			if( $.delay.timer  == null ) {
				$.delay.timer = window.setTimeout($.delay.call,0);
			}
		}
	}
	
	$.delay.call = function() {
		var list = $.extend({}, $.delay.list);
		$.delay.timer = null;
		$.delay.list = new Array();
		$.each(list, function() {
			if( this.object ) {
				this.callback.apply(this.object);
			} else {
				this.callback.call();
			}
		});
	}
	
	$.delay.timer = null;
	$.delay.list = new Array();
})(jQuery);
