Remove use of global 'window'
Dropdowns near bottom edge of window fixed