$(document).ready(function() {
if ($("#switcher_img")) {
	$("#switcher_img > ul > li").css("display", "none");
	$("#switcher_img > ul > li:eq(0)").css("display", "inline");
	$("#switcher_img > ul > li:eq(1)").css("display", "inline");
	$("#switcher_img > ul > li:eq(2)").css("display", "inline");
	
	var tli = $("#switcher_img > ul > li").size();
	var tlimin = 0;
	var tlimax = 2;
	var currentId = 0;
	
	if (tlimax == tli - 1) {
				$("#switcher_right").css("cursor", "default")
			}
	if (tlimin == 0) {
				$("#switcher_left").css("cursor", "default")
			}
	
    $("#switcher_right").click(function() {
		if (tlimax < tli - 1) {
			tlimin = tlimin + 1;
			tlimax = tlimax + 1;
			$("#switcher_img > ul > li:eq(" + (tlimin - 1) + ")").css("display", "none");
			$("#switcher_img > ul > li:eq(" + (tlimax) + ")").css("display", "inline");
			$("#switcher_left").css("cursor", "pointer")
			if (tlimax == tli - 1) {
				$("#switcher_right").css("cursor", "default")
			}
		}
	});
	$("#switcher_left").click(function() {
		if (tlimax > 2) {
			tlimin = tlimin - 1;
			tlimax = tlimax - 1;
			$("#switcher_img > ul > li:eq(" + (tlimax + 1) + ")").css("display", "none");
			$("#switcher_img > ul > li:eq(" + (tlimin) + ")").css("display", "inline");
			$("#switcher_right").css("cursor", "pointer")
			if (tlimin == 0) {
				$("#switcher_left").css("cursor", "default")
			}
		}
	});
	
	$("#featured_inside > div > div").hide();
	$("#featured_inside > div > div:eq(0)").show();
	$("#switcher_img > ul > li > img").click(function() {
	
	
		var theId = $('#switcher_img > ul > li > img').index(this);
		if (theId != currentId) {
			currentId = theId;
			$("#featured_inside > div > div").hide();
			$("#featured_inside > div > div:eq(" + theId + ")").fadeIn('slow');
		}
	
	});
}
});