$(document).ready(function(){

	/* 
	 * FAQ : answers toggle
	 *
	 */
    var anchor = $(document).attr('location').hash;



	if ($("#faq .faq li").length) {  	 

		$('#faq .faq li').find(":nth-child(2)").toggle();	 
	 
		$('#faq .faq li').hover(function(){ // on rollover
			$(this).toggleClass("highlight-answer")
		},function(){ // on rollout
			$(this).toggleClass("highlight-answer")	
		});

        if (anchor!='') {
		
            $('#faq .faq li'+anchor).toggleClass("answered")
				.find(":nth-child(2)")
				.toggle();						
        }

		$('#faq .faq li').click( function() {
			$(this).toggleClass("answered")
				.find(":nth-child(2)")
				.toggle();						
		 });
        
        $(".sidebar a").click( function() {

            var url=$(this).attr('href');
            var anchor = url.substring(url.indexOf("#"));
            
            $('#faq .faq li'+anchor).toggleClass("answered")
				.find(":nth-child(2)")
				.toggle();						          

        });
	}

});




