$(function() {
	
	'use strict';
	
	// 幻灯片效果
	$('.carousel').carousel({
		interval: 3000
	}).on('slide.bs.carousel', function (e) {
		var n = $(e.relatedTarget).attr('data-target');
		$('.x-carousel-number').text(n);
	});
	
	$('.carousel').swipe({
		swipe: function(event, direction) {
			if(direction == 'right') {
				$('.carousel').carousel('prev');
			} else {
				$('.carousel').carousel('next');
			}
		},
		threshold: 10
	});
	
});