Fixed bug in contains.js. Created fallback for older FF's lack of CustomEvent. Added tests for unprefixed transitionend event.