/*
Jump to section and play video
$(document).ready(function(){
var flag = true;
var vid = document.getElementById("latest-project-video");
var playvideo = true;
var slidedown = true;
function playVid() {
if( vid.paused ){
vid.play();
}
}
function pauseVid() {
vid.pause();
}
$('body').bind('mousewheel', function(e){
if(e.originalEvent.wheelDelta /120 > 0) {
console.log('Scrolling up');
flag = true;
slidedown = true;
}
else{
console.log('Scrolling down');
var hT = $('#latest-project').offset().top,
hH = $('#latest-project').outerHeight(),
wH = $(window).height(),
wS = $(window).scrollTop();
if (wS > (hT+hH-wH-(wH/2)) && wS < (hT+hH) ){
console.log('In viewport');
if( slidedown ){
$('html, body').stop().delay(500).animate({
scrollTop: $('#latest-project').offset().top
}, 1000, function() {
if( playvideo ){
playVid();
}
});
slidedown = false;
}
}
}
});
});
*/