jQuery plugin for handling selections