nwt.js
function() {

						var self = this, item;

						self.inWork = true;
						
						if (!self.queue.length) {
							return;
						}
						
						item = self.queue.shift();

						if (item.type == 'wait') {
							setTimeout(function(){
								self._process();
							}, item.duration*1000);
						} else {
							self.context = item.func.apply(self.context, item.args);
							self._process();
						}
						return self;
					}
function() {

						var self = this, item;

						self.inWork = true;
						
						if (!self.queue.length) {
							return;
						}
						
						item = self.queue.shift();

						if (item.type == 'wait') {
							setTimeout(function(){
								self._process();
							}, item.duration*1000);
						} else {
							self.context = item.func.apply(self.context, item.args);
							self._process();
						}
						return self;
					}
function ( ) { var self = this , item ; self . inWork = true ; if ( ! self . queue . length ) { return ; } item = self . queue . shift ( ) ; if ( item . type == 'wait' ) { setTimeout ( function ( ) { self . _process ( ) ; } , item . duration * 1000 ) ; } else { self . context = item . func . apply ( self . context , item . args ) ; self . _process ( ) ; } return self ; }
Process the queue
Shifts an item off the queue and waits for it to finish
Process the queue Shifts an item off the queue and waits for it to finish