Make the "title" script work on focus
<p>The code work only on hover! but i want it to work in focus mode!</p>

<pre><code> $(document).ready(function() {
    $('body').append('&lt;div id="anchorTitle"&gt;&lt;/div&gt;');
    $('input[title!=""]').each(function() {
        var a = $(this);
        if(typeof a.attr('title') == 'undefined')
        {
          return;
        }
        a.data('title', a.attr('title'))
        .removeAttr('title')
        .hover(
            function() { showAnchorTitle(a, a.data('title')); },
            function() { hideAnchorTitle(); }
        );
    });

    function showAnchorTitle(element, text) {
    var offset = element.offset();
    $('#anchorTitle')
    .css({
        'top'  : (offset.top + element.outerHeight() + 4) + 'px',
        'left' : offset.left + 'px'
    })
    .html(text)
    .show();
  }
    function hideAnchorTitle(){
    $('#anchorTitle').hide();
  }
});
</code></pre>

<p>When an input is focused show the title box! when  the focus is lost, hide the title..</p>
