changed the way im gettign viewport dimensions to use jquery