It would be a good idea to store the return values of `$(window).height()` and `parent.height()` into a variable so jQuery does not have recalculate them in multiple places.