/*!
 * FooTable - Awesome Responsive Tables
 * Version : 0.5
 * http://themergency.com/footable
 *
 * Requires jQuery - http://jquery.com/
 *
 * Copyright 2012 Steven Usher & Brad Vincent
 * Released under the MIT license
 * You are free to use FooTable in commercial projects as long as this copyright header is left intact.
 *
 * Date: 22 Apr 2013
 */
(function(d,a,f){a.footable={options:{delay:100,breakpoints:{phone:480,tablet:1024},parsers:{alpha:function(g){return d(g).data("value")||d.trim(d(g).text())},numeric:function(g){var h=d(g).data("value")||d(g).text().replace(/[^0-9.\-]/g,"");h=parseFloat(h);if(isNaN(h)){h=0}return h}},calculateWidthAndHeightOverride:null,toggleSelector:" > tbody > tr:not(.footable-row-detail)",columnDataSelector:"> thead > tr:last-child > th, > thead > tr:last-child > td",detailSeparator:":",createGroupedDetail:function(k){var g={_none:{name:null,data:[]}};for(var j=0;j<k.length;j++){var h=k[j].group;if(h!==null){if(!(h in g)){g[h]={name:k[j].groupName||k[j].group,data:[]}}g[h].data.push(k[j])}else{g._none.data.push(k[j])}}return g},createDetail:function(m,l,p,k,h){var g=p(l);for(var o in g){if(g[o].data.length===0){continue}if(o!=="_none"){m.append('<div class="'+h.detailInnerGroup+'">'+g[o].name+"</div>")}for(var i=0;i<g[o].data.length;i++){var n=(g[o].data[i].name)?k:"";m.append('<div class="'+h.detailInnerRow+'"><div class="'+h.detailInnerName+'">'+g[o].data[i].name+n+'</div><div class="'+h.detailInnerValue+'">'+g[o].data[i].display+"</div></div>")}}},classes:{main:"footable",loading:"footable-loading",loaded:"footable-loaded",toggle:"footable-toggle",detail:"footable-row-detail",detailCell:"footable-row-detail-cell",detailInner:"footable-row-detail-inner",detailInnerRow:"footable-row-detail-row",detailInnerGroup:"footable-row-detail-group",detailInnerName:"footable-row-detail-name",detailInnerValue:"footable-row-detail-value",detailShow:"footable-detail-show"},triggers:{initialize:"footable_initialize",resize:"footable_resize",toggleRow:"footable_toggle_row",expandFirstRow:"footable_expand_first_row"},events:{alreadyInitialized:"footable_already_initialized",initializing:"footable_initializing",initialized:"footable_initialized",resizing:"footable_resizing",resized:"footable_resized",breakpoint:"footable_breakpoint",columnData:"footable_column_data",rowDetailUpdating:"footable_row_detail_updating",rowDetailUpdated:"footable_row_detail_updated",rowCollapsed:"footable_row_collapsed",rowExpanded:"footable_row_expanded"},debug:false,log:null},version:{major:0,minor:5,toString:function(){return a.footable.version.major+"."+a.footable.version.minor},parse:function(g){version=/(\d+)\.?(\d+)?\.?(\d+)?/.exec(g);return{major:parseInt(version[1],10)||0,minor:parseInt(version[2],10)||0,patch:parseInt(version[3],10)||0}}},plugins:{_validate:function(g){if(typeof g.name!=="string"){if(a.footable.options.debug===true){console.error('Validation failed, plugin does not implement a string property called "name".',g)}return false}if(!d.isFunction(g.init)){if(a.footable.options.debug===true){console.error('Validation failed, plugin "'+g.name+'" does not implement a function called "init".',g)}return false}if(a.footable.options.debug===true){console.log('Validation succeeded for plugin "'+g.name+'".',g)}return true},registered:[],register:function(h,g){if(a.footable.plugins._validate(h)){a.footable.plugins.registered.push(h);if(g!==f&&typeof g==="object"){d.extend(true,a.footable.options,g)}if(a.footable.options.debug===true){console.log('Plugin "'+h.name+'" has been registered with the Foobox.',h)}}},init:function(g){for(var h=0;h<a.footable.plugins.registered.length;h++){try{a.footable.plugins.registered[h]["init"](g)}catch(j){if(a.footable.options.debug===true){console.error(j)}}}}}};var c=0;d.fn.footable=function(g){g=g||{};var h=d.extend(true,{},a.footable.options,g);return this.each(function(){c++;this.footable=new e(this,h,c)})};function b(){var g=this;g.id=null;g.busy=false;g.start=function(i,h){if(g.busy){return}g.stop();g.id=setTimeout(function(){i();g.id=null;g.busy=false},h);g.busy=true};g.stop=function(){if(g.id!==null){clearTimeout(g.id);g.id=null;g.busy=false}}}function e(n,j,h){var l=this;l.id=h;l.table=n;l.options=j;l.breakpoints=[];l.breakpointNames="";l.columns={};var i=l.options,p=i.classes,m=i.events,g=i.triggers,k=0;l.timers={resize:new b(),register:function(o){l.timers[o]=new b();return l.timers[o]}};a.footable.plugins.init(l);l.init=function(){var r=d(a),q=d(l.table);if(q.hasClass(p.loaded)){l.raise(m.alreadyInitialized);return}l.raise(m.initializing);q.addClass(p.loading);q.find(i.columnDataSelector).each(function(){var s=l.getColumnData(this);l.columns[s.index]=s});for(var o in i.breakpoints){l.breakpoints.push({name:o,width:i.breakpoints[o]});l.breakpointNames+=(o+" ")}l.breakpoints.sort(function(t,s){return t.width-s.width});q.bind(g.initialize,function(){q.removeData("footable_info");q.data("breakpoint","");l.addRowToggle();l.bindToggleSelectors();l.setColumnClasses();q.removeClass(p.loading);q.addClass(p.loaded).addClass(p.main);q.trigger(g.resize);l.raise(m.initialized)}).bind(g.resize,function(){l.resize()}).bind(g.expandFirstRow,function(){q.find(i.toggleSelector).first().not("."+p.detailShow).trigger(g.toggleRow)});q.trigger(g.initialize);r.bind("resize.footable",function(){l.timers.resize.stop();l.timers.resize.start(function(){l.raise(g.resize)},i.delay)})};l.addRowToggle=function(){var r=d(l.table),t=false;r.find("span."+p.toggle).remove();for(var s in l.columns){var q=l.columns[s];if(q.toggle){t=true;var o="> tbody > tr:not(."+p.detail+") > td:nth-child("+(parseInt(q.index,10)+1)+")";r.find(o).not("."+p.detailCell).prepend(d("<span />").addClass(p.toggle));return}}if(!t){r.find("> tbody > tr:not(."+p.detail+") > td:first-child").not("."+p.detailCell).prepend(d("<span />").addClass(p.toggle))}};l.setColumnClasses=function(){$table=d(l.table);for(var s in l.columns){var q=l.columns[s];if(q.className!==null){var o="",r=true;d.each(q.matches,function(t,u){if(!r){o+=", "}o+="> tbody > tr:not(."+p.detail+") > td:nth-child("+(parseInt(u,10)+1)+")";r=false});$table.find(o).not("."+p.detailCell).addClass(q.className)}}};l.bindToggleSelectors=function(){var o=d(l.table);o.find(i.toggleSelector).unbind(g.toggleRow).bind(g.toggleRow,function(r){var q=d(this).is("tr")?d(this):d(this).parents("tr:first");l.toggleDetail(q.get(0))});o.find(i.toggleSelector).unbind("click.footable").bind("click.footable",function(q){if(o.is(".breakpoint")&&d(q.target).is("td,.footable-toggle")){d(this).trigger(g.toggleRow)}})};l.parse=function(o,q){var r=i.parsers[q.type]||i.parsers.alpha;return r(o)};l.getColumnData=function(q){var B=d(q),w=B.data("hide"),x=B.index();w=w||"";w=w.split(",");var v={index:x,hide:{},type:B.data("type")||"alpha",name:B.data("name")||d.trim(B.text()),ignore:B.data("ignore")||false,toggle:B.data("toggle")||false,className:B.data("class")||null,matches:[],names:{},group:B.data("group")||null,groupName:null};if(v.group!==null){var A=d(l.table).find('> thead > tr.footable-group-row > th[data-group="'+v.group+'"], > thead > tr.footable-group-row > td[data-group="'+v.group+'"]').first();v.groupName=l.parse(A,{type:"alpha"})}var r=parseInt(B.prev().attr("colspan")||0,10);k+=r>1?r-1:0;var s=parseInt(B.attr("colspan")||0,10),t=v.index+k;if(s>1){var z=B.data("names");z=z||"";z=z.split(",");for(var u=0;u<s;u++){v.matches.push(u+t);if(u<z.length){v.names[u+t]=z[u]}}}else{v.matches.push(t)}v.hide["default"]=(B.data("hide")==="all")||(d.inArray("default",w)>=0);for(var o in i.breakpoints){v.hide[o]=(B.data("hide")==="all")||(d.inArray(o,w)>=0)}var y=l.raise(m.columnData,{column:{data:v,th:q}});return y.column.data};l.getViewportWidth=function(){return window.innerWidth||(document.body?document.body.offsetWidth:0)};l.getViewportHeight=function(){return window.innerHeight||(document.body?document.body.offsetHeight:0)};l.calculateWidthAndHeight=function(o,q){if(jQuery.isFunction(i.calculateWidthAndHeightOverride)){return i.calculateWidthAndHeightOverride(o,q)}if(q.viewportWidth<q.width){q.width=q.viewportWidth}if(q.viewportHeight<q.height){q.height=q.viewportHeight}return q};l.hasBreakpointColumn=function(o){for(var q in l.columns){if(l.columns[q].hide[o]){if(l.columns[q].ignore){continue}return true}}return false};l.resize=function(){var x=d(l.table);if(!x.is(":visible")){return}var q={width:x.width(),height:x.height(),viewportWidth:l.getViewportWidth(),viewportHeight:l.getViewportHeight(),orientation:null};q.orientation=q.viewportWidth>q.viewportHeight?"landscape":"portrait";q=l.calculateWidthAndHeight(x,q);var s=x.data("footable_info");x.data("footable_info",q);l.raise(m.resizing,{old:s,info:q});if(!s||((s&&s.width&&s.width!==q.width)||(s&&s.height&&s.height!==q.height))){var t=null,v;for(var r=0;r<l.breakpoints.length;r++){v=l.breakpoints[r];if(v&&v.width&&q.width<=v.width){t=v;break}}var w=(t===null?"default":t.name),o=l.hasBreakpointColumn(w),u=x.data("breakpoint");x.data("breakpoint",w);if(w!==u){x.find("> tbody > tr:not(."+p.detail+")").data("detail_created",false).end().removeClass("default breakpoint").removeClass(l.breakpointNames).addClass(w+(o?" breakpoint":"")).find("> thead > tr:last-child > th").each(function(){var C=l.columns[d(this).index()],y="",E=true;d.each(C.matches,function(F,G){if(!E){y+=", "}var H=G+1;y+="> tbody > tr:not(."+p.detail+") > td:nth-child("+H+")";y+=", > tfoot > tr:not(."+p.detail+") > td:nth-child("+H+")";y+=", > colgroup > col:nth-child("+H+")";E=false});y+=', > thead > tr[data-group-row="true"] > th[data-group="'+C.group+'"]';var D=x.find(y).add(this);if(C.hide[w]===false){D.show()}else{D.hide()}if(x.find("> thead > tr.footable-group-row").length===1){var A=x.find('> thead > tr:last-child > th[data-group="'+C.group+'"]:visible, > thead > tr:last-child > th[data-group="'+C.group+'"]:visible'),B=x.find('> thead > tr.footable-group-row > th[data-group="'+C.group+'"], > thead > tr.footable-group-row > td[data-group="'+C.group+'"]'),z=0;d.each(A,function(){z+=parseInt(d(this).attr("colspan")||1,10)});if(z>0){B.attr("colspan",z).show()}else{B.hide()}}}).end().find("> tbody > tr."+p.detailShow).each(function(){l.createOrUpdateDetailRow(this)});x.find("> tbody > tr."+p.detailShow+":visible").each(function(){var y=d(this).next();if(y.hasClass(p.detail)){if(!o){y.hide()}else{y.show()}}});x.find("> thead > tr > th.footable-last-column, > tbody > tr > td.footable-last-column").removeClass("footable-last-column");x.find("> thead > tr > th.footable-first-column, > tbody > tr > td.footable-first-column").removeClass("footable-first-column");x.find("> thead > tr, > tbody > tr").find("> th:visible:last, > td:visible:last").addClass("footable-last-column").end().find("> th:visible:first, > td:visible:first").addClass("footable-first-column");l.raise(m.breakpoint,{breakpoint:w,info:q})}}l.raise(m.resized,{old:s,info:q})};l.toggleDetail=function(r){var o=d(r),q=o.next();if(o.hasClass(p.detailShow)){o.removeClass(p.detailShow);if(q.hasClass(p.detail)){q.hide()}l.raise(m.rowCollapsed,{row:r})}else{l.createOrUpdateDetailRow(r);o.addClass(p.detailShow);o.next().show();l.raise(m.rowExpanded,{row:r})}};l.getColumnFromTdIndex=function(q){var o=null;for(var r in l.columns){if(d.inArray(q,l.columns[r].matches)>=0){o=l.columns[r];break}}return o};l.createOrUpdateDetailRow=function(v){var o=d(v),q=o.next(),t,r=[];if(o.data("detail_created")===true){return true}if(o.is(":hidden")){return false}l.raise(m.rowDetailUpdating,{row:o,detail:q});o.find("> td:hidden").each(function(){var x=d(this).index(),y=l.getColumnFromTdIndex(x),w=y.name;if(y.ignore===true){return true}if(x in y.names){w=y.names[x]}r.push({name:w,value:l.parse(this,y),display:d.trim(d(this).html()),group:y.group,groupName:y.groupName});return true});if(r.length===0){return false}var u=o.find("> td:visible").length;var s=q.hasClass(p.detail);if(!s){q=d('<tr class="'+p.detail+'"><td class="'+p.detailCell+'"><div class="'+p.detailInner+'"></div></td></tr>');o.after(q)}q.find("> td:first").attr("colspan",u);t=q.find("."+p.detailInner).empty();i.createDetail(t,r,i.createGroupedDetail,i.detailSeparator,p);o.data("detail_created",true);l.raise(m.rowDetailUpdated,{row:o,detail:q});return !s};l.raise=function(o,q){if(l.options.debug===true&&d.isFunction(l.options.log)){l.options.log(o,"event")}q=q||{};var r={ft:l};d.extend(true,r,q);var s=d.Event(o,r);if(!s.ft){d.extend(true,s,r)}d(l.table).trigger(s);return s};l.init();return l}})(jQuery,window);


