Solves #7, with limited support for IE and Opera.