Use jquery offset() to apply offset to the top calculation instead of css()