Removed String.contains() and replaced with indexOf(val) != -1 instead. String.contains() did not work in IE.