added in ajax stuff from jsfiddle into -codefiddle.js- file