$(document).ready(function() {
	$(".uniform").uniform();
	function newsCallback(carousel) {
	    $(".newsPrev").bind('click', function() {
	        carousel.prev();
	        return false;
	    });
	    $(".newsNext").bind('click', function() {
	        carousel.next();
	        return false;
	    });
	};
	$("#News ul").jcarousel({
		visible: 4,
		scroll: 4,
		buttonNextHTML: 'null',
		buttonPrevHTML: 'null',
		initCallback: newsCallback
	});
	function promotionCallback(carousel) {
		$(".promotionControl a").bind('click', function() {
			carousel.scroll($.jcarousel.intval($(this).text()));
			return false;
		});
	    $(".promotionPrev").bind('click', function() {
	        carousel.prev();
	        return false;
	    });
	    $(".promotionNext").bind('click', function() {
	        carousel.next();
	        return false;
	    });
	    carousel.clip.hover(function() {
	    	carousel.stopAuto();
	    }, function() {
	    	carousel.startAuto();
	    });
	};
	function promotionFirstInCallback(carousel, item, idx, state) {
		$(".promotionControl a.active").removeClass("active");
		$(".promotionControl a").eq(idx-1).addClass("active");
	}
	$("#Promotion ul").jcarousel({
		visible: 1,
		scroll: 1,
		auto: 6,
		wrap: 'last',
		buttonNextHTML: 'null',
		buttonPrevHTML: 'null',
		initCallback: promotionCallback,
		itemFirstInCallback: promotionFirstInCallback
	});
});
