changed $.get() calls to $.ajax() calls