// bind a function to the window's scroll event, this will update
// the 'active' class every time the user scrolls the window
$(window).scroll(function() {
    // find the li with class 'active' and remove it
    //$(".header ol li a").removeClass("active");
	if($("#click_it").val()=="0") {
		$("#rem").attr("value", "1");
	}
	
    // get the amount the window has scrolled
    var scroll = $(window).scrollTop();
    // add the 'active' class to the correct li based on the scroll amount
    if (scroll <= 1350 && $("#rem").val()=="1") {
		$(".header ol li a").removeClass("active");
        $("#11").addClass("active");
		$("#rem").attr("value", "0");
    }
    else if (scroll <= 2950 && $("#rem").val()=="1") {
		$(".header ol li a").removeClass("active");
        $("#22").addClass("active");
		$("#rem").attr("value", "0");
    }
    else if (scroll <= 4400 && $("#rem").val()=="1") {
		$(".header ol li a").removeClass("active");
        $("#33").addClass("active");
		$("#rem").attr("value", "0");
    }
    else if (scroll <= 5900 && $("#rem").val()=="1") {
	$(".header ol li a").removeClass("active");
        $("#44").addClass("active");
    }	
    else if($("#rem").val()=="1") {
	$(".header ol li a").removeClass("active");
        $("#55").addClass("active");
		$("#rem").attr("value", "0");
    }
});
