!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a(jQuery)}(function(a){function b(a,b){return this.numPages=null,this.currPage=0,this.init(a,b)}function c(b){return a(['
  • ',b,"
  • "].join(""))}b.prototype.DATA_KEY="pagination",b.prototype.defaults={startingPage:0,perPage:20,totalDataSize:null,currDataSize:null},b.prototype.init=function(a,c){return c=c||{},this.$element=a,this.options=jQuery.extend(!0,{},this.defaults,c),this.currPage=this.options.startingPage,null!==this.options.totalDataSize&&(this.numPages=Math.ceil(this.options.totalDataSize/this.options.perPage),this.currPage>=this.numPages&&(this.currPage=this.numPages-1)),this.$element.data(b.prototype.DATA_KEY,this),this._render(),this},b.prototype._render=function(){return 0===this.options.totalDataSize?this:1===this.numPages?this:(this.numPages>0?(this._renderPages(),this._scrollToActivePage()):this._renderPrevNext(),this)},b.prototype._renderPrevNext=function(){var b=this,d=c("Prev"),e=c("Next"),f=a("