Problem is, you have a syntax error because you haven't closed your $(document).ready()
function or method:
$(document).ready(function () {
$("#p1").click(function () {
$("#p2").hide("slow", function(){
function2();
});
});
});
As already mentioned, you can just pass the function's reference if that is all that should be in the callback:
$("#p2").hide("slow", function2);