changed click events to use ajax instead of show/hide with javascript