sets up AJAX plugin functionality