Set link html element id. Conditionally change class of table header