///////////////////////////*SORTABLE*/////////////////////

!function(t,e,i){function n(){var e=this;e.name="Footable Sortable",e.init=function(i){i.options.sort===!0&&t(i.table).bind({footable_initialized:function(){var n,s,a=i.options.classes.sort,o=i.options.events.sort,r=t(i.table),l=r.find("> tbody");if(r.data("sort")!==!1){r.find("> thead > tr:last-child > th, > thead > tr:last-child > td").each(function(){s=t(this),n=i.columns[s.index()],n.sort.ignore===!0||s.hasClass(a.sortable)||(s.addClass(a.sortable),t("<span />").addClass(a.indicator).appendTo(s))}),r.find("> thead > tr:last-child > th."+a.sortable+", > thead > tr:last-child > td."+a.sortable).unbind("click.footable").bind("click.footable",function(h){if(h.preventDefault(),s=t(this),n=i.columns[s.index()],n.sort.ignore===!0)return!0;var c=!0,u=!0;s.hasClass(a.sorted)?(c=!1,u=!1):s.hasClass(a.descending)&&(c=!1);var d=i.raise(o.sorting,{column:n,direction:u?"ASC":"DESC"});return d&&d.result===!1?void 0:(r.data("sorted",n.index),r.find("> thead > tr:last-child > th, > thead > tr:last-child > td").not(s).removeClass(a.sorted+" "+a.descending),u?s.removeClass(a.descending).addClass(a.sorted):s.removeClass(a.sorted).addClass(a.descending),c?e.sort(i,l,n):e.reverse(i,l),i.bindToggleSelectors(),i.raise(o.sorted,{column:n,direction:u?"ASC":"DESC"}),!1)});var h=!1;for(var c in i.columns)if(n=i.columns[c],n.sort.initial){e.sort(i,l,n),h=!0,s=r.find("> thead > tr:last-child > th:eq("+c+"), > thead > tr:last-child > td:eq("+c+")"),"descending"===n.sort.initial?(e.reverse(i,l),s.addClass(a.descending)):s.addClass(a.sorted);break}h&&i.bindToggleSelectors()}},footable_column_data:function(e){var i=t(e.column.th);e.column.data.sort=e.column.data.sort||{},e.column.data.sort.initial=i.data("sort-initial")||!1,e.column.data.sort.ignore=i.data("sort-ignore")||!1,e.column.data.sort.selector=i.data("sort-selector")||null;var n=i.data("sort-match")||0;n>=e.column.data.matches.length&&(n=0),e.column.data.sort.match=e.column.data.matches[n]}})},e.rows=function(e,n,s){var a=[];return n.find("> tr").each(function(){var n=t(this),o=null;if(n.hasClass(e.options.classes.detail))return!0;n.next().hasClass(e.options.classes.detail)&&(o=n.next().get(0));var r={row:n,detail:o};return s!==i&&(r.value=e.parse(this.cells[s.sort.match],s)),a.push(r),!0}).detach(),a},e.sort=function(t,i,n){var s=e.rows(t,i,n),a=t.options.sorters[n.type]||t.options.sorters.alpha;s.sort(function(t,e){return a(t.value,e.value)});for(var o=0;o<s.length;o++)i.append(s[o].row),null!==s[o].detail&&i.append(s[o].detail)},e.reverse=function(t,i){for(var n=e.rows(t,i),s=n.length-1;s>=0;s--)i.append(n[s].row),null!==n[s].detail&&i.append(n[s].detail)}}if(e.footable===i||null===e.footable)throw new Error("Please check and make sure footable.js is included in the page and is loaded prior to this script.");var s={sort:!0,sorters:{alpha:function(t,e){return t===e?0:e>t?-1:1},numeric:function(t,e){return t-e}},classes:{sort:{sortable:"footable-sortable",sorted:"footable-sorted",descending:"footable-sorted-desc",indicator:"footable-sort-indicator"}},events:{sort:{sorting:"footable_sorting",sorted:"footable_sorted"}}};e.footable.plugins.register(new n,s)}(jQuery,window);


