fix javascript for flex slider