jQuery.fn.comments = function(i) {
    if (this.html() != null && this.html() != '') {
        var searchString = this.html().split("<!--");
        var commentArray = new Array();
        for (j in searchString) {
            if(typeof(searchString[j]) == 'string'){
                if(searchString[j].indexOf("-->") != -1) {
                    commentArray.push(searchString[j].split("-->")[0].replace(/^\s+/,'').replace(/\s+$/,''));
                }
            }
        }
        if (isNaN(Number(i)) || i == null) {
            return commentArray;
        } else {
            return commentArray[i];
        }
    } else {
        return null;
    }
};
