Beginner jQuery – Coding Fundamentals / Performance
A couple of things:


Anytime you compare to 0 (zero) you want to make sure you use the exactly equal operator === instead of ==.  What would make your code even more expressive is doing something like if(tar.val().length){} .  This way your code is saying is "if the value of tar is blank then do this"
I'd also bring the last line to the top of your function and place it under the var loc statement.  The functions will be hoisted above all that so they'll be there even if they are defined after the calls.  
this could prob be re-factored into one function with a simple if/else statement checking the value of the field.
Instead of using the each to call the data function ,assuming you don't have any other events attached to blur event you could call blur explicitly at the end of your chain to invoke that functionality ...click(data).blur(). 
I would look into ANeves suggestions as well.