// JavaScript Document
var fishsscrollSpeed = 35;       // Speed in milliseconds
var fishsstep = 1;               // How many pixels to move per step
var fishscurrent = 0;            // The current pixel row
var fishsimageWidth = 42;     // Background image height
var fishsheaderWidth = 2000;     // How tall the header is.

//The pixel row where to start a new loop 


function fishsscrollBg(){
var scrollTop = $(window).scrollTop();
//alert(scrollTop);

if((scrollTop < 2347) && (scrollTop > 955)) {
	var fishsrestartPosition = -(fishsimageWidth - fishsheaderWidth);   
    //Go to next pixel row.
    fishscurrent -= fishsstep;
//	alert(current);
   
    //If at the end of the image, then go to the top.
	
    if (fishscurrent > (fishsheaderWidth)){

        fishscurrent = 0-fishsimageWidth;
    }
   
    //Set the CSS of the header.
    $(elementId).css("background-position",fishscurrent+"px" + " 0");
   
   
}
}
//Calls the scrolling function repeatedly
var fishsinit = setInterval("fishsscrollBg(elementId = '#fishhome', fishsstep = 1, fishscrollSpeed = 35, fishsiamgeWidth=42, fishsheaderWidth=2000)", fishsscrollSpeed);


