Problems with writing a variable inside a function

Problems with writing a variable inside a function

Hi,

I am new to asking questions on this forum. 

Here it goes:


----

var image1 = $('#LBimage2 img').attr( 'src' );

$('#LBimage2').click(function(){
$('#LBimage1').html( ' <img src="image1"  /> ' );
});


-------


When i click on the div LBimage2 i should get the LBimage1 to have the same image as the LBimage2, but it doesn't find the image soo it doesn't replace it....