﻿$(function(){
	var jqCounter = 0;
	var jqWidth = parseInt($("#jqAS").css("width"));
	var jqHeight = parseInt($("#jqAS").css("height"));
	$(".jqASprev").click(function(){
		if (jqCounter > 0) {
			jqCounter--;
			$("#jqAS .contentArea").animate({ left:-jqCounter*jqWidth+"px" });
			$("#jqASpages").html((jqCounter+1)+"/"+$("#jqAS .content").length);
		}
	});
	$(".jqASnext").click(function(){
		if (jqCounter < ($("#jqAS .content").length-1)) {
			jqCounter++;
			$("#jqAS .contentArea").animate({ left:-jqCounter*jqWidth+"px" });
			$("#jqASpages").html((jqCounter+1)+"/"+$("#jqAS .content").length);
		}
	});
	$("#jqAS .content").each(function(idx, obj){
		obj.style.position = "absolute";
		obj.style.left = idx * jqWidth + "px";
		obj.style.width = jqWidth + "px";
		obj.style.height = jqHeight + "px";
		obj.style.overflow ="hidden";
	});
	$("#jqASpages").html("1/"+$("#jqAS .content").length);
});


function sliding(i){
jqCounter = i;
var jqWidth = parseInt($("#jqAS").css("width"));
var jqHeight = parseInt($("#jqAS").css("height"));
$("#jqAS .contentArea").animate({ left:-jqCounter*jqWidth+"px" });
//$("#jqASpages").html((jqCounter+1)+"/"+$("#jqAS .content").length);
}

