This is far too brittle. Why try to make the search box look like another tab instead of just adding a new interface element to the nav bar?