XL Air

$(window).load(function() { // Animate loader off screen $(".se-pre-con").fadeOut("slow"); }); $( document ).ready(function() { $("#headerScroll").click(function() { $('html, body').animate({ scrollTop: $(".wrapperHome").offset().top - 70 }, 500, 'swing'); }); var movementStrength = 25; var height = movementStrength / $(window).height(); var width = movementStrength / $(window).width(); $("header").mousemove(function(e){ var pageX = e.pageX - ($(window).width() / 2); var pageY = e.pageY - ($(window).height() / 2); var newvalueX = width * pageX * -1 - 25; var newvalueY = height * pageY * -1 - 50; $('header').css("background-position", newvalueX+"px "+newvalueY+"px"); }); });