jQuery(document).ready(function($){
	if ( typeof(whatECM) != "undefined" ) {
		var x = new RegExp( whatECM, 'gi' );
		
		function walk(el) {
			if ( el.nodeType == 3 ) {
				if ( el.textContent && el.textContent.match(x) )
					el.textContent = el.textContent.replace( x, String.fromCharCode(64) );
				else if ( el.innerText && el.innerText.match(x) )
					el.innerText = el.innerText.replace( x, String.fromCharCode(64) );
				else if ( el.nodeValue && el.nodeValue.match(x) )
					el.nodeValue = el.nodeValue.replace( x, String.fromCharCode(64) );
			} else if ( el.nodeName && el.nodeName != "TEXTAREA" ) {
				if ( el.attributes ) {
					for ( var i = 0, n = el.attributes.length; i < n; i++ ) {
						try {
							if (
								$(el).attr( el.attributes[i].name )
								&& $(el).attr( el.attributes[i].name ).replace
							) {
								$(el).attr(
									el.attributes[i].name,
									$(el).attr( el.attributes[i].name ).replace(x, String.fromCharCode(64))
								);
							}
						} catch(e) {}
					}
				}
				
				for ( var i = 0, n = el.childNodes.length; i < n; i++ ) {
					walk( el.childNodes[i] );
				}
			}
		}
		
		walk( document.body );
	}
});

//end
