text: var GeRndAphorisms=function(){function t(t,i,s,e){this._flag=!0,this._block=$(t),this._progress=this._block.find(".rnd-aphorism__progress"),this._btnNextId=i,this._dataUrl=s,this._callback=e}return t.prototype.initialize=function(){var t=this;this._block.on("click",this._btnNextId,function(i){i.preventDefault();var s=t._block.find(".rnd-aphorism").attr("data-id");$.ajax({method:"get",url:t._dataUrl,data:{id:s},beforeSend:function(){$("<i></i>").addClass("fa fa-spinner fa-spin").attr("aria-hidden","true").prependTo(t._btnNextId)},success:function(i,s,e){t._block.html(i),t._callback&&t._callback(),t._progress=t._block.find(".rnd-aphorism__progress");var r=parseInt(t._block.find("[data-seconds]").attr("data-seconds"));t.initializeTimer(r)}})}),this._block.on("mouseenter",function(i){t._flag=!1}),this._block.on("mouseleave",function(i){t._flag=!0});var i=parseInt(this._block.find("[data-seconds]").attr("data-seconds"));this.initializeTimer(i)},t.prototype.initializeTimer=function(t){var i=this;clearInterval(this._timer),this._seconds=t,this._timerCounter=this._seconds,this._timer=setInterval(function(){i.reloadProgress()},1e3)},t.prototype.reloadProgress=function(){if(this._flag)if(this._timerCounter>0){this._timerCounter--;var t=100*this._timerCounter/this._seconds;this._progress.css("width",t+"%")}else $(this._btnNextId).trigger("click")},t}();