$(window).width() and $(window).height() return NULL -JQuery
<p>I want to get the size of browser window using <code>$(window).width()</code> and <code>$(window).height()</code> functions. However this two return null. the <code>$(window)</code> is not null, it's returning "object".
I have tried also using <code>$(document).width()</code> and <code>$(document).height()</code>, this two do not return null, they are returning specific values, but they are bigger than the window size. Any idea why the <code>$window</code> 2 values are null?</p>

<pre><code>$(window).load(function () {

            var view = $("#view");
            var image = $("#image");
            var hiResImage = $("#hi-res-image"); 
            var zoom = $("&lt;a id='zoom'&gt;&lt;span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/a&gt;");
            log("ERROR 1 = " + $(window).width());
            log("ERROR 1 = " + $(window).height());
            log("ERROR 1 = " + $(window));
            image.width($(window).width());
            image.height($(window).height());
</code></pre>

<p>.....</p>

<p>Should I initialize somw how the $(window) variable?</p>
