(function() {
'use strict';
var zoom = 1
, image = document.getElementById('image')
, isMouseOver = false;
document.addEventListener('wheel', function(e) {
var deltaY = e.deltaY;
if(!isMouseOver) {
return;
}
e.preventDefault();
if(e.deltaY > 0) {
zoom -= .1;
} else if(e.deltaY < 0) {
zoom += .1;
}
image.style.zoom = zoom;
}, false);
image.addEventListener('mouseover', function(e) {
isMouseOver = true;
}, false);
image.addEventListener('mouseout', function(e) {
isMouseOver = false;
}, false);
})();