2
0
MasterPassword/public/site/2013-05/js/main.js
2017-03-06 13:40:39 -05:00

26 lines
617 B
JavaScript
Executable File

$(function(){
$.stellar();
window.onscroll = function() {
document.getElementById("scrollDown").style.opacity = Math.max(0, 200 - window.scrollY) / 200;
};
if (document.location.hash == "#video")
toggleMovie();
$("video")[0].addEventListener("playing", function() {
$(this).parents().find(".fallback").hide();
}, true);
});
function toggleMovie() {
if ($("header").hasClass("play")) {
$("header").removeClass("play");
$("header video")[0].pause();
} else {
$("header").addClass("play");
$("header video")[0].play();
}
}