zul.wgt.Progressmeter=zk.$extends(zul.Widget,{_value:0,_indeterminate:!1,_indeterminateAnimation:!1,$define:{value:function(){this.$n()&&this._fixImgWidth()},indeterminate:function(a){this.$n()&&(jq(this.$n()).toggleClass(this.$s("indeterminate"),a),this._handleIndeterminateAnimation())}},_fixImgWidth:_zkf=function(){var a=this.$n(),b=this.$n("img");b&&zk(a).isRealVisible()&&!this._indeterminateAnimation&&(a=jq(b),a.animate({width:this._value+"%"},{duration:a.zk.getAnimationSpeed("slow"),queue:!1,
easing:"linear"}))},_handleIndeterminateAnimation:zk.ie9?function(){var a=jq(this.$n("img"));this._indeterminate?(a.css({width:"50%"}),this._startIndeterminateAnimation(a),this._indeterminateAnimation=!0):this._indeterminateAnimation&&(a.stop(!0),this._indeterminateAnimation=!1,this._fixImgWidth())}:zk.$void,_startIndeterminateAnimation:function(a){var b=this;a.css({left:"-100%"});a.animate({left:"100%"},1500,"linear",function(){b._startIndeterminateAnimation(a)})},onSize:_zkf,bind_:function(){this.$supers(zul.wgt.Progressmeter,
"bind_",arguments);this._fixImgWidth(this._value);this._handleIndeterminateAnimation();zWatch.listen({onSize:this})},unbind_:function(){zWatch.unlisten({onSize:this});this.$supers(zul.wgt.Progressmeter,"unbind_",arguments)},setWidth:function(a){this.$supers("setWidth",arguments);this._fixImgWidth()},domClass_:function(a){var b=this.$supers("domClass_",arguments);a&&a.zclass||this._indeterminate&&(b+=" "+this.$s("indeterminate"));return b}});
