function checkMoreScorlling( e, elem, $pane, $items, pos ) {
    var $prev = $('#prev');
    var $next = $('#next');
	//$prev.add($next).show();
	if( pos == 0 )
	{
		$prev.addClass("prevoff");
		$next.removeClass("nextoff");
	}
	else if( pos >= $items.length-2 )
	{
		$prev.removeClass("prevoff");
		$next.addClass("nextoff");
	}
	else{
		$prev.removeClass("prevoff");
		$next.removeClass("nextoff");
		//return false;
	}
/*
	var idx = parseInt(pos/2);
    for (var i=0;i<5;i++)
    {
        $("#page"+i).removeClass("selected");
    }
    $("#page"+idx).addClass("selected");

*/	
	return true;
}

function initSliding() {
    $('#sliding_body').serialScroll({
				items:'#cat_hl_223262 > span',
				prev:'#prev',
				next:'#next',
				onBefore:checkMoreScorlling,
				axis:'x',
				offset:0, //when scrolling to photo, stop (offset) before reaching it (from the left)
				start:0, //itemIndex of the items to be focused on
				step:2, //how many move for each click
				duration:600,
				force:true,
				cycle:false, //don't pull back once you reach the end
				//easing:'elasout', //use this easing equation for a funny effect
				jump: false, //click on the images to scroll to them
				exclude: 1
			});
}





