Refactoring made to fix various issues and updated jquery and imgAreaSelect

Refactoring made to fix various issues, mostly for images resized with
CSS. Bundled imgAreaSelect and jquery are updated too. It would probably
work with jQuery 1.9+ too.