/**
 * JavaScript for the "comments" section.
 * timepreserved.com
 * Luis A. Echeverria
 * October, 2008
 * 
 * 
 */ 


/**
 * Runs after document loads.
 * 
 * 
 */
$(document).ready(function() {
    addMoreCommentsLink();
});


/**
 * Adds a link to show more comments.
 * 
 * 
 */
function addMoreCommentsLink() {
    var p = document.createElement('P');
    var a = document.createElement('A');
    $(a).append(document.createTextNode('More comments'));
    $(a).attr('href', 'javascript:void(0);').attr('id', 'show_more_comments');
    $(a).bind('click', showMoreComments);
    $(p).append(a);
    $('#content').children(':last').after(p);
}


/**
 * Shows more comments and gets rid of "show more comments" link.
 * 
 * 
 */
function showMoreComments(event) {
    $('#content div.hide').fadeIn('slow');
    $('#show_more_comments').remove();
}



