Changed window.innerHeight to $(window).height() to account for IE bug