I'm not quite sure how to do this in jQuery... but this works:
var x = document.getElementById('google').attributes;
for (var i in x) {
if (x[i].name == "onclick") alert(x[i].firstChild.data);
}
but like Harshath said it would be better if you used event listeners, as removing and adding this function back into the onclick event may be troublesome.