title: Knockout is not binding the values
body: <p>Hi I have the following situation. I have one <code>with</code> block assigned to a property. When this property is null the content doesn't exist. However when one puts the property markup should be generated.</p>
  
  <p>HTML:</p>
  
  <pre><code>&lt;!-- ko with: Gallery --&gt;
  &lt;div class="GalleryMain"&gt;
      &lt;a href="#" data-bind="attr: {href: Current.Zoomed}" class="cloud-zoom" id="TargetZoom"&gt;
          &lt;img data-bind="attr: {src: Current.Main}" alt="" /&gt;
       &lt;/a&gt;
       &lt;span data-bind="text: Current.Zoomed"&gt;&lt;/span&gt;
      &lt;span data-bind="text: Current.Main"&gt;&lt;/span&gt;
  &lt;/div&gt;
  ​&lt;!-- /ko --&gt;
  &lt;a href="javascript:;" id="Do"&gt;Update property&lt;/a&gt;​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​
  </code></pre>
  
  <p>JavaScript:</p>
  
  <pre><code>function PrimaryViewModel() {
      var self = this;
      this.Gallery = ko.observable(null);
      this.Exit = function() {
          self.Gallery(null);
      }
  }
  var Picture = (function() {
      function _Constructor(input) {
          this.Zoomed = ko.observable(input.Zoomed);
          this.Main = ko.observable(input.Main);
          this.Thumb = ko.observable(input.Thumb);
      }
      _Constructor.Width = 489;
      _Constructor.Height = 835;
      return _Constructor;
  })();
  
  function GalleryViewModel(data, current) {
      var self = this;
      this.Pictures = ko.observableArray($.map(data, function(input) {
          return new Picture(input);
      }));
  
      var all = this.Pictures();
      this.Current = ko.observable(all[0]);
      for (var i = 0; i &lt; all.length; i++)
          if (all[i].Main == current) 
              this.Current(all[i]);
      this.SetCurrent = function() {
          self.Current(this);
      }
  }
  $(function() {
      var viewModel = new PrimaryViewModel();
      $("#Do").click(function() {
          var data = [{
              "Zoomed": "Content/Big/1Z.jpg",
              "Main": "Content/Big/1.jpg",
              "Thumb": "Content/Images/Thumbs/1.jpg"},
          {
              "Zoomed": "Content/Big/2Z.jpg",
              "Main": "Content/Big/2.jpg",
              "Thumb": "Content/Images/Thumbs/2.jpg"},
          {
              "Zoomed": "Content/Big/3Z.jpg",
              "Main": "Content/Big/3.jpg",
              "Thumb": "Content/Images/Thumbs/B1.jpg"},
          {
              "Zoomed": "Content/Big/4Z.jpg",
              "Main": "Content/Big/4.jpg",
              "Thumb": "Content/Images/Thumbs/3.jpg"},
          {
              "Zoomed": "Content/Big/15.jpg",
              "Main": "Content/Big/5.jpg",
              "Thumb": "Content/Images/Thumbs/B2.jpg"}];
          viewModel.Gallery(new GalleryViewModel(data, "Content/Big/1.jpg"));
      });
      ko.applyBindings(viewModel);
  });​
  </code></pre>
  
  <p><strong><a href="http://jsfiddle.net/kKc6R/" rel="nofollow">Fiddle</a></strong></p>
  
  <p>After pressing <code>Update property</code> button the html is being generated but no bindings occur. Please help me.</p>