$.fn.emoticon = function(theText) {
	var imagePath = "/jscript/im/emotes/"; 
	var newText = theText;
	for( var a in emoticons.emoticon ) {
		theEmoticon = emoticons.emoticon[a];
		for( var emote in theEmoticon.emotes ) {
			newText = newText.replace( new RegExp( emote, 'gi' ), '<img src="'+imagePath + theEmoticon.image + '" />');
		}
	}
	return newText;
};
