Combine js functions for input and textarea elements
<p>So I need to add tooltips for some input fields and textareas. Currently, I have it setup like this:</p>

<pre><code>$(document).ready(function(){
    $('input').focus(function(){
       var p = $(this);
       var position = p.position();
       var input_name = $(this).attr('id');
       var name = '#'+input_name+'_help'; 
       $('#apply_tooltip').css("left", position.left - 310 );
       $('#apply_tooltip').css("top", position.top -15 );
       $(name).show();
       $('#apply_tooltip').show();


    });
    $('input').blur(function(){
        $('.tooltip_inner').hide();
        $('#apply_tooltip').hide(); 


    });


    $('textarea').focus(function(){
       var p = $(this);
       var position = p.position();
       var input_name = $(this).attr('id');
       var name = '#'+input_name+'_help'; 
       $('#apply_tooltip').css("left", position.left - 310 );
       $('#apply_tooltip').css("top", position.top -15 );
       $(name).show();
       $('#apply_tooltip').show();


    });
    $('textarea').blur(function(){
        $('.tooltip_inner').hide();
        $('#apply_tooltip').hide(); 


    });


}); 
</code></pre>

<p>This works, but obviously there is probably a more efficient solution than simply duplicating the functions... Is there anyway to target both input fields and textareas with the same functions?</p>
