public static function parseAttributes(array $attrs = array())
    {
        $str = '';
        foreach($attrs as $var=>$val) {
            $str .= ' '.$var.'="'.(is_array($val) ? join(' ', $val) : $val).'"';
        }
        return $str;
    }