docs: function optimizeRules( optimizedRules, rules ) {
  		var elementsRules = optimizedRules.elements,
  			genericRules = optimizedRules.generic,
  			i, l, rule, element, priority;
  
  		for ( i = 0, l = rules.length; i < l; ++i ) {
  			// Shallow copy. Do not modify original rule.
  			rule = copy( rules[ i ] );
  			priority = rule.classes === true || rule.styles === true || rule.attributes === true;
  			optimizeRule( rule );
  
  			// E.g. "*(xxx)[xxx]" - it's a generic rule that
  			// validates properties only.
  			// Or '$1': { match: function() {...} }
  			if ( rule.elements === true || rule.elements === null ) {
  				// Add priority rules at the beginning.
  				genericRules[ priority ? 'unshift' : 'push' ]( rule );
  			}
  			// If elements list was explicitly defined,
  			// add this rule for every defined element.
  			else {
  				// We don't need elements validator for this kind of rule.
  				var elements = rule.elements;
  				delete rule.elements;
  
  				for ( element in elements ) {
  					if ( !elementsRules[ element ] )
  						elementsRules[ element ] = [ rule ];
  					else
  						elementsRules[ element ][ priority ? 'unshift' : 'push' ]( rule );
  				}
  			}
  		}
  	}