l.val()) ? 'attr' : 'removeAttr']('disabled', '');
    $thumburlvisit.css('background-image', 'url("' + $thumburl.val() + '")');

    // ensure JSON is correct
    try {
      var json = $json.val();
      if (isEmpty(json)) {
        $json.addClass('error');
      } else {
        var obj = JSON.parse($json.val());
        $json.removeClass('error');
      }
    } catch (e) {
      $json.addClass('error');
    }

    $editorsave[($('#editor .error').length > 0) ? 'attr' : 'removeAttr']('disabled', '');
  }