add insertBefore and insertAfter method and unit tests for these methods and dom ready function