+ set: function( elem, value ) {
+ // ignore negative width and height values #1599
+ return Math.max( parseFloat(value), 0 ) + "px";
+ }
+ };
+});
+
+if ( !jQuery.support.opacity ) {
+ jQuery.cssHooks.opacity = {
+ get: function( elem, force ) {
+ // IE uses filters for opacity
+ return ropacity.test(elem.currentStyle.filter || "") ?
+ (parseFloat(RegExp.$1) / 100) + "" :
+ "1";
+ },
+
+ set: function( elem, value ) {
+ var style = elem.style;
+
+ // IE has trouble with opacity if it does not have layout
+ // Force it by setting the zoom level
+ style.zoom = 1;
+
+ // Set the alpha filter to set the opacity
+ var opacity = parseInt( value, 10 ) + "" === "NaN" ?
+ "" :
+ "alpha(opacity=" + value * 100 + ")";
+
+ var filter = style.filter || jQuery.css( elem, "filter" ) || "";
+
+ style.filter = ralpha.test(filter) ?
+ filter.replace(ralpha, opacity) :
+ opacity;
+ }
+ };
+}