code: function popinClose(name) {
              var id = null, $el = null;
              if ( typeof(name) == 'string' && name != '' ) {
                  if (name !== $popin.name)
                      throw new Error('Popin `'+name+'` not found !');
              }
              // by default
              id = $popin.id;
  
              $el = $popin.target;
  
              if ( $el != null && /gina-popin-is-active/.test($el.className) ) {
                  instance.target.firstChild.className  = instance.target.firstChild.className.replace(/\sgina-popin-is-active|gina-popin-is-active|gina-popin-is-active\s/, '');
                  $el.className           = $el.className.replace(/\sgina-popin-is-active|gina-popin-is-active|gina-popin-is-active\s/, '');
                  $el.innerHTML = '';
  
                  // removing from FormValidator instance
                  var i = 0, formsLength = $popin['$forms'].length;
                  if ($validator['$forms'] && formsLength > 0) {
                      for (; i < formsLength; ++i) {
                          if ( typeof($validator['$forms'][ $popin['$forms'][i] ]) != 'undefined' )
                              $validator['$forms'][ $popin['$forms'][i] ].destroy();
  
                          $popin['$forms'].splice( i, 1);
                      }
                  }
                  // remove listeners
                  removeListener(gina, $popin.target, 'loaded.' + $popin.id);
  
  
  
  
                  $popin.isOpen = false;
  
                  // restore toolbar
                  if ( gina && typeof(window.ginaToolbar) == "object" )
                      ginaToolbar.restore();
  
                  triggerEvent(gina, $popin.target, 'close.'+ id, $popin);
              }
          }
docs: popinClose
  
  Closes a popin by `name` or all `is-active`
  
  @parama {string} [name]