var Car = function() {
	this.init();
}

Car.prototype = {
	init: function(){

		IE='\v'=='v'

		this.positionStart = '-800px';
		this.positionEnd = '0px';
		this.deliveryContainer = $('#delivery');
		this.carContainer = $('#car_container');
		this.carImage = $('#car_container img');		
		this.carCircle1 = $('#circle_1');		
		this.carCircle2 = $('#circle_2');	
		this.breakRotation = false;

		if( !IE ) {
			this.circleRotate();
		}
		this.slideCar();		
		
	},
	
	circleRotate : function()
	{
		var self = this;		
		var rotation = function (){
			self.carCircle1.rotate({
			      angle:360, 
			      animateTo:0, 
			      callback: rotation,
			      easing: function (x,t,b,c,d){        // t: current time, b: begInnIng value, c: change In value, d: duration
			          return c*(t/d)+b;
			      }
			});
			self.carCircle2.rotate({
			      angle:360, 
			      animateTo:0, 
			      callback: rotation,
			      easing: function (x,t,b,c,d){        // t: current time, b: begInnIng value, c: change In value, d: duration
			          return c*(t/d)+b;
			      }
			});
		};
		rotation();
	},
	
	slideCar: function(){
		var self = this;
		this.deliveryContainer.animate({right: 0}, 3000, function(){
		});
	}
}
$(document).ready(function(){
	carr = new Car();
	$('#faq_container').show();
});

