jQuery(document).ready(function(){
$(".button").click(function(){
if($(".inputtext").val().length > 0 ) {
$("#chatbox").append($(".inputtext").val() + "<br/>");
$(".inputtext").val("");
$(".smiley").dosmile();
}
});
$(".inputtext").keypress(function(e) {
if(e.which === 13) {
if($(".inputtext").val().length > 0 ) {
$("#chatbox").append($(".inputtext").val() + "<br/>");
$(".inputtext").val("");
$(".smiley").dosmile();
}
}
});
$(".smiley").blur(function() {
$(".smiley").dosmile();
});
});