Attaching window resize through jQuery for compatibility reasons