added functionality to use a jquery slider element