jquery dimensions: removed redundant code