jquery help with variables and click function

jquery help with variables and click function

I'm creating a click function for a set of links that changes the background image of each of those links( different images for each link).

What I have is this:

  1. $(document).ready(function(){ 

  2. $('#nav a').click(function() {

  3. //$('#hlink').css({ backgroundImage : "url(images/home_animate.jpg)" });

  4. });
which all works fine, but what I want is
this:

    1. $('\'#' + $element + '\'').css({ backgroundImage : "url(images/home_animate.jpg)" });
where $element stores the id of the link clicked.

any help would be great.

Thanks