Is there any need to have this as a switch statement, given that there is only one clause?

```
if ( node.nodeType == 1 ) {
```

Also means that you can ditch `var nodeType = node.nodeType`