Javascript corrected... Should check the margin-top now.