Script itself is made to devide pic in peices of grid size and width, and then you can perform with it anything you'd like.
index.html demonstrates an effect when we devide picture, depending on grid, and set an accurate backgound position to each of pices for further transformations and manipulations.
Run opening index.html