adding paginate and per_page css class
fix jquery error on closePopup function