I haven't looked into the specifics so I don't know what class/attribute exactly you're hoping to modify. But that code uses javascript to reach the tab and add/remove a class from it. So using that as a starting point you should be able to add one more line to modify the attributes of the parent element as well