Problem with $(window).height();

Problem with $(window).height();

Hi,
 
I had this code:
 
var winH = $(window).height();
var winW = $(window).width();

and it was working fine with jquery v1.4.1
 
now when I moved to jquery v1.8.2 these lines stopped working.
 
Did something change? as I can't figure out whats causing this. I can still get the values if I move back to v1.4.1 without any change on my javascript code.
 
Please help.