// JavaScript Document

$(document).ready(function () {
	
	var curr_page = 1;
	$(".pager_content").hide();
	$("#pager_content_" + curr_page).show();
	//$("#image_pager_btns").stop().animate({backgroundPosition:'132px bottom'},{queue:false, duration:200});
	
	$("#page1").click(function () {
		$("#image_pager_mover").stop().animate({left:'0'},{queue:false, duration:200});
		$("#image_pager_btns").stop().animate({backgroundPosition:'140px bottom'},{queue:false, duration:200});
		//$("#image_pager_btns").stop().animate({backgroundPosition:'132px bottom'},{queue:false, duration:200});
		curr_page = 1;
		$("#page_prev").addClass("disabled");
		$("#page_next").removeClass("disabled");
		$(".pager_content").hide();
		$("#pager_content_1").show();
	});
	$("#page2").click(function () {
		$("#image_pager_mover").stop().animate({left:'-325px'},{queue:false, duration:200});
		$("#image_pager_btns").stop().animate({backgroundPosition:'163px bottom'},{queue:false, duration:200});
		//$("#image_pager_btns").stop().animate({backgroundPosition:'153px bottom'},{queue:false, duration:200});
		curr_page = 2;
		$("#page_prev").removeClass("disabled");
		$("#page_next").removeClass("disabled");
		$(".pager_content").hide();
		$("#pager_content_2").show();
	});
	$("#page3").click(function () {
		$("#image_pager_mover").stop().animate({left:'-650px'},{queue:false, duration:200});
		$("#image_pager_btns").stop().animate({backgroundPosition:'186px bottom'},{queue:false, duration:200});
		//$("#image_pager_btns").stop().animate({backgroundPosition:'176px bottom'},{queue:false, duration:200});
		curr_page = 3;
		$("#page_prev").removeClass("disabled");
		$("#page_next").addClass("disabled");
		$(".pager_content").hide();
		$("#pager_content_3").show();
		
	});
	$("#page_prev").click(function () {
		if (curr_page == 2) {
			$("#page1").click();
		} else if (curr_page == 3) {
			$("#page2").click();
		}
	});
	$("#page_next").click(function () {
		if (curr_page == 1) {
			$("#page2").click();
		} else if (curr_page == 2) {
			$("#page3").click();
		}
		
	});
	
});