scaron/prettyphoto — Issue #83: Outdated window width/height values upon window resize, particularly for maximize/minimize situation, resulting in off-centered modal-box position.
Author: Glidias
Created: 2012-01-25 09:04:08+00:00
State: open

Somewhere on line 107:

```javascript
$(window).unbind('resize.prettyphoto').bind('resize.prettyphoto',function(){ _center_overlay(); _resize_overlay(); });
```

Should be;

```javascript
$(window).unbind('resize.prettyphoto').bind('resize.prettyphoto',function(){ _resize_overlay(); _center_overlay(); });
```

instead.
_resize_overlay() should be called first to get the correct window dimensions prior to centering the overlay.