// JavaScript Document

var commentsNode = document.getElementById('comments');
var divs = getElementsByClass('js-commentFieldLabel', commentsNode, 'div');
for(var i = 0; i < divs.length; i++)
{
	if(divs[i].innerHTML == 'Leave a comment as:') {
		divs[i].innerHTML = '';
		divs[i].setAttribute("style", "display:none;");
	}
	if(divs[i].innerHTML == 'Nickname (required):')
		divs[i].innerHTML = 'Name (required):';
}
divs = getElementsByClass('js-AuthAreaWrap', commentsNode, 'div');
divs[0].setAttribute("style", "display:none;visibility:hidden;");


/* This script and many more are available free online at
The JavaScript Source :: http://javascript.internet.com
Created by: Dustin Diaz :: http://www.dustindiaz.com/ */

function getElementsByClass(searchClass,node,tag) {
	var classElements = new Array();
	if (node == null)
		node = document;
	if (tag == null)
		tag = '*';
	var els = node.getElementsByTagName(tag);
	var elsLen = els.length;
	var pattern = new RegExp("(^|\\s)"+searchClass+"(\\s|$)");
	for (i = 0, j = 0; i < elsLen; i++) {
    	if (pattern.test(els[i].className) ) {
      		classElements[j] = els[i];
      		j++;
    	}
  	}
  	return classElements;
}
