function nthChild($element, $arguments, $traverse) {
	switch ($arguments) {
		case "n": return true;
		case "even": $arguments = "2n"; break;
		case "odd": $arguments = "2n+1";
	}

	var $$children = childElements($element.parentNode);
	function _checkIndex($index) {
		var $index = ($traverse == nextElementSibling) ? $$children.length - $index : $index - 1;
		return $$children[$index] == $element;
	};

	//	it was just a number (no "n")
	if (!isNaN($arguments)) return _checkIndex($arguments);

	$arguments = $arguments.split("n");
	var $multiplier = parseInt($arguments[0]);
	var $step = parseInt($arguments[1]);

	if ((isNaN($multiplier) || $multiplier == 1) && $step == 0) return true;
	if ($multiplier == 0 && !isNaN($step)) return _checkIndex($step);
	if (isNaN($step)) $step = 0;

	var $count = 1;
	while ($element = $traverse($element)) $count++;

	if (isNaN($multiplier) || $multiplier == 1)
		return ($traverse == nextElementSibling) ? ($count <= $step) : ($step >= $count);

	return ($count % $multiplier) == $step;
}
function nthChild($element, $arguments, $traverse) {
	switch ($arguments) {
		case "n": return true;
		case "even": $arguments = "2n"; break;
		case "odd": $arguments = "2n+1";
	}

	var $$children = childElements($element.parentNode);
	function _checkIndex($index) {
		var $index = ($traverse == nextElementSibling) ? $$children.length - $index : $index - 1;
		return $$children[$index] == $element;
	};

	//	it was just a number (no "n")
	if (!isNaN($arguments)) return _checkIndex($arguments);

	$arguments = $arguments.split("n");
	var $multiplier = parseInt($arguments[0]);
	var $step = parseInt($arguments[1]);

	if ((isNaN($multiplier) || $multiplier == 1) && $step == 0) return true;
	if ($multiplier == 0 && !isNaN($step)) return _checkIndex($step);
	if (isNaN($step)) $step = 0;

	var $count = 1;
	while ($element = $traverse($element)) $count++;

	if (isNaN($multiplier) || $multiplier == 1)
		return ($traverse == nextElementSibling) ? ($count <= $step) : ($step >= $count);

	return ($count % $multiplier) == $step;
}
function nthChild ( $element , $arguments , $traverse ) { switch ( $arguments ) { case "n" : return true ; case "even" : $arguments = "2n" ; break ; case "odd" : $arguments = "2n+1" ; } var $$children = childElements ( $element . parentNode ) ; function _checkIndex ( $index ) { var $index = ( $traverse == nextElementSibling ) ? $$children . length - $index : $index - 1 ; return $$children [ $index ] == $element ; } ; //	it was just a number (no "n") if ( ! isNaN ( $arguments ) ) return _checkIndex ( $arguments ) ; $arguments = $arguments . split ( "n" ) ; var $multiplier = parseInt ( $arguments [ 0 ] ) ; var $step = parseInt ( $arguments [ 1 ] ) ; if ( ( isNaN ( $multiplier ) || $multiplier == 1 ) && $step == 0 ) return true ; if ( $multiplier == 0 && ! isNaN ( $step ) ) return _checkIndex ( $step ) ; if ( isNaN ( $step ) ) $step = 0 ; var $count = 1 ; while ( $element = $traverse ( $element ) ) $count ++ ; if ( isNaN ( $multiplier ) || $multiplier == 1 ) return ( $traverse == nextElementSibling ) ? ( $count <= $step ) : ( $step >= $count ) ; return ( $count % $multiplier ) == $step ; }
----------------------------------------------------------------------- nth child support (Bill Edney) -----------------------------------------------------------------------
----------------------------------------------------------------------- nth child support ( Bill Edney ) -----------------------------------------------------------------------
Returns true if the element is the nth child of the element