convert jquery slider plugin to directive