var partners_cnt = 0; 
var posts_cnt = 0;
var animate_start = 0;
function partners_slide_left () {
	var new_left = (parseInt($("#prt-lst").css('left')) + ($(".partner-item").width() + 2))+'px';
	if ( !animate_start ) {
		animate_start = 1;
		$("#prt-lst").animate({ 'left': new_left }, "slow", 'swing', function(){
			if (parseInt($("#prt-lst").css('left')) >= 0 ) {
				$(".a-partner-left").hide();
			}
			if (parseInt($("#prt-lst").css('left')) >= -(partners_cnt-3)*($(".partner-item").width() + 2) ) {
				$(".a-partner-right").show();
			}
			animate_start = 0;
		});
	}
	return false;
}

function partners_slide_right () {
	var new_left = (parseInt($("#prt-lst").css('left')) - ($(".partner-item").width() + 2))+'px';
	if ( !animate_start ) {
		animate_start = 1;
		$("#prt-lst").animate({ 'left': new_left }, "slow", 'swing', function(){
				if (parseInt($("#prt-lst").css('left')) <= 0 ) {
						$(".a-partner-left").show();
				}
				if (parseInt($("#prt-lst").css('left')) <= -(partners_cnt-3)*($(".partner-item").width()) ) {
						$(".a-partner-right").hide();
				}
				animate_start = 0;
		});
	}
	return false;
}

function posts_slide_left () {
	var new_left = (parseInt($("#posts-lst").css('left')) + $(".post").width())+'px';
	if ( !animate_start ) {
		animate_start = 1;
		$("#posts-lst").animate({ 'left': new_left }, "slow", 'swing', function(){
			if (parseInt($("#posts-lst").css('left')) >= 0 ) {
				$(".a-posts-left").hide();
			}
			if (parseInt($("#posts-lst").css('left')) >= -(posts_cnt-1)*$(".post").width() ) {
				$(".a-posts-right").show();
			}
			animate_start = 0;
		});
	}
	return false;
}

function posts_slide_right () {
	var new_left = (parseInt($("#posts-lst").css('left')) - $(".post").width())+'px';
	if ( !animate_start ) {
		animate_start = 1;
		$("#posts-lst").animate({ 'left': new_left }, "slow", 'swing', function(){
				if (parseInt($("#posts-lst").css('left')) <= 0 ) {
						$(".a-posts-left").show();
				}
				if (parseInt($("#posts-lst").css('left')) <= -(posts_cnt-1)*$(".post").width() ) {
						$(".a-posts-right").hide();
				}
				animate_start = 0;
		});
	}
	return false;
}



