| 8578 | |
| 8579 | // Generate parameters to create a standard animation |
| 8580 | function genFx( type, includeWidth ) { |
| 8581 | var which, |
| 8582 | attrs = { height: type }, |
| 8583 | i = 0; |
| 8584 | |
| 8585 | // if we include width, step value is 1 to do all cssExpand values, |
| 8586 | // if we don't include width, step value is 2 to skip over Left and Right |
| 8587 | includeWidth = includeWidth? 1 : 0; |
| 8588 | for( ; i < 4 ; i += 2 - includeWidth ) { |
| 8589 | which = cssExpand[ i ]; |
| 8590 | attrs[ "margin" + which ] = attrs[ "padding" + which ] = type; |
| 8591 | } |
| 8592 | |
| 8593 | if ( includeWidth ) { |
| 8594 | attrs.opacity = attrs.width = type; |
| 8595 | } |
| 8596 | |
| 8597 | return attrs; |
| 8598 | } |
| 8599 | |
| 8600 | // Generate shortcuts for custom animations |
| 8601 | jQuery.each({ |