added spec to check for text visibility and refactored jquery on 'index,html'