| 2035 | ); |
| 2036 | |
| 2037 | function getElementStyles( elem ) { |
| 2038 | var key, len, |
| 2039 | style = elem.ownerDocument.defaultView ? |
| 2040 | elem.ownerDocument.defaultView.getComputedStyle( elem, null ) : |
| 2041 | elem.currentStyle, |
| 2042 | styles = {}; |
| 2043 | |
| 2044 | if ( style && style.length && style[ 0 ] && style[ style[ 0 ] ] ) { |
| 2045 | len = style.length; |
| 2046 | while ( len-- ) { |
| 2047 | key = style[ len ]; |
| 2048 | if ( typeof style[ key ] === "string" ) { |
| 2049 | styles[ $.camelCase( key ) ] = style[ key ]; |
| 2050 | } |
| 2051 | } |
| 2052 | |
| 2053 | // Support: Opera, IE <9 |
| 2054 | } else { |
| 2055 | for ( key in style ) { |
| 2056 | if ( typeof style[ key ] === "string" ) { |
| 2057 | styles[ key ] = style[ key ]; |
| 2058 | } |
| 2059 | } |
| 2060 | } |
| 2061 | |
| 2062 | return styles; |
| 2063 | } |
| 2064 | |
| 2065 | function styleDifference( oldStyle, newStyle ) { |
| 2066 | var diff = {}, |