Ajax working within plugin