private function _index_classes()
    {
        $ix  = array();
        $aix = $this->attr_idx;
        foreach ($this->attribs as $aid => &$a) {
            if (!empty($a['class'])) {
                $cl = $a['class'];
                if (!is_array($cl)) {
                    $cl = preg_split('|\\s+|', trim($cl));
                }
                foreach ($cl as $cl) {
                    if (isset($ix[$cl])) {
                        if (!is_array($ix[$cl])) {
                            $ix[$cl] = array($ix[$cl] => $this->attr_idx[$ix[$cl]]);
                        }

                        $ix[$cl][$aid] = $this->attr_idx[$aid];
                    } else {
                        $ix[$cl] = $aid;
                    }
                }
            }
        }

        return $this->class_idx = $ix;
    }