instanceof not defined in older IE
tidy up tests
adjust top position for modal