
var EMOTES = [
   [':|', 'neutral.gif', /:\|/g],
   [':P', 'mad-tongue.gif', /:P/g],
   [';(',  'crying.gif', /;\(/g],
   ['8-)',  'glasses-cool.gif', /8-\)/g],
   [':(',  'sad.gif', /:\(/g],
   ['|-)',  'sleepy.gif', /\|-\)/g],
   [':D',  'smile-big.gif', /:D/g],
   [':)',  'smile.gif', /:\)/g],
   [':*',  'kiss.gif', /:\*/g],
   [':o',  'shock.gif', /:o/g],
   [':\\',  'thinking.gif', /:\\/g],
   [';)',  'wink.gif', /;\)/g],
   ['(-',  'umbrella.gif', /\(-/g],
   ['(act-up)',  'act-up.gif', /\(act-up\)/g],
   ['(airplane)',  'airplane.gif', /\(airplane\)/g],
   ['(alien)',  'alien.gif', /\(alien\)/g],
   ['(angel)',  'angel.gif', /\(angel\)/g],
   ['(angry)',  'angry.gif', /\(angry\)/g],
   ['(arrogant)',  'arrogant.gif', /\(arrogant\)/g],
   ['(at-wits-end)',  'at-wits-end.gif', /\(at-wits-end\)/g],
   ['(bad)',  'bad.gif', /\(bad\)/g],
   ['(bashful)',  'bashful.gif', /\(bashful\)/g],
   ['(beat-up)',  'beat-up.gif', /\(beat-up\)/g],
   ['(beauty)',  'beauty.gif', /\(beauty\)/g],
   ['(blowkiss)',  'blowkiss.gif', /\(blowkiss\)/g],
   ['(bowl)',  'bowl.gif', /\(bowl\)/g],
   ['(boy)',  'boy.gif', /\(boy\)/g],
   ['(brb)',  'brb.gif', /\(brb\)/g],
   ['(bulgy-eyes)',  'bulgy-eyes.gif', /\(bulgy-eyes\)/g],
   ['(bye)',  'bye.gif', /\(bye\)/g],
   ['(cake)',  'cake.gif', /\(cake\)/g],
   ['(call-me)',  'call-me.gif', /\(call-me\)/g],
   ['(camera)',  'camera.gif', /\(camera\)/g],
   ['(can)',  'can.gif', /\(can\)/g],
   ['(car)',  'car.gif', /\(car\)/g],
   ['(cat)',  'cat.gif', /\(cat\)/g],
   ['(chicken)',  'chicken.gif', /\(chicken\)/g],
   ['(clap)',  'clap.gif', /\(clap\)/g],
   ['(clock)',  'clock.gif', /\(clock\)/g],
   ['(cloudy)',  'cloudy.gif', /\(cloudy\)/g],
   ['(clover)',  'clover.gif', /\(clover\)/g],
   ['(clown)',  'clown.gif', /\(clown\)/g],
   ['(coffee)',  'coffee.gif', /\(coffee\)/g],
   ['(coins)',  'coins.gif', /\(coins\)/g],
   ['(computer)',  'computer.gif', /\(computer\)/g],
   ['(confused)',  'confused.gif', /\(confused\)/g],
   ['(cowboy)',  'cowboy.gif', /\(cowboy\)/g],
   ['(cow)',  'cow.gif', /\(cow\)/g],
   ['(curl-lip)',  'curl-lip.gif', /\(curl-lip\)/g],
   ['(curse)',  'curse.gif', /\(curse\)/g],
   ['(cute)',  'cute.gif', /\(cute\)/g],
   ['(cyclops)',  'cyclops.gif', /\(cyclops\)/g],
   ['(dance)',  'dance.gif', /\(dance\)/g],
   ['(dazed)',  'dazed.gif', /\(dazed\)/g],
   ['(desire)',  'desire.gif', /\(desire\)/g],
   ['(devil)',  'devil.gif', /\(devil\)/g],
   ['(disapointed)',  'disapointed.gif', /\(disapointed\)/g],
   ['(disdain)',  'disdain.gif', /\(disdain\)/g],
   ['(doctor)',  'doctor.gif', /\(doctor\)/g],
   ['(dog)',  'dog.gif', /\(dog\)/g],
   ['(doh)',  'doh.gif', /\(doh\)/g],
   ['(dont-know)',  'dont-know.gif', /\(dont-know\)/g],
   ['(drink)',  'drink.gif', /\(drink\)/g],
   ['(drool)',  'drool.gif', /\(drool\)/g],
   ['(eat)',  'eat.gif', /\(eat\)/g],
   ['(embarrassed)',  'embarrassed.gif', /\(embarrassed\)/g],
   ['(excruciating)',  'excruciating.gif', /\(excruciating\)/g],
   ['(eyeroll)',  'eyeroll.gif', /\(eyeroll\)/g],
   ['(female-fighter)',  'female-fighter.gif', /\(female-fighter\)/g],
   ['(film)',  'film.gif', /\(film\)/g],
   ['(fingers-crossed)',  'fingers-crossed.gif', /\(fingers-crossed\)/g],
   ['(foot-in-mouth)',  'foot-in-mouth.gif', /\(foot-in-mouth\)/g],
   ['(freaked-out)',  'freaked-out.gif', /\(freaked-out\)/g],
   ['(ghost)',  'ghost.gif', /\(ghost\)/g],
   ['(giggle)',  'giggle.gif', /\(giggle\)/g],
   ['(girl)',  'girl.gif', /\(girl\)/g],
   ['(glasses-nerdy)',  'glasses-nerdy.gif', /\(glasses-nerdy\)/g],
   ['(goat)',  'goat.gif', /\(goat\)/g],
   ['(go-away)',  'go-away.gif', /\(go-away\)/g],
   ['(good)',  'good.gif', /\(good\)/g],
   ['(hammer)',  'hammer.gif', /\(hammer\)/g],
   ['(handshake)',  'handshake.gif', /\(handshake\)/g],
   ['(highfive)',  'highfive.gif', /\(highfive\)/g],
   ['(hug-left)',  'hug-left.gif', /\(hug-left\)/g],
   ['(hug-right)',  'hug-right.gif', /\(hug-right\)/g],
   ['(hypnotized)',  'hypnotized.gif', /\(hypnotized\)/g],
   ['(in-love)',  'in-love.gif', /\(in-love\)/g],
   ['(island)',  'island.gif', /\(island\)/g],
   ['(jump)',  'jump.gif', /\(jump\)/g],
   ['(kissed)',  'kissed.gif', /\(kissed\)/g],
   ['(kissing)',  'kissing.gif', /\(kissing\)/g],
   ['(lamp)',  'lamp.gif', /\(lamp\)/g],
   ['(lashes)',  'lashes.gif', /\(lashes\)/g],
   ['(laugh)',  'laugh.gif', /\(laugh\)/g],
   ['(loser)',  'loser.gif', /\(loser\)/g],
   ['(love)',  'love.gif', /\(love\)/g],
   ['(love-over)',  'love-over.gif', /\(love-over\)/g],
   ['(lying)',  'lying.gif', /\(lying\)/g],
   ['(mail)',  'mail.gif', /\(mail\)/g],
   ['(male-fighter1)',  'male-fighter1.gif', /\(male-fighter1\)/g],
   ['(male-fighter2)',  'male-fighter2.gif', /\(male-fighter2\)/g],
   ['(mean)',  'mean.gif', /\(mean\)/g],
   ['(meeting)',  'meeting.gif', /\(meeting\)/g],
   ['(messed)',  'messed.gif', /\(messed\)/g],
   ['(mobile)',  'mobile.gif', /\(mobile\)/g],
   ['(mohawk)',  'mohawk.gif', /\(mohawk\)/g],
   ['(moneymouth)',  'moneymouth.gif', /\(moneymouth\)/g],
   ['(monkey)',  'monkey.gif', /\(monkey\)/g],
   ['(moon)',  'moon.gif', /\(moon\)/g],
   ['(musical-note)',  'musical-note.gif', /\(musical-note\)/g],
   ['(music)',  'music.gif', /\(music\)/g],
   ['(nailbiting)',  'nailbiting.gif', /\(nailbiting\)/g],
   ['(on-the-phone)',  'on-the-phone.gif', /\(on-the-phone\)/g],
   ['(party)',  'party.gif', /\(party\)/g],
   ['(peace)',  'peace.gif', /\(peace\)/g],
   ['(phone)',  'phone.gif', /\(phone\)/g],
   ['(pig)',  'pig.gif', /\(pig\)/g],
   ['(pirate)',  'pirate.gif', /\(pirate\)/g],
   ['(pissed-off)',  'pissed-off.gif', /\(pissed-off\)/g],
   ['(pizza)',  'pizza.gif', /\(pizza\)/g],
   ['(plate)',  'plate.gif', /\(plate\)/g],
   ['(poop)',  'poop.gif', /\(poop\)/g],
   ['(pray)',  'pray.gif', /\(pray\)/g],
   ['(present)',  'present.gif', /\(present\)/g],
   ['(pumpkin)',  'pumpkin.gif', /\(pumpkin\)/g],
   ['(qq)',  'qq.gif', /\(qq\)/g],
   ['(question)',  'question.gif', /\(question\)/g],
   ['(quiet)',  'quiet.gif', /\(quiet\)/g],
   ['(rainbow)',  'rainbow.gif', /\(rainbow\)/g],
   ['(rain)',  'rain.gif', /\(rain\)/g],
   ['(rose-dead)',  'rose-dead.gif', /\(rose-dead\)/g],
   ['(rose)',  'rose.gif', /\(rose\)/g],
   ['(rotfl)',  'rotfl.gif', /\(rotfl\)/g],
   ['(sarcastic)',  'sarcastic.gif', /\(sarcastic\)/g],
   ['(search)',  'search.gif', /\(search\)/g],
   ['(secret)',  'secret.gif', /\(secret\)/g],
   ['(shame)',  'shame.gif', /\(shame\)/g],
   ['(sheep)',  'sheep.gif', /\(sheep\)/g],
   ['(shout)',  'shout.gif', /\(shout\)/g],
   ['(shut-mouth)',  'shut-mouth.gif', /\(shut-mouth\)/g],
   ['(sick)',  'sick.gif', /\(sick\)/g],
   ['(sidefrown)',  'sidefrown.gif', /\(sidefrown\)/g],
   ['(silly)',  'silly.gif', /\(silly\)/g],
   ['(sinister)',  'sinister.gif', /\(sinister\)/g],
   ['(skywalker)',  'skywalker.gif', /\(skywalker\)/g],
   ['(smirk)',  'smirk.gif', /\(smirk\)/g],
   ['(snail)',  'snail.gif', /\(snail\)/g],
   ['(snicker)',  'snicker.gif', /\(snicker\)/g],
   ['(snowman)',  'snowman.gif', /\(snowman\)/g],
   ['(soccerball)',  'soccerball.gif', /\(soccerball\)/g],
   ['(star)',  'star.gif', /\(star\)/g],
   ['(starving)',  'starving.gif', /\(starving\)/g],
   ['(stop)',  'stop.gif', /\(stop\)/g],
   ['(struggle)',  'struggle.gif', /\(struggle\)/g],
   ['(sun)',  'sun.gif', /\(sun\)/g],
   ['(sweat)',  'sweat.gif', /\(sweat\)/g],
   ['(talktohand)',  'talktohand.gif', /\(talktohand\)/g],
   ['(teeth)',  'teeth.gif', /\(teeth\)/g],
   ['(thunder)',  'thunder.gif', /\(thunder\)/g],
   ['(time-out)',  'time-out.gif', /\(time-out\)/g],
   ['(tongue)',  'tongue.gif', /\(tongue\)/g],
   ['(tremble)',  'tremble.gif', /\(tremble\)/g],
   ['(turtle)',  'turtle.gif', /\(turtle\)/g],
   ['(tv)',  'tv.gif', /\(tv\)/g],
   ['(vampire)',  'vampire.gif', /\(vampire\)/g],
   ['(victory)',  'victory.gif', /\(victory\)/g],
   ['(waiting)',  'waiting.gif', /\(waiting\)/g],
   ['(watermelon)',  'watermelon.gif', /\(watermelon\)/g],
   ['(waving)',  'waving.gif', /\(waving\)/g],
   ['(weep)',  'weep.gif', /\(weep\)/g],
   ['(wilt)',  'wilt.gif', /\(wilt\)/g],
   ['(worship)',  'worship.gif', /\(worship\)/g],
   ['(yawn)',  'yawn.gif', /\(yawn\)/g],
   ['(yin-yang)',  'yin-yang.gif', /\(yin-yang\)/g]
];



function emotify(classname) {
    divs = document.getElementsByTagName('div');
    for (i = 0; i < divs.length; i++) {
        if (divs[i].className == classname) {
            inner = divs[i].innerHTML;
            for (j = 0; j < EMOTES.length; j++) {
                inner = inner.replace(EMOTES[j][2], '<img src="++resource++wendy.emotes.images/' + EMOTES[j][1] +
                   '" alt= "' + EMOTES[j][0] +'" title="' + EMOTES[j][0] + '" />')
            }
            divs[i].innerHTML = inner;
        }
    }
}

