Instead of running the inner function, jQuery replaces the text with the entire function
<p>How do I make it so that jQuery actually runs the inner function instead of just change the <code>val()</code> to display the function ?</p>

<pre><code>$(".me_signup .name").bind("mouseup keyup", function(){
    $(this).siblings('.message').val(function(index,value) {
      var name = $(this).val().split(' ')[0];
      return value.replace('friend', name);
  });
});
</code></pre>

<p>I want the end result to be replace the inner text of the word friend with <code>name</code>. But instead its just replacing the text with the entire function in my HTML. Any ideas as to why its not running the inner function?</p>
