Change
setTimeout(lhc(), 5000);
to
setTimeout(lhc, 5000);
You're calling the function directly without a timeout when you add the parenthesis, and calling the function right away inside the same function quickly becomes an endless loop that fills up the stack