Really confused, I can't find anything wrong!

You can't declare a variable within an object literal. Move pid outside:
var pid = ...
$.ajax({ ... });
You cannot have a var statement inside of an object literal. You can only have object properties inside of an object literal, with the key: value format.
I think you are wanting something like this.
var pid = $("span#live-news:first").attr("id");
$.ajax({
// all the AJAX options go here
});