//function showAns(id) {
//     
//	 //alert(id)
//	 //hide all
//	 $(".divAns").hide("fast");
//	 $(".faq div.oneItm").removeClass("activeFaq");
//	 
//	 if ($("#_" + id).css("display") == "block") {
//        $("#_" + id).hide("fast");
//      } else if ($("#_" + id).css("display") == "none") {
//          $("#_" + id).show("fast");
//		  $("#faq_" + id).addClass("activeFaq");
//          //currId = id;
//      }
//  }

function animateImgsInDiv(loaderDiv, animateDiv, preLoader, imgWrapper, hideClassName){
	var pathArr = new Array();
	var imgArr = new Array();
	var imgs;
	//var result;
	try{

		$("#" + loaderDiv +"  " + imgWrapper).not("." + hideClassName).each(function(){
			pathArr.push($(this).html());
		})
		
		$("#" + loaderDiv + " img").each(function(){
			imgArr.push($(this).attr("src"));
		})
		
		imgs = "[\'" + imgArr.join("\', \'") + "\']";	
		
		//preload the images
		//append to div and cycle
		$("#" + loaderDiv).imageLoader({
		   images: eval(imgs)
		}, function(){
			$("." + preLoader).hide("fast", function(){
				$("#" + animateDiv).append(pathArr.join(" "));
				$("#" + animateDiv).cycle({
					delay:  2000, 
					speed:  500
				});
			});
		});
		//result = 1; //imgArr
	}catch(err){
		console.log(err.description)
	}
	//return result;
}


function showAns(id) {

    //alert(id)
    //hide all
    $(".divAns").hide("fast");
    $(".faq div.listItem").removeClass("activeFaq");

    if ($("#_" + id).css("display") == "block") {
        $("#_" + id).hide("fast");
    } else if ($("#_" + id).css("display") == "none") {
        $("#_" + id).show("fast");
        $("#FAQQuestion" + id).addClass("activeFaq");
    }
}

$(document).ready(function () {
    $(".faq a.title, .dbFaq a.green2").click(function () {
        showAns($(this).attr("id"))
        return false;
    });
})
