http://www.josephtheriault.com/2013/10/jquery-rescope-dom-mocking-made-easy.html