add event functions fired when tabs index changed