(function(b){"function"===typeof define&&define.amd?define(["jquery","./effect","./effect-size"],b):b(jQuery)})(function(b){return b.effects.effect.scale=function(c,l){var d=b(this),a=b.extend(!0,{},c),e=b.effects.setMode(d,c.mode||"effect"),f=parseInt(c.percent,10)||(0===parseInt(c.percent,10)?0:"hide"===e?0:100),h=c.direction||"both",m=c.origin,g={height:d.height(),width:d.width(),outerHeight:d.outerHeight(),outerWidth:d.outerWidth()},k="horizontal"!==h?f/100:1,f="vertical"!==h?f/100:1;a.effect=
"size";a.queue=!1;a.complete=l;"effect"!==e&&(a.origin=m||["middle","center"],a.restore=!0);a.from=c.from||("show"===e?{height:0,width:0,outerHeight:0,outerWidth:0}:g);a.to={height:g.height*k,width:g.width*f,outerHeight:g.outerHeight*k,outerWidth:g.outerWidth*f};a.fade&&("show"===e&&(a.from.opacity=0,a.to.opacity=1),"hide"===e&&(a.from.opacity=1,a.to.opacity=0));d.effect(a)}});