Is there a more efficient way to do this, I mean other than using a global? I hate to use global variables but I just can't seem to figure out how to pass the href attribute to the function. 

```
$(document).ready(function(){
var src
$('.thumbs li a').click(function(){
     src=$(this).attr('href')
     loadImage();
     return false;  
})

function loadImage(){
 var img = new Image();
 $(img).load(function () {
        //$(this).css('display', 'none'); // .hide() doesn't work in Safari when the element isn't on the DOM already
        $(this).hide();
        $('.large_img_holder').removeClass('loading').append(this);
        $(this).fadeIn();
    }).error(function () {
        // notify the user that the image could not be loaded
    }).attr('src', src );
 }
});

```