// JavaScript/jQuery source written by Cory Dorning
// Visit www.corydorning.com/blog/jquery-faqs-scroll-and-highlight-tutorial
// for original source code and tutorial

$(function() {
    $('.return-top').click(function() {
        return false;
    });
    
    $(".questions > li").click(function() {
        var qu = $(this).attr("id");
        var an = "#" + qu.replace("q","a");

        $.scrollTo(an, {
            duration: 800,
            axis:"y",
            onAfter:function(){
                $(an).effect("highlight", {
                    color: "#ddd"
                }, 2000);
            }
        });
    });
	
    $(".return-top").click(function() {
        $.scrollTo("body", {
            duration: 800,
            axis:"y"
        });
    });
});