
jQuery.fn.autoscroll = function(selector) {
    $('html,body').animate(
        { scrollTop: $(selector).offset().top },
        500
    );
}
$(function() {
    $(".nav").superfish({
        animation: { opacity: "show", height: "show" }
    });
    


    $(".accordian li div").click(function() {
        //var theUl = $('ul', this);
        var theUl = $(this).parent().children('ul');

       // var idv = theUl.attr("id");
        //alert(idv);
        if (theUl.hasClass('closed')) {
            theUl.removeClass('closed').addClass('open').slideDown();
        } else {
            theUl.removeClass('open').addClass('closed').slideUp();
        }
    });
});
