add favorite button and tab change event handler.