Accessing object using a variable

Hi, I have an object whose name is mural. I have assigned the name mural to the title of an anchor element. When user clicks and element I want to store the title of the anchor in a variable called sprite. I then want to access that object whose name corresponds to the sprite variable string.

Here is my code:

 var mural= new Object();
      mural.top='0px';
      mural.left=-'510px';
      
      var stamps= new Object();
      stamps.top='0px';
      stamps.left=-'1886px';

var sprite=$(this).attr('title');

$(".image-holder").css("background-position",'sprite.top, sprite.left');



It’s not working because the the variable sprite is just a reference to $(this).attr(‘title’), how do I make it reference the object? Oh and I know that .cc jquery statement probably wont work, I’m not sure yet of the correct way to have two values that don’t need quotations in as the second argument.

The jQuery data() method might be a useful way for you to store and retrieve objects.