$(window).scroll(function(e) {
	
	/* -------------- parallax scroll ---------------- */	
	
	
	
	var delay = 0;
	var bg_speed = 0.8;
	var object_speed = 0.5; 
	var object_speed2 = 1.2; 
	var object_speed3 = 1.5;
	var object_speed4 = 0.3;
	var object_speed5 = 0.6;
	var object_speed6 = 0.4;
	
	var container_offset = -300;
	
	var scroll_position = $(window).scrollTop();
	
	$("#main-content").stop().animate({ top : 0 - scroll_position}, delay);
	
	
	if (scroll_position >= 0 && scroll_position <= 1280) {
		$("#section1_back").stop().animate({ top: container_offset - (-300 * bg_speed) + (scroll_position * bg_speed)}, delay);
		$("#section1_top").stop().animate({ top : (1300 * object_speed) + (scroll_position * object_speed)}, delay);
		$("#section1_line1").stop().animate({ top : (100 * object_speed2) + (scroll_position * object_speed2)}, delay);
		$("#section1_line2").stop().animate({ top : (100 * object_speed3) + (scroll_position * object_speed3)}, delay);
	}
	
	if (scroll_position >= 0 && scroll_position <= 2400) {
		$("#section2_back").stop().animate({ top: container_offset - (1000 * bg_speed) + (scroll_position * bg_speed)}, delay);
		$("#section2_top").stop().animate({ top : (-800 * object_speed * 1.8) + (scroll_position * object_speed)}, delay);	
		$("#section2_text").stop().animate({ top : (-100 * object_speed4 * 1.8) + (scroll_position * object_speed4)}, delay);	
		$("#section2_text2").stop().animate({ top : (-200 * object_speed5 * 1.8) + (scroll_position * object_speed5)}, delay);	
		$("#section2_text3").stop().animate({ top : (-400 * object_speed * 1.8) + (scroll_position * object_speed)}, delay);
		$("#section2_text3").stop().animate({ right : (-900 * object_speed * 1.8) + (scroll_position * object_speed)}, delay);
	}	
		
	if (scroll_position >= 1200 && scroll_position <= 3600) {
		$("#section3_back").stop().animate({ top: container_offset - (2050 * bg_speed) + (scroll_position * bg_speed)}, delay);
	}	
	
	if (scroll_position >= 2400 && scroll_position <= 4800) {
		$("#section4_back").stop().animate({ top: container_offset - (3400 * bg_speed) + (scroll_position * bg_speed)}, delay);
		$("#section4_back1").stop().animate({ top : (-3900 * object_speed2) + (scroll_position * object_speed2)}, delay);
		$("#section4_back2").stop().animate({ right : (-2000 * object_speed * 1.8) + (scroll_position * object_speed)}, delay);
		$("#section4_back2").stop().animate({ top : (-2000 * object_speed * 1.8) + (scroll_position * object_speed)}, delay);
		$("#section4_back3").stop().animate({ top : (-2300 * object_speed4) + (scroll_position * object_speed4)}, delay);
		$("#section4_back4").stop().animate({ top : (-2500 * object_speed5) + (scroll_position * object_speed5)}, delay);
		$("#section4_back5").stop().animate({ top : (-3200 * object_speed5) + (scroll_position * object_speed5)}, delay);
	}	

	if (scroll_position >= 3782 && scroll_position <= 6000) {
		$("#section5_back").stop().animate({ top: container_offset - (4500 * bg_speed) + (scroll_position * bg_speed)}, delay);
		$("#section5_back1").stop().animate({ top : (-4600 * object_speed2) + (scroll_position * object_speed2)}, delay);
		$("#section5_back2").stop().animate({ left : (-2700 * object_speed * 1.8) + (scroll_position * object_speed)}, delay);
		$("#section5_back2").stop().animate({ top : (-4600 * object_speed3) + (scroll_position * object_speed3)}, delay);
		$("#section5_back3").stop().animate({ left : (-2522 * object_speed * 1.8) + (scroll_position * object_speed)}, delay);
		$("#section5_back3").stop().animate({ top : (-4460 * object_speed3) + (scroll_position * object_speed3)}, delay);
		$("#section5_back4").stop().animate({ top : (-4700 * object_speed3) + (scroll_position * object_speed3)}, delay);
		$("#section5_back4").stop().animate({ right : (-2800 * object_speed * 1.8) + (scroll_position * object_speed)}, delay);
		$("#section5_blurb").stop().animate({ top : (-4580 * object_speed3) + (scroll_position * object_speed3)}, delay);
		$("#section5_blurb").stop().animate({ right : (-2650 * object_speed * 1.8) + (scroll_position * object_speed)}, delay);
		$("#section5_back5").stop().animate({ right : (-1700 * object_speed * 1.8) + (scroll_position * object_speed)}, delay);
		$("#section5_back6").stop().animate({ left : (-2300 * object_speed * 1.8) + (scroll_position * object_speed)}, delay);
	}	

	if (scroll_position >= 4800 && scroll_position <= 7200) {
		$("#section6_back").stop().animate({ top: container_offset - (5700 * bg_speed) + (scroll_position * bg_speed)}, delay);
		$("#section6_back1").stop().animate({ top : (-6200 * object_speed2) + (scroll_position * object_speed2)}, delay);
		$("#section6_back2").stop().animate({ top : (-3000 * object_speed * 1.8) + (scroll_position * object_speed)}, delay);
		$("#section6_back3").stop().animate({ top : (-2700 * object_speed * 1.8) + (scroll_position * object_speed)}, delay);
		$("#section6_back3").stop().animate({ right : (-6200 * object_speed) + (scroll_position * object_speed)}, delay);
		$("#section6_back4").stop().animate({ top : (-3100 * object_speed5 * 1.8) + (scroll_position * object_speed5)}, delay);
	}	




	if (scroll_position >= 6182 && scroll_position <= 8800) {
		$("#section7_back").stop().animate({ top: container_offset - (6900 * bg_speed) + (scroll_position * bg_speed)}, delay);
		$("#section7_back1").stop().animate({ bottom : (-7700 * object_speed2) + (scroll_position * object_speed2)}, delay);
	}	

});
	
	
	


	/*$("#section3_top").stop().animate({ left : (-1200 * object_speed * 2.5) + (scroll_position * object_speed)}, delay);
		$("#section3_top").stop().animate({ top : (-2500 * object_speed * 0.5) + (scroll_position * object_speed)}, delay);
		$("#section3_top2").stop().animate({ top : (-8000 * object_speed * 0.2) + (scroll_position * object_speed)}, delay);
		$("#section3_top2").stop().animate({ right : (-1200 * object_speed * 2.5) + (scroll_position * object_speed)}, delay);	*/

	

