/**
 * Does not actually return DOM siblings, but goes up in the DOM tree, until the parent has more
 * children of that kind.
 * @return
 */
function getSiblingsOfSameKind(node){
	var nodeName = node.nodeName;
	return getSiblingsOfSameKindRecursive(node, nodeName);
}

function getSiblingsOfSameKindRecursive(node, nodeName){
	var parent = node.parentNode;
	var children = parent.getElementsByTagName(nodeName);
	if (children.length > 1) // there should always be one, because this is where the search started
	{
		return children;
	} else if (parent.nodeName.toLowerCase == "body")
	{
		return null;
	}
	else
	{
		// recursively climb up the DOM tree until more than one node of kind nodeName is found
		getSiblingsOfSameKindRecursive(parent, nodeName);
	}
}