Your HTML was all messed up. I tried fixing as is but couldn't figure it out. So
here is a cleaned up version with dummy tab content, but the tabs all work as expected. You should be able to replace my dummy p tags with your stuff and have it work now.