code: function(event){
  			var self = this;
  			self.$instance.hide().appendTo(self.root);
  			if((!event || !event.isDefaultPrevented())
  				&& self.beforeOpen(event) !== false) {
  
  				if(event){
  					event.preventDefault();
  				}
  				var $content = self.getContent();
  
  				if($content) {
  					opened.push(self);
  
  					toggleGlobalEvents(true);
  
  					self.$instance.fadeIn(self.openSpeed);
  					self.beforeContent(event);
  
  					/* Set content and show */
  					return $.when($content)
  						.always(function($openendContent){
  							if($openendContent) {
  								self.setContent($openendContent);
  								self.afterContent(event);
  							}
  						})
  						.then(self.$instance.promise())
  						/* Call afterOpen after fadeIn is done */
  						.done(function(){ self.afterOpen(event); });
  				}
  			}
  			self.$instance.detach();
  			return $.Deferred().reject().promise();
  		}
docs: /* opens the lightbox. "this" contains $instance with the lightbox, and with the config.
  Returns a promise that is resolved after is successfully opened.