Como executar o jQuery antes e depois de uma carga de pjax?

Atualmente estou usando pjax e funciona muito bem, mas eu preciso executar duas funções jQuery, um antes de pjax carrega o novo url e um após o novo URL é carregado, como posso fazer isso?

Eu tentei as duas variações seguintes, mas nenhuma delas parece funcionar?

Primeira tentativa:

$("a").pjax("#main").live('click', function(){

    //Function Before Load  
    // Function After Load
})  

Segunda tentativa:

$("body").on("click", "a", function(){

    //Function Before Load  

    $(this).pjax("#main");

    //Function After Load   

    return false;
});

questionAnswers(2)

yourAnswerToTheQuestion