[jquery] token input with files

Hello

I want to make a token input, something similar to this http://loopj.com/jquery-tokeninput/

but instead of data from a database, I want it to be images from a file input.

I presume it would be something along the lines of, creating an image upload script and then echoing a thumbnail of the image into a div after each upload.

How would I get started with this? The PHP bit I can handle, but the javascript I will need some help.