JS in external file AdaptiveImages.js allows better readability and maintainability. The minified version from google closure compiler is then inserted in PHP file.
Optimize styles insertion by grouping it in only one <style> tag
print support : fix all images before print