Refactor playlist/controls code as jQuery plugin