code: function $$modal(title)
  {
      var $el = $$('modal', { css: { display: 'none'} });
  
      var $head = $$('modal-header',{parent: $el});
      var $btn = $$('close', { el: 'button', parent: $head,
          attributes: { type:'button'}, data: { dismiss: 'modal' }, children: [ $('<span>&times;</span>') ]
      });
      var $h = $$(null,{ el: 'h3',parent: $head, children: [title] });
      var $form = $$('dirty_form', { el: 'form', parent: $el,css: { marginBottom: 0}
      });
      var $body = $$('modal-body', { parent: $form});
      var $foot = $$('modal-footer',{ parent: $form });
      return $el;
  }
docs: modal template