$.nodeName(this, 'title')
Adjusted .contents().eq(index) to dinamically find the right #text