Scope issue, I thought function statements were always hoisted to the top of the current context. So why is 'hideNav()' undefined in the following?
var t;
function showNav(bflag){
clearTimeout(t);
if(bflag===true){
$("#tS2").stop(false,false).animate({
'bottom':'0'
}, 1000);
}else{
t=setTimeout("hideNav()",1000);
}
}
function hideNav(){
$("#tS2").stop(true,false).animate({
'bottom':'-125px'
}, 1000);
}