// JavaScript Document

$(document).ready(function(){ 

	// Set the active tab
	$("#tab-nav-faqs").addClass("ui-tabs-selected")

	// Populate the dynamic content
	$("#faq-list > li > div.content").hide();
	$("#faq-list > li > a").click( function () {
		var eCurrent = $(this).parent();
		var sCurrentId = eCurrent.attr("id");
		$("#faq-list > li").each(function(i) {
			$(this).removeClass("active");
			if ($(this).attr("id") != sCurrentId) {
				$(this).find("div.content").hide();
			}
		});
		eCurrent.find("div.content").show();
		eCurrent.addClass("active");
		return false;
	})

});
