factor out common search form submit
fixes #3, added search to navigation