I suspect that you’ve simply forgotten to load jQuery.
Also, I made 1 slight change to your script to make the menu only open its child subnav.
This:
$("ul.pnav li").click(function() {
Became:
$("ul.pnav li a").click(function() {
As it seemed to fit better with the line below it.
Live example: http://jsfiddle.net/DnGRm/
1
solved Why isn’t my JS working? [closed]