﻿(function($) {
    $.fn.jSlideToggle = function() {
        var object = this;
        $(".text_link").click(function(){
            var ID = $(this).attr("href");
            var title ="#"+$(this).attr("title");
            if(title==ID){
                $("html, body").animate({ scrollTop: $(ID).offset().top }, "slow");
            }else{
                $(this).parents("div.hide").slideUp(function(){
                    $(ID).next().slideDown(function(){
                        $("html, body").animate({ scrollTop: $(ID).offset().top }, "slow");
                    });
                });
                
            }
        })
        $(object).children("div.bullet1").click(function() {
            var index = $(object).children("div.bullet1").index(this);
            $(object).children("div:odd:not(':eq(" + index + ")')").slideUp();
            $(this).next().slideToggle(function(){
              $("html, body").animate({ scrollTop: $(this).offset().top - 36}, "slow");
            });
        });
        
    };
})(jQuery);

/*
(function($){
    $.fn.jSlideToggle = function(){
        some code here;
    }
})(jQuery);
*/