fixed indentation
added doc ready function