Add Document type and document ready functionality