small fix for top calculuation

fixed issue in calculation of top. Probably due to new version of Jquery.