$(function(){
	var $larr = $(".b-sponsors .arrow_left"),
		$rarr = $(".b-sponsors .arrow_right"),
		$ul = $(".b-sponsors ul"),
		
		animated = false;
	
	$rarr.click(function(e){
		var $first = $ul.find("li:first-child");
		
		if (!animated) {
			animated = true
			$first.animate({
				marginLeft: "-100px"
			}, 400, function(){
				$first.appendTo($ul).css({
					marginLeft: "0px"
				});
				animated = false;
			});
		}	
		return false;	
	});
	
	$larr.click(function(e){
		var $last = $ul.find("li:last-child");
		
		if (!animated) {
			animated = true;		
			$last.css({
				marginLeft: "-100px"
			}).prependTo($ul).animate({
				marginLeft: "0px"
			}, 400, function(){
				animated = false
			});
		};
		return false;		
	})

});


