var $ = jQuery.noConflict();

jQuery.easing['jswing'] = jQuery.easing['swing'];

jQuery.extend( jQuery.easing,
{
	def: 'easeOutQuad',
	easeOutBounce: function (x, t, b, c, d) {
		if ((t/=d) < (1/2.75)) {
			return c*(7.5625*t*t) + b;
		} else if (t < (2/2.75)) {
			return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b;
		} else if (t < (2.5/2.75)) {
			return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b;
		} else {
			return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b;
		}
	}
});



$.event.add(window, "resize", adapte_foot);



function adapte_foot() {
	var t = 160;
	var h = $(window).height();
	var d = t+$('div#pied_axome').position().top;
	if( d<h ) {
		$('div#pied_axome').css('height', 130+(h-d)+'px');
	}
}


	var scrollSpeed = 50;
	var step = 1;
	var current = 0;
	var imageWidth = 1400;
	var headerWidth = 713;		

	var restartPosition = -(imageWidth - headerWidth);

	function scrollBg(){
		current -= step;
		if (current == restartPosition){
			current = 0;
		}

		$('body').css("background-position",current+"px 0");
	}

	var init = setInterval("scrollBg()", scrollSpeed);

