$(document).ready(function() {
	//custom easing called "custom" 
	$.easing.custom = function (x, t, b, c, d) { 
	    var s = 1.70158;  
	    if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b; 
	    return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b; 
	};
	
	$(".items").reorder().animate({opacity:"1"}, {duration:1700});
	
	
	var api=$(".scrollable").scrollable({
			keyboard: false,
			size: 1,
			speed: 1350
			/*easing: "custom",
			api: true,
			clickable: false*/
			/*onReload: function() {
				seekTo(2);
			}*/
		}).circular()
		.autoscroll({
			steps: 1, 
			autopause: true, 
			autoplay: true, 
			interval: 15*1000
		}).navigator(".navi");

	/*var offset=api.getConf().size-1;
	
	api.onBeforeSeek(function(event, index){ 
		if ( index > this.getIndex() ){//forward
			this.getItems().eq(index+offset).css("opacity","0");//hide the incoming item on the right
		}else{
			if( index < this.getIndex() ){//backward
				this.getItems().eq(index).css("opacity","0");//hide the incoming item on the left
			}
		}
	});
	api.onSeek(function(event, index){
		//fade to visible all hidden items (i.e. the only one hidden)
		this.getVisibleItems().fadeTo(750,1);
	});*/
	$('.prev, .next').css('opacity','0.5').mouseover(function(){
		$(this).stop().animate({opacity:"1"}, {duration:200});
	})
	.mouseout(function(){
		$(this).stop().animate({opacity:"0.5"}, {duration:200});
	});

});


