Add a jqPivot function to build the pivot automatically