You can use the callback parameter in the show() and hide() methods like this:
$('#myDiv').show(0, onDivShow);
$('#myDiv').hide(0, onDivHide);
function onDivShow() { //your code here }
function onDivHide() { //your code here }
See a working example here: http://jsfiddle.net/N7UNU/