(function(){function h(b,a){for(var d=b.jq,f=a.length;f--;)null!==a[f]&&d.data("zk.cache."+a[f],d[0].style[a[f]]);return b}function n(b,a){for(var d=b.jq,f=a.length;f--;)null!==a[f]&&d.css(a[f],d.data("zk.cache."+a[f]));return b}function k(b,a,d,f){if(b.jq.is(":animated")){var c=a.uuid;b={el:b.jq[0],wgt:a,opts:d,anima:f};(a=zk._anique[c])||(a=zk._anique[c]=[]);a.push(b);return!0}return!1}function l(b,a){var d=b.jq.css("position");d&&"static"!=d||(a.position="relative");return b}var m=[],p=jq.fx.stop;
jq.fx.stop=function(){p();for(var b;b=m.shift();)b()};zk.copy(zk,{animating:function(){return!!jq.timers.length},afterAnimate:function(b,a){if(zk.animating())m.push(b);else{if(0>a)return b(),!0;setTimeout(b,a)}},_anique:{}});zk.copy(zjq.prototype,{getAnimationSpeed:function(b){var a=jq(this.$().$n()).data("animationspeed"),d=jq.fx.speeds;if("string"===typeof a){if(d[a])return d[a];a=parseInt(a)}return"number"!==typeof a||isNaN(a)?b||d._default:a+1},slideDown:function(b,a){if(k(this,b,a,"slideDown"))return this;
var d=a?a.anchor||"t":"t",f="top left height width overflow position border margin padding".split(" "),c={},g={overflow:"hidden"},e=this.dimension();a=a||{};l(h(this,f),g);switch(d){case "t":g.height="0";c.height=jq.px0(e.height);break;case "b":g.height="0";g.top=jq.px(e.top+e.height);c.height=jq.px0(e.height);c.top=jq.px(e.top);break;case "l":g.width="0";c.width=jq.px0(e.width);break;case "r":g.width="0",g.left=jq.px(e.left+e.width),c.width=jq.px0(e.width),c.left=jq.px(e.left)}return this._createWrapper(this.defaultAnimaOpts(b,
a,f,!0).jq).css(g).show().animate(c,{queue:!1,easing:a.easing,duration:this.getAnimationSpeed(a.duration||250),complete:a.afterAnima})},slideUp:function(b,a){if(k(this,b,a,"slideUp"))return this;var d=a?a.anchor||"t":"t",f="top left height width overflow position border margin padding".split(" "),c={},g={overflow:"hidden"},e=this.dimension();a=a||{};l(h(this,f),g);switch(d){case "t":c.height="hide";break;case "b":g.height=jq.px0(e.height);c.height="hide";c.top=jq.px(e.top+e.height);break;case "l":c.width=
"hide";break;case "r":g.width=jq.px0(e.width),c.width="hide",c.left=jq.px(e.left+e.width)}return this._createWrapper(this.defaultAnimaOpts(b,a,f).jq).css(g).animate(c,{queue:!1,easing:a.easing,duration:this.getAnimationSpeed(a.duration||250),complete:a.afterAnima})},slideOut:function(b,a){if(k(this,b,a,"slideOut"))return this;var d=a?a.anchor||"t":"t",f="top left position border margin padding".split(" "),c={},g={},e=this.dimension();a=a||{};l(h(this,f),g);switch(d){case "t":c.top=jq.px(e.top-e.height);
break;case "b":c.top=jq.px(e.top+e.height);break;case "l":c.left=jq.px(e.left-e.width);break;case "r":c.left=jq.px(e.left+e.width)}return this._createWrapper(this.defaultAnimaOpts(b,a,f).jq).css(g).animate(c,{queue:!1,easing:a.easing,duration:this.getAnimationSpeed(a.duration||350),complete:a.afterAnima})},slideIn:function(b,a){if(k(this,b,a,"slideIn"))return this;var d=a?a.anchor||"t":"t",f="top left position border margin padding".split(" "),c={},g={},e=this.dimension();a=a||{};l(h(this,f),g);switch(d){case "t":g.top=
jq.px(e.top-e.height);c.top=jq.px(e.top);break;case "b":g.top=jq.px(e.top+e.height);c.top=jq.px(e.top);break;case "l":g.left=jq.px(e.left-e.width);c.left=jq.px(e.left);break;case "r":g.left=jq.px(e.left+e.width),c.left=jq.px(e.left)}return this._createWrapper(this.defaultAnimaOpts(b,a,f,!0).jq).css(g).show().animate(c,{queue:!1,easing:a.easing,duration:this.getAnimationSpeed(a.duration||350),complete:a.afterAnima})},_updateProp:function(b){h(this,b)},defaultAnimaOpts:function(b,a,d,f){var c=this;
jq.timers.push(function(){f||zWatch.fireDown("onHide",b);a.beforeAnima&&a.beforeAnima.call(b,c)});var g=a.afterAnima;a.afterAnima=function(){c._removeWrapper(c.jq);d&&n(c,d);if(f){var a=zk.ie;if(a||zk.edge||zk.safari)zWatch.fireDown("onRestore",b),8!=a&&10!=a||zk(c.jq[0]).redoCSS();zUtl.fireShown(b)}else c.jq.hide();g&&g.call(b,c.jq.context);b.afterAnima_(f);setTimeout(function(){var a=b.uuid,c=zk._anique[a];if(c){for(var e=c.length;e;){var d=c.shift();if(jq(d.el).is(":animated")){c.unshift(d);break}zk(d.el)[d.anima](d.wgt,
d.opts);e--}e||delete zk._anique[a]}})};return this},_createWrapper:function(b){if(b.children(".ui-effects-wrapper").length)return b;var a=b.height(),d=b.width(),f=b.outerHeight(!0),c=b.outerWidth(!0);if(a==f&&d==c)return b;a=zk.copy({boxSizing:"border-box",height:"100%",width:"100%"},b.css("marginLeft marginRight marginTop marginBottom paddingLeft paddingRight paddingTop paddingBottom borderLeftWidth borderRightWidth borderTopWidth borderBottomWidth borderLeftColor borderRightColor borderTopColor borderBottomColor borderLeftStyle borderRightStyle borderTopStyle borderBottomStyle".split(" ")));
a=jq("<div></div>").addClass("ui-effects-wrapper").css(a);d=document.activeElement;try{d.id}catch(g){d=document.body}b.wrapInner(a);(b[0]===d||jq.contains(b[0],d))&&jq(d).trigger("focus");return b.css({border:"none",margin:0,padding:0})},_removeWrapper:function(b){var a=document.activeElement,d=b.children(".ui-effects-wrapper");if(d.length){var f=d.contents();f.length?f.unwrap():d.remove();(b[0]===a||jq.contains(b[0],a))&&jq(a).trigger("focus")}return b}})})();
