-- end of container div -->

<script>
    $(function () {
        var jsonContainer = $('#json-container');

        var error = false;
        try {
            var json = JSON.parse($('#json-input').val());
        }
        catch (e) {
            error = true;
        }

        $('.error').toggleClass('hidden', !error);
        $('#output-container').toggleClass('hidden', error);

        jsonContainer
            .jsonPresenter('destroy') // Clear any previous JSON being presented through this plugin 