Problems with new map plugin

Problems with new map plugin

Hi all

I made a javascript map library for openstreetmap. 
Unlike google map it's open source (LGPL).

Now I try to integrate it to jquery and got some problems.

To populate a div with the map is easy:
$("#theselector").makeMap(lat,lng,zoom);
That's it.

But when it gets dynamic, there are problems. 
The map is using absolute positioning even if the div positions on a floating layout.
I have to calculate the top,left,width,height coordinates where the map is displayed.

If a div is changing position or is resized, the method "setMapPosition()" has to be called
to re-initialize the map.

The problems:
1.)
If the map is on a animated div (slidein/out ...) the map does not know that the div size has changed.
I need a callback function while the div is animated. Is it posible to use a resize callback function?

2.) 
I tried to put the map on a "dialog". Resizing is not a problem here, but initializing does not work
as it should.

Please have a look at my jquery map module: 


The (non jquery) API is here:

Bernhard