$(function(){

	$("a").focus(function() {
		this.blur();
	}); 
	$("div").focus(function() {
		this.blur();
	}); 
	$("area").focus(function() {
		this.blur();
	}); 

	/*********************************/
	var slideCount = 0;
	var imgCounts = 4;
	var slideWidth = 676;

	$(".li_arrow img").eq(0).click( function () {
		if (slideCount == 0){
			$(".li_slide div").css("left", -slideWidth*imgCounts);
			slideCount = imgCounts;
		}
		$(".li_slide div").animate({
			left: '+=' + slideWidth
		}, 300, function () {
			--slideCount;
			if (slideCount == 0){
				$(".li_slide div").css("left", -slideWidth*imgCounts);
				slideCount = imgCounts;
			}
		});  
	});

	$(".li_arrow img").eq(1).click( function () {
		if (slideCount >= imgCounts){
			$(".li_slide div").css("left", 0);
			slideCount = 0;
		}
		$(".li_slide div").animate({
			left: '-=' + slideWidth
		}, 300, function () {
			++slideCount;
			if (slideCount >= imgCounts){
				$(this).css("left", 0);
				slideCount = 0;
			}
		}); 
	});

	function split(){
		$(".li_arrow img").eq(1).click();
	}

	window.setInterval (split, 5000);

	/*********************************/
	$("#btn_sh").click( function () {
		$(".beijing").css("display", "none");
		$(".shanghai").css("display", "block");
	});

	$("#btn_bj").click( function () {
		$(".shanghai").css("display", "none");
		$(".beijing").css("display", "block");
	});

});
