code: function () {
  
              // Generating noty bar
              var $bar = $('<div class="noty_bar noty_type_' + this.options.type + '"></div>').attr('id', this.options.id);
              $bar.append(this.options.template).find('.noty_text').html(this.options.text);
  
              this.$bar = (this.options.layout.parent.object !== null) ? $(this.options.layout.parent.object).css(this.options.layout.parent.css).append($bar) : $bar;
  
  			if (this.options.themeClassName)
  				this.$bar.addClass(this.options.themeClassName).addClass('noty_container_type_' + this.options.type);
  
              // Set buttons if available
              if (this.options.buttons) {
  
                  // If we have button disable closeWith & timeout options
                  this.options.closeWith = [];
                  this.options.timeout = false;
  
                  var $buttons = $('<div/>').addClass('noty_buttons');
  
                  (this.options.layout.parent.object !== null) ? this.$bar.find('.noty_bar').append($buttons) : this.$bar.append($buttons);
  
                  var self = this;
  
                  $.each(this.options.buttons, function (i, button) {
                      var $button = $('<button/>').addClass((button.addClass) ? button.addClass : 'gray').html(button.text).attr('id', button.id ? button.id : 'button-' + i)
                          .appendTo(self.$bar.find('.noty_buttons'))
                          .bind('click', function () {
                              if ($.isFunction(button.onClick)) {
                                  button.onClick.call($button, self);
                              }
                          });
                  });
              }
  
              // For easy access
              this.$message = this.$bar.find('.noty_message');
              this.$closeButton = this.$bar.find('.noty_close');
              this.$buttons = this.$bar.find('.noty_buttons');
  
              $.noty.store[this.options.id] = this; // store noty for api
  
          }
docs: end init