docs: function popinLoad(name, url, options) {
  
              var id          = 'gina-popin-' + instance.id +'-'+ name;
  
              // popin element
              var $el         = document.getElementById(id) || null;
  
              if ( $el == null ) {
  
                  var className   = self.options.class +' '+ id;
                  $el             = document.createElement('div');
                  $el.setAttribute('id', id);
                  $el.setAttribute('class', className);
                  instance.target.firstChild.appendChild($el);
              }
  
              if ( typeof(options) != 'undefined' ) {
                  var options = merge(options, xhrOptions);
              } else {
                  var options = xhrOptions;
              }
  
              options.url     = url;
  
  
              if ( options.withCredentials ) {
                  if ('withCredentials' in xhr) {
                      // XHR for Chrome/Firefox/Opera/Safari.
                      if (options.isSynchrone) {
                          xhr.open(options.method, options.url, options.isSynchrone)
                      } else {
                          xhr.open(options.method, options.url)
                      }
                  } else if ( typeof XDomainRequest != 'undefined' ) {
                      // XDomainRequest for IE.
                      xhr = new XDomainRequest();
                      xhr.open(options.method, options.url);
                  } else {
                      // CORS not supported.
                      xhr = null;
                      var result = 'CORS not supported: the server is missing the header `"Access-Control-Allow-Credentials": true` ';
                      triggerEvent(gina, $el, 'error.' + id, result)
                  }
              } else {
                  if (options.isSynchrone) {
                      xhr.open(options.method, options.url, options.isSynchrone)
                  } else {
                      xhr.open(options.method, options.url)
                  }
              }
  
              // setting up headers
              for (var hearder in options.headers) {
                  xhr.setRequestHeader(hearder, options.headers[hearder]);
              }
  
              if (xhr) {
                  // catching ready state cb
                  xhr.onreadystatechange = function (event) {
                      if (xhr.readyState == 4) {
                          // 200, 201, 201' etc ...
                          if( /^2/.test(xhr.status) ) {
  
                              try {
                                  var result = xhr.responseText;
                                  if ( /json$/.test( xhr.getResponseHeader("Content-Type") ) ) {
                                      result = JSON.parse(xhr.responseText)
                                  }
  
  
                                  instance.eventData.success = result;
  
                                  triggerEvent(gina, $el, 'loaded.' + id, result);
  
                              } catch (err) {
                                  var result = {
                                      'status':  422,
                                      'error' : err.description
                                  };
  
                                  instance.eventData.error = result;
  
                                  triggerEvent(gina, $el, 'error.' + id, result)
                              }
  
                          } else {
                              //console.log('error event triggered ', event.target, $form);
                              var result = {
                                  'status':  xhr.status,
                                  'error' : xhr.responseText
                              };
  
                              instance.eventData.error = result;
  
                              // update toolbar
                              var XHRData = result;
                              if ( gina && typeof(window.ginaToolbar) == "object" && XHRData ) {
                                  try {
                                      if ( XHRData.error && /^(\{|\[).test(XHRData.error) /)
                                          XHRData.error = JSON.parse(XHRData.error);
  
                                      // bad .. should not happen
                                      if ( typeof(XHRData.error.error) != 'undefined' )
                                          XHRData.error = XHRData.error.error;
  
                                      ginaToolbar.update("data-xhr", XHRData )
                                  } catch (err) {
                                      throw err
                                  }
                              }
  
  
                              triggerEvent(gina, $el, 'error.' + id, result)
                          }
                      }
                  };
  
                  // catching request progress
                  // xhr.onprogress = function(event) {
                  //     //console.log(
                  //     //    'progress position '+ event.position,
                  //     //    '\nprogress total size '+ event.totalSize
                  //     //);
                  //
                  //     var percentComplete = (event.position / event.totalSize)*100;
                  //     var result = {
                  //         'status': 100,
                  //         'progress': percentComplete
                  //     };
                  //
                  //     instance.eventData.onprogress = result;
                  //
                  //     triggerEvent(gina, $el, 'progress.' + id, result)
                  // };
  
                  // catching timeout
                  // xhr.ontimeout = function (event) {
                  //     var result = {
                  //         'status': 408,
                  //         'error': 'Request Timeout'
                  //     };
                  //
                  //     instance.eventData.ontimeout = result;
                  //
                  //     triggerEvent(gina, $el, 'error.' + id, result)
                  // };
  
  
                  // sending
                  xhr.send();
  
                  return {
                      'open': function () {
                          var fired = false;
                          addListener(gina, $el, 'loaded.' + id, function(e) {
                          //$popin.on('loaded', function (e) {
                              e.preventDefault();
  
                              if (!fired) {
                                  fired = true;
  
                                  e.target.innerHTML = e.detail;
  
  
                                  // bind with formValidator if forms are found
                                  if ( /<form/i.test(e.target.innerHTML) && typeof($validator) != 'undefined' ) {
                                      var _id = null;
                                      var $forms = e.target.getElementsByTagName('form');
                                      for (var i = 0, len = $forms.length; i < len; ++i) {
  
                                          if ( !$forms[i]['id'] || typeof($forms[i]) != 'string' ) {
                                              _id = $forms[i].getAttribute('id') || 'form.' + uuid.v1();
                                              $forms[i].setAttribute('id', _id);// just in case
                                              $forms[i]['id'] = _id
                                          } else {
                                              _id = $forms[i]['id']
                                          }
  
                                          //console.log('pushing ', _id, $forms[i]['id'], typeof($forms[i]['id']), $forms[i].getAttribute('id'));
                                          if ($popin['$forms'].indexOf(_id) < 0)
                                              $popin['$forms'].push(_id);
  
                                          $forms[i].close = popinClose;
                                          $validator.validateFormById($forms[i].getAttribute('id')) //$forms[i]['id']
  
                                          removeListener(gina, $popin.target, e.type);
                                      }
                                  }
  
                                  popinOpen($popin.name);
                              }
                          });
                      }
                  }
              }
  
          }