uses jQuery for load & resize events rather than raw JavaScript for better browser compatibility