Renaming, error mgmt, write spinner.

index.php
* Changed some method names for readability.

shoppingitem.js
+ Added Spinner class to item elements with a pending write result.

styles.css
+ Added Spinner class.

write.php
+ Added random delay (0-3s) before returning.
+ Added error output if file not opened.
* Some refactoring for readability.

spinner.gif
+ Added.