Can you set variables in the beginning of a file to be set through out? 

Example:

```
var works = $('#id1'); 
var span = $('.icon');

works.focus(function() {
    if(this.value.length == 0)
    span.hide();
});

works.keyup(function() {

if(this.value.length > 0 && !span.is(':visible'))
        span.stop().show();
    else if(this.value.length == 0)
        span.stop().hide();
});

```

The variable span inside the function doesn't work. Instead of adding `var span = $('.icon');` in each function is it possible I can make it work?

Thanks alot