adapte to jQuery