/**
 * JYAML - Template Framework includes YAML for Joomla!
 *
 * All rights reserved. The JYAML project is a template to manage and
 * configure Joomla!-Templates with the YAML XHTML/CSS Framework
 * - http://www.yaml.de
 *
 * -----------------------------------------------------------------------------
 *
 * @version       $Id: tmpl.js 1104 2011-10-25 03:53:33Z hieblmedia $
 *
 * @author        Reinhard Hiebl
 * @copyright     Copyright (C) 2006-2011, Reinhard Hiebl, HieblMedia
 * @license       Creative Commons Attribution 3.0 Unported License
 *                  > http://www.jyaml.de/en/license-conditions.html
 * @link          http://www.jyaml.de
 * @package       JYAML
 * @subpackage    JYAML.Javascript
 *
 */


if(typeof(window.MooTools) != 'undefined'){

  // Additional global validator aliases
  if(typeof(Form) != 'undefined' && typeof(Form.Validator) != 'undefined'){
    Form.Validator.addAllThese([
      ['validate-username', { // simple validation equal required
        errorMsg: function(){return Form.Validator.getMsg('required');},
        test: function(element){return !Form.Validator.getValidator('IsEmpty').test(element);}
      }],
      ['validate-password', { // simple validation equal required
        errorMsg: function(){return Form.Validator.getMsg('required');},
        test: function(element){return !Form.Validator.getValidator('IsEmpty').test(element);}
      }]
    ]);
  }

}

