docs: function (arr, action) {
  		return $.Deferred(function (dfd) {
  			var doNext = function () {
  				if (arr == null || arr.length === 0) {
  					dfd.resolve();
  				} else {
  					var item = arr.shift();
  					action(item).done(function () {
  						doNext();
  					});
  				}
  			};
  
  			if (typeof arr == "function") {
  				arr().done(function (items) {
  					arr = items;
  					doNext();
  				});
  			} else {
  				doNext();
  			}
  		}).promise();
  
  	}