Don't break the expanders if the search box is removed.
If the search box is not in the HTML then the javascript run on domready for the search box causes an error, and so the javascript to create the expanders is not run.
Adding an "if ($defined(" allows the javascript to be resilient against the search box not being present.