EDITABLE CODE:
LiveDemo:jQuery - Select nextAll() and prevAll() Siblings
Note: The result can optionally be filtered by a selector as a second argument to the method.