- offset.top -= parseInt( jQuery.curCSS(elem, 'marginTop', true) ) || 0;
- offset.left -= parseInt( jQuery.curCSS(elem, 'marginLeft', true) ) || 0;
+ // note: when an element has margin: auto the offsetLeft and marginLeft
+ // are the same in Safari causing offset.left to incorrectly be 0
+ offset.top -= num( this, 'marginTop' );
+ offset.left -= num( this, 'marginLeft' );