modified flash to jquery code