Fixes #572 - Expands search box when focused or not empty.

Also, changed when empty class is removed to avoid text box shrinking and then expanding after it loses focus but has content.