closed #43 by refactoring the jquery events for post buttons