```
var $par = $item.parent();
if ($par.is("section"))...
```
Should do the trick.