/************************************** Splendid *************************************
* Created By:		Steve Doggett
* Creation Date:	18th September 2009
* Edited ----------------------------------------------------------------------------
*      By:Luciano Santos   On:  29/10/2009
*      By:                 On:  
* Description -----------------------------------------------------------------------
*      This file handles the comments functionality
*      Uses JQuery.
*      Example: 
*           1.4.2_Knowledge-hub-blog-comments.html
*
* Functions -------------------------------------------------------------------------
*       
*       
*       
* Event Handlers --------------------------------------------------------------------
*       
*       
*       
**************************************************************************************/

/********************************** Global Variables *********************************/
$(document).ready(function() {
$(".commentsSection").not("#CommentedArticle").hide();

    $(".lnkComments").toggle(
				function() {
				    $($($($(this).parent()).parent()).children()[1]).slideDown();
				}, function() {
				    $($($($(this).parent()).parent()).children()[1]).slideUp();
				}
			);
	var cmtAnchor = document.anchors["CommentedArticle"];
    if (cmtAnchor != null) {
        var NURL = new String(this.location.href + "#CommentedArticle");
        window.location.href = NURL;
    }
    $("a#CommentedArticle").trigger('click'); // this "toggle" the anchor to keep the behaviour consistent otherwise the first time the user has to click twice to close
});



