
function getDateStr()
    {
        var today = new Date();
        var year = today.getYear();
        if(year<1000) year+=1900;
        //var todayStr = toFullMonth(today.getMonth()) + " " + today.getDate() + ", " + year;
        return year;
    }


$(document).ready(function(){
	
	var linkArr = $("#community #content ul li a");
	var numLinks = $("#community #content ul li a").length;
	
	$("#community #content ul li a").click(function () {
		
		var i = 0;
		
		for (i=0;i<numLinks;i++) {
			if (this == linkArr[i]) {
				i++;
				break;
			}
		}
		
		$("#community #content ul li a").removeClass("selected");
		$(this).addClass("selected");
		
		$(".photos").children("img").hide();
		$(".photos").css({'left' : '352px'}).children("img:eq("+i+")").fadeIn();
		
	});
	
	/*function showAnswer () {
		$(".answer").hide();
		$(this).next(".answer").show().children("p").fadeIn();
	}
	
	function hideAnswer () {
		$(this).next(".answer").hide().children("p").hide();
	}
	
	$("#faq #content ul li a").toggle(showAnswer, hideAnswer);*/
	
	$("#faq #content ul li a").click(function () {
		if ($(this).next(".answer").css("display") == 'block') {
			$(".answer, .answer p").hide();
			$("#faq #content ul li a").removeClass("selected");
		} else {
			$(".answer, .answer p").hide();
			$("#faq #content ul li a").removeClass("selected");
			$(this).addClass("selected");
			$(this).next(".answer").show().children(".infowrap").children(".info").children("p").fadeIn();
		}
	});
	
});
