/* 1 SCROLL */
if ($(window).width() > 1000 && document.getElementById("cases")) {
function addOnWheel(cases, handler) {
if (cases.addEventListener) {
if ('onwheel' in document) {
cases.addEventListener("wheel", handler);
} else if ('onmousewheel' in document) {
cases.addEventListener("mousewheel", handler);
} else {
cases.addEventListener("MozMousePixelScroll", handler);
}
} else {
cases.attachEvent("onmousewheel", handler);
}
}
var translateY = 1;
$(window).keydown(function(e) {
var casesPageStylizationTransform = cases.style.transform;
if (e.keyCode == 32 || e.keyCode == 40) {
if (casesPageStylizationTransform != ('translateY(-87.5%)')) translateY -= 1.5;
cases.style.transform = cases.style.WebkitTransform = cases.style.MsTransform = 'translateY(' + translateY + '%)';
}
if (e.keyCode == 38) {
if (cases.style.transform = ('translateY(' > 0 + '%)')) {
if (casesPageStylizationTransform <= ('translateY(0%)')) translateY += 1.5;
cases.style.transform = cases.style.WebkitTransform = cases.style.MsTransform = 'translateY(' + translateY + '%)';
}
}
});
addOnWheel(cases, function(e) {
var delta = e.deltaY || e.detail || e.wheelDelta;
var casesPageStylizationTransform = cases.style.transform;
if (cases.style.transform = ('translateY(' != -87.5 + '%)')) {
if (delta > 0 && casesPageStylizationTransform != ('translateY(-87.5%)')) translateY -= 1.5;
cases.style.transform = cases.style.WebkitTransform = cases.style.MsTransform = 'translateY(' + translateY + '%)';
}
if (cases.style.transform = ('translateY(' > 0 + '%)')) {
if (delta < 0 && casesPageStylizationTransform <= ('translateY(0%)')) translateY += 1.5;
}
e.preventDefault();
});
}
/* 1 SCROLL ELD */
/* 2 SCROLL */
if ($(window).width() > 1000 && document.getElementById("casePageIdentify")) {
function addOnWheel(casep, handler) {
if (casep.addEventListener) {
if ('onwheel' in document) {
casep.addEventListener("wheel", handler);
} else if ('onmousewheel' in document) {
casep.addEventListener("mousewheel", handler);
} else {
casep.addEventListener("MozMousePixelScroll", handler);
}
} else {
casep.attachEvent("onmousewheel", handler);
}
}
var translateY = 1;
$(window).keydown(function(e) {
var casePageStylizationTransform = caseB.style.transform;
if (e.keyCode == 32 || e.keyCode == 40) {
if (casePageStylizationTransform != ('translateY(-75%)')) translateY -= 1;
caseB.style.transform = caseB.style.WebkitTransform = caseB.style.MsTransform = 'translateY(' + translateY + '%)';
}
if (e.keyCode == 38) {
if (caseB.style.transform = ('translateY(' > 0 + '%)')) {
if (casePageStylizationTransform <= ('translateY(0%)')) translateY += 1;
caseB.style.transform = caseB.style.WebkitTransform = caseB.style.MsTransform = 'translateY(' + translateY + '%)';
}
}
});
addOnWheel(caseB, function(e) {
var delta = e.deltaY || e.detail || e.wheelDelta;
var casePageStylizationTransform = caseB.style.transform;
if (caseB.style.transform = ('translateY(' != -75 + '%)')) {
if (delta > 0 && casePageStylizationTransform != ('translateY(-75%)')) translateY -= 1;
caseB.style.transform = caseB.style.WebkitTransform = caseB.style.MsTransform = 'translateY(' + translateY + '%)';
}
if (caseB.style.transform = ('translateY(' > 0 + '%)')) {
if (delta < 0 && casePageStylizationTransform < ('translateY(0%)')) translateY += 1;
}
e.preventDefault();
});
}
/* 2 SCROLL END */
function addOnWheel(cases, handler) {
if (cases.addEventListener) {
if ('onwheel' in document) {
cases.addEventListener('wheel', handler);
} else if ('onmousewheel' in document) {
cases.addEventListener('mousewheel', handler);
} else {
cases.addEventListener('MozMousePixelScroll', handler);
}
} else {
cases.attachEvent('onmousewheel', handler);
}
}
if ($(window).width() > 1000 && document.querySelectorAll('.all-cases')) {
var translateY = 1;
$(window).keydown(function (e) {
var casesPageStylizationTransform = cases.style.transform;
if (e.keyCode == 32 || e.keyCode == 40) {
if (casesPageStylizationTransform != ('translateY(-87.5%)')) translateY -= 1.5;
cases.style.transform = cases.style.WebkitTransform = cases.style.MsTransform = 'translateY(' + translateY + '%)';
}
if (e.keyCode == 38) {
if (cases.style.transform = ('translateY(' > 0 + '%)')) {
if (casesPageStylizationTransform <= ('translateY(0%)')) translateY += 1.5;
cases.style.transform = cases.style.WebkitTransform = cases.style.MsTransform = 'translateY(' + translateY + '%)';
}
}
});
addOnWheel(cases, function (e) {
var delta = e.deltaY || e.detail || e.wheelDelta;
var casesPageStylizationTransform = cases.style.transform;
if (cases.style.transform = ('translateY(' != -87.5 + '%)')) {
if (delta > 0 && casesPageStylizationTransform != ('translateY(-87.5%)')) translateY -= 1.5;
cases.style.transform = cases.style.WebkitTransform = cases.style.MsTransform = 'translateY(' + translateY + '%)';
}
if (cases.style.transform = ('translateY(' > 0 + '%)')) {
if (delta < 0 && casesPageStylizationTransform <= ('translateY(0%)')) translateY += 1.5;
}
e.preventDefault();
});
}