/* animation.js */

var scrollSpeed1 = 90; // Speed in milliseconds
var scrollSpeed2 = 65;
var scrollSpeed3 = 30;
var scrollSpeed4 = 60;
var scrollSpeed5 = 60;
var scrollSpeed6 = 60;
var scrollSpeed7 = 60;
var step = 1;               // How many pixels to move per step
var current = 0; // The current pixel row
var current2 = 0;
var current3 = 0;
var current4 = 0;
var current5 = 0;
var current6 = 0;
var current7 = 0;
var imageWidth = 1600;     // Background image width
   

function scrollBg1(){
    
    
    current -= step; //Go to next pixel row.
    
    $('#layer').css("background-position",+current+"px 0"); //Set the CSS of the header.

}
    
var init = setInterval("scrollBg1()", scrollSpeed1);  //Calls the scrolling function repeatedly




//Layer 2 
function scrollBg2(){
    
    
    current2 -= step; //Go to next pixel row.
    
    $('#layer2').css("background-position",+current2+"px 0"); //Set the CSS of the header.
    
}

var init = setInterval("scrollBg2()", scrollSpeed2);    //Calls the scrolling function repeatedly

//Layer 3 
function scrollBg3(){
    
    
    current3 -= step; //Go to next pixel row.
    
    $('#layer3').css("background-position",+current3+"px 0"); //Set the CSS of the header.
    
}

var init = setInterval("scrollBg3()", scrollSpeed3);    //Calls the scrolling function repeatedly




