code: function(event){
  			var self = this,
  				deferred = $.Deferred();
  
  			if(self.beforeClose(event) === false) {
  				deferred.reject();
  			} else {
  
  				if (0 === pruneOpened(self).length) {
  					toggleGlobalEvents(false);
  				}
  
  				self.$instance.fadeOut(self.closeSpeed,function(){
  					self.$instance.detach();
  					self.afterClose(event);
  					deferred.resolve();
  				});
  			}
  			return deferred.promise();
  		}
docs: /* closes the lightbox. "this" contains $instance with the lightbox, and with the config
  returns a promise, resolved after the lightbox is successfully closed.