change url value of JQuery.ajax
add function to define global ajaxurl