recreated flag using jquery only