Strange .wrap behaviour...

Strange .wrap behaviour...

Hi everyone,
I've this problem that's really driving my crazy!

I retrieve a json list of image-links so then I create the images & add them to a div on a page.. which all works fine! Then I decided to add hrefs around the images so I thought.. I'll use the .wrap function.. but the thing is, I just can't get it to work..

Here's part of my code, I've been over it so many times & I just can't see what I'm doing wrong :(

 $.each(imagesData, function(i,image) {
            var image =   $('<img />')
                        .attr('src', image.image_thumb)
                        .attr('height', '66')
                        .attr('width', '66')
                        .attr('href',image.image_original);
                       
            var a = $('<a>').attr('href', image.image_original);
            var wrappedImage = image.wrap(a);
           
            wrappedImage.appendTo( $('#resultz'));
});

Any help is MUCH appreciated!
thanks in advance!!