Fixed pagination bug, where jqPagination does not like to be called outside of scope of window.