class initialization with getting json by ajax always fails
<p>I am newbie of JavaScript. I want to make a class which communicate to Flickr Web API with Ajax when initialized.</p>

<p><strong>Photo2.js</strong></p>

<pre><code>  var Photo2;

  Photo2 = (function() {

    Photo2.prototype.json = null;

    function Photo2() {
      $.getJSON('http://www.flickr.com/services/rest/?jsoncallback=?', {
        format: 'json',
        method: 'flickr.photos.search',
        api_key: '7965a8bc5a2a88908e8321f3f56c80ea',
        user_id: '29242822@N00',
        per_page: '100'
      }, function(data) {
        this.json = data.photos.photo;
      });
    }

    return Photo2;

  })();
</code></pre>

<p>But when initialized as <code>photo2 = new Photo2</code> this does not have <code>photo2.json</code>.</p>

<p>Thank you for your kindness. </p>
