jQuery(document).ready(
    function ()
    {
        if(document.getElementById('validation-failed') !== null)
        {
            return false;
        }

        /**
         * Hide the comments form, and create the link to show it
         **/
        jQuery('form#post-comment').hide();
        paragraph   = document.createElement('p');
        link        = document.createElement('a');
        image       = document.createElement('img');

        jQuery(image).attr('src','/images/add-comment.png');
        jQuery(link).attr('href','#');

        jQuery(link).append(image);
        jQuery(paragraph).append(link);
        jQuery('form#post-comment').after(paragraph);
        
        /**
         * When the link's clicked we need to show the form and
         * get rid of the link
         **/
        jQuery(link).click(
            function (ev)
            {
                ev.preventDefault();
                jQuery('form#post-comment').show();
                jQuery(paragraph).remove();
            }
        );
    }
);