///////////////////////////*SEARCH - FILTER*/////////////////////

!function(e,t,i){function n(){var t=this;t.name="Footable Filter",t.init=function(i){i.options.filter.enabled===!0&&(i.timers.register("filter"),e(i.table).bind({footable_initialized:function(){var n=e(i.table),s={input:n.data("filter")||i.options.filter.input,timeout:n.data("filter-timeout")||i.options.filter.timeout,minimum:n.data("filter-minimum")||i.options.filter.minimum,disableEnter:n.data("filter-disable-enter")||i.options.filter.disableEnter};s.disableEnter&&e(s.input).keypress(function(e){return window.event?13!==window.event.keyCode:13!==e.which}),n.bind("footable_clear_filter",function(){e(s.input).val(""),t.clearFilter(i)}),n.bind("footable_filter",function(e,n){t.filter(i,n.filter)}),e(s.input).keyup(function(n){i.timers.filter.stop(),27===n.which&&e(s.input).val(""),i.timers.filter.start(function(){var n=e(s.input).val()||"";t.filter(i,n)},s.timeout)})}}))},t.filter=function(i,n){var s=e(i.table),o=s.data("filter-minimum")||i.options.filter.minimum,a=!n||n.length<o,r=i.raise("footable_filtering",{filter:n,clear:a});if(!r||r.result!==!1)if(a)t.clearFilter(i);else{var l=n.split(" ");s.find("> tbody > tr").hide().addClass("footable-filtered");var h=s.find("> tbody > tr:not(.footable-row-detail)");e.each(l,function(e,t){t&&t.length&&(s.data("current-filter",t),h=h.filter(i.options.filter.filterFunction))}),h.each(function(){t.showRow(this,i),e(this).removeClass("footable-filtered")}),i.raise("footable_filtered",{filter:n,clear:!1})}},t.clearFilter=function(i){e(i.table).find("> tbody > tr:not(.footable-row-detail)").removeClass("footable-filtered").each(function(){t.showRow(this,i)}),i.raise("footable_filtered",{clear:!0})},t.showRow=function(t,i){var n=e(t),s=n.next(),o=e(i.table);n.is(":visible")||(o.hasClass("breakpoint")&&n.hasClass("footable-detail-show")&&s.hasClass("footable-row-detail")?(n.add(s).show(),i.createOrUpdateDetailRow(t)):n.show())}}if(t.footable===i||null===t.footable)throw new Error("Please check and make sure footable.js is included in the page and is loaded prior to this script.");var s=t.footable.version.parse(e.fn.jquery);e.expr[":"].ftcontains=1===s.major&&s.minor<8?function(t,i,n){return e(t).text().toUpperCase().indexOf(n[3].toUpperCase())>=0}:e.expr.createPseudo(function(t){return function(i){var n=e(i).find("td").text();return e(i).find("td[data-value]").each(function(){n+=e(this).data("value")}),n.toUpperCase().indexOf(t.toUpperCase())>=0}});var o={filter:{enabled:!0,input:".footable-filter",timeout:300,minimum:2,disableEnter:!1,filterFunction:function(){var t=e(this),i=t.parents("table:first"),n=i.data("current-filter").toUpperCase(),s=t.find("td").text();return t.find("td[data-value]").each(function(){s+=e(this).data("value")}),s.toUpperCase().indexOf(n)>=0}}};t.footable.plugins.register(new n,o)}(jQuery,window);

