works down to IE6
Merge pull request #5 from grncdr/use-is-function

works down to IE6