+ if ( val < 0 ) {
+ return elem.style[ name ] || "0px";
+ }
+
+ if ( val === 0 ) {
+ val = curCSS( elem, name, name );
+
+ if ( val != null ) {
+ return val;
+ }
+ }
+
+ if ( val < 0 || val == null ) {
+ return elem.style[ name ];
+ }
+
+ return typeof val === "string" ? val : val + "px";