$(document).ready(function() {
	/*$(".prev-barker").addClass("disabled");*/
	var root = $("#barker-wrapper").scrollable({size: 2, circular:true, speed:1500}).autoscroll({autoplay: true, interval: 4500, autopause: true, api:true});
	
	/*$('.scrolling-barker').eq(1).css('border-right', '1px solid #ccc');
		root.onSeek(function() {
			
			var currentIndex2 = this.getIndex();
			
			if(currentIndex2 == 0)
			{
				
				$('.scrolling-barker').eq(1).css('border-right', '1px solid #ccc');
				$('.scrolling-barker').eq(5).css('border-right', 'none');
			}
			
			if(currentIndex2 == 1)
			{
				
				$('.scrolling-barker').eq(2).css('border-right', '1px solid #ccc');
				$('.scrolling-barker').eq(1).css('border-right', 'none');
			}
			
			if(currentIndex2 == 2)
			{

				$('.scrolling-barker').eq(3).css('border-right', '1px solid #ccc');
				$('.scrolling-barker').eq(2).css('border-right', 'none');
			}

			if(currentIndex2 == 3)
			{

				$('.scrolling-barker').eq(4).css('border-right', '1px solid #ccc');
				$('.scrolling-barker').eq(3).css('border-right', 'none');	
			}

			if(currentIndex2 == 4)
			{

				$('.scrolling-barker').eq(5).css('border-right', '1px solid #ccc');
				$('.scrolling-barker').eq(4).css('border-right', 'none');
			}

		
	});*/
	
	$(".next-barker").click(function(){
			root.stop();
			root.move(1);
			var currentIndex = root.getIndex();
			var totalItems = root.getSize();
			var totalIndexs = totalItems-1;
			/*if(currentIndex > 0){

				$(".prev-barker").removeClass("disabled");
			}
			if(totalIndexs == currentIndex ){

				$(".next-barker").addClass("disabled");
		
			}*/
			


	});

		$(".prev-barker").click(function(){
			root.stop();
			root.move(-1);
			var currentIndex = root.getIndex();
			var totalItems = root.getSize();
			var totalIndexs = totalItems-1;
			/*if(currentIndex == 0){
				$(".prev-barker").addClass("disabled");

			}
			if(totalIndexs > currentIndex ){

				$(".next-barker").removeClass("disabled");
		
			}*/


	});



});
