#2 increase index number when new tab is less number than other tabs
add event functions fired when tabs index changed