Include JavaScript just if NodeType in use

I answered a similar question some time ago … Access page property by a content node

Feel free to ask if you still have trouble with this. Regards Martin