var $ = jQuery.noConflict();

jQuery(function($){
	
		// Variables
		var windowHeight = $(window).outerHeight();
		var windowWidth = $(window).outerWidth();
		
	
		// Parallax effect on scroll...
		$(window).scroll(function () {
			s = $(window).scrollTop();
			$("#slider").css("background-position","center " +  (s/2)  + "px");
		});
		

		// Parallax effect on scroll...
		$(window).scroll(function() {
			var offset = $("#examples").offset().top;
			if ($(window).scrollTop() > offset-windowHeight) {
				s = $(window).scrollTop()-offset;
				$(".illustration").css("background-position","center " +  (s/2)  + "px");
			}
		});
		
		$('.anchorLink').click(function() {
			var href = $.attr(this, 'href');
			$('html,body').delay(300).animate({scrollTop: $(href).offset().top }, { duration: 1400, easing: 'easeInOutExpo', complete:function(){
				window.location.hash = href;
			}});
			return false;
		});

});