Adding a class to resize the search bar when necessary