protected function buildAttributes()
    {
        $attrs = array();

        $class = '';

        if(count($this->classes) > 0)
            $class = 'class="'.implode(' ', $this->classes).'" ';

        if(count($this->attributeString) > 0)
            $attrs = $this->attributeString;

        foreach($this->attributes as $key => $value)
            $attrs[] = $key.'="'.$value.'"';

        return $class.implode(' ', $attrs);
    }