///////////////////////////*PAGINATION*/////////////////////

!function(t,e,i){function n(e){var i=t(e.table);i.find("> tbody"),this.pageNavigation=i.data("page-navigation")||e.options.pageNavigation,this.pageSize=i.data("page-size")||e.options.pageSize,this.firstText=i.data("page-first-text")||e.options.firstText,this.previousText=i.data("page-previous-text")||e.options.previousText,this.nextText=i.data("page-next-text")||e.options.nextText,this.lastText=i.data("page-last-text")||e.options.lastText,this.currentPage=0,this.pages=[],this.control=!1}function s(){var e=this;e.name="Footable Paginate",e.init=function(i){i.options.paginate===!0&&t(i.table).bind({footable_initialized:function(){i.pageInfo=new n(i),i.raise("footable_setup_paging")},"footable_sorted footable_filtered footable_setup_paging":function(){e.setupPaging(i)}})},e.setupPaging=function(i){var n=t(i.table).find("> tbody");e.createPages(i,n),e.createNavigation(i,n),e.fillPage(i,n,i.pageInfo.currentPage)},e.createPages=function(t,e){var i=1,n=t.pageInfo,s=i*n.pageSize,a=[],o=[];n.pages=[];var r=e.find("> tr:not(.footable-filtered,.footable-row-detail)");r.each(function(t,e){a.push(e),t===s-1?(n.pages.push(a),i++,s=i*n.pageSize,a=[]):t>=r.length-r.length%n.pageSize&&o.push(e)}),o.length>0&&n.pages.push(o),n.currentPage>=n.pages.length&&(n.currentPage=n.pages.length-1),n.currentPage<0&&(n.currentPage=0)},e.createNavigation=function(i){var n=t(i.table).find(i.pageInfo.pageNavigation);if(0===n.length){if(n=t(i.pageInfo.pageNavigation),n.parents("table:first")!==t(i.table))return;n.length>1&&i.options.debug===!0&&console.error("More than one pagination control was found!")}if(0!==n.length){n.is("ul")||(0===n.find("ul:first").length&&n.append("<ul />"),n=n.find("ul")),n.find("li").remove();var s=i.pageInfo;s.control=n,s.pages.length>0&&(n.append('<li class="footable-page-arrow"><a data-page="first" href="#first">'+i.pageInfo.firstText+"</a>"),n.append('<li class="footable-page-arrow"><a data-page="prev" href="#prev">'+i.pageInfo.previousText+"</a></li>"),t.each(s.pages,function(t,e){e.length>0&&n.append('<li class="footable-page"><a data-page="'+t+'" href="#">'+(t+1)+"</a></li>")}),n.append('<li class="footable-page-arrow"><a data-page="next" href="#next">'+i.pageInfo.nextText+"</a></li>"),n.append('<li class="footable-page-arrow"><a data-page="last" href="#last">'+i.pageInfo.lastText+"</a></li>")),n.find("a").click(function(n){n.preventDefault();var a=t(this).data("page"),o=s.currentPage;"first"===a?o=0:"prev"===a?o>0&&o--:"next"===a?o<s.pages.length-1&&o++:o="last"===a?s.pages.length-1:a,e.paginate(i,o)}),e.setPagingClasses(n,s.currentPage,s.pages.length)}},e.paginate=function(i,n){var s=i.pageInfo;if(s.currentPage!==n){var a=t(i.table).find("> tbody"),o=i.raise("footable_paging",{page:n,size:s.pageSize});if(o&&o.result===!1)return;e.fillPage(i,a,n),s.control.find("li").removeClass("active disabled"),e.setPagingClasses(s.control,s.currentPage,s.pages.length)}},e.setPagingClasses=function(t,e,i){t.find("li.footable-page > a[data-page="+e+"]").parent().addClass("active"),e>=i-1&&(t.find('li.footable-page-arrow > a[data-page="next"]').parent().addClass("disabled"),t.find('li.footable-page-arrow > a[data-page="last"]').parent().addClass("disabled")),1>e&&(t.find('li.footable-page-arrow > a[data-page="first"]').parent().addClass("disabled"),t.find('li.footable-page-arrow > a[data-page="prev"]').parent().addClass("disabled"))},e.fillPage=function(i,n,s){i.pageInfo.currentPage=s,n.find("> tr").hide(),t(i.pageInfo.pages[s]).each(function(){e.showRow(this,i)})},e.showRow=function(e,i){var n=t(e),s=n.next(),a=t(i.table);a.hasClass("breakpoint")&&n.hasClass("footable-detail-show")&&s.hasClass("footable-row-detail")?(n.add(s).show(),i.createOrUpdateDetailRow(e)):n.show()}}if(e.footable===i||null===e.footable)throw new Error("Please check and make sure footable.js is included in the page and is loaded prior to this script.");var a={paginate:!0,pageSize:10,pageNavigation:".pagination",firstText:"&laquo;",previousText:"&lsaquo;",nextText:"&rsaquo;",lastText:"&raquo;"};e.footable.plugins.register(new s,a)}(jQuery,window);