	$.fn.extend({
		textNodes: function(deep) { // requires an ender
		// return the text noded under a dom node, either deep or shallow (one level down)
			var texts=[];
			this.each(function(){
				var children =this.childNodes;
				for (var i = 0; i < children.length; i++){
					var child = children[i];
					if (child.nodeType == 3) 
						texts.push(child);
					else if (deep && child.nodeType == 1)
						[].push.apply(texts,$(child).textNodes(deep,true));
				}
			});
			return arguments[1] ? texts: this.pushStack(texts);
		}
	});

$(document).ready(function(){
	$('span.digital').textNodes(false).each(function(){
		var text = this.nodeValue;
		var img = document.createElement('img');
		img.setAttribute('src','/truetype/'+text+'.gif?size=14');
		img.setAttribute('alt', text);
		this.parentNode.replaceChild(img, this);
	});


});
