Update index.php

+ added max-width option for images
+ image width is now set via css
+ fixed <a href generation when 'allowImageClick' is enabled
+ refactored some variable names