function html_attr_merge($attributes1, $attributes2)
 {
     $attr1 = new HTML_Attributes($attributes1);
     $attr2 = new HTML_Attributes($attributes2);
     $class2 = $attr2->getAttribute('class');
     $attr2->removeAttribute('class');
     $attr1->addClass($class2);
     return (string) $attr1->mergeAttributes((string) $attr2);
 }
 function html_attr_remove_class($attributes, $class)
 {
     $attr = new HTML_Attributes($attributes);
     return (string) $attr->removeClass($class);
     if (trim($attr->getAttribute('class')) == '') {
         $attr->removeAttribute('class');
     }
     return (string) $attr;
 }