$(function(){
/* Footer Report Card */
    if($("#footer > ul").length > 0){
     $.ajax({
       type: "GET",
       url: "/assets/ajax_pages/cs_report.html",
       success: function(html){
        $("#footer > ul").after(html);
        $(".btn-slide").click(function(){
            var currentDate = new Date()
            var months = ["January","February","March","April","May","June","July","August","September","October","November","December"]
            var month = currentDate.getMonth();
            var day = currentDate.getDate();
            var year = currentDate.getFullYear();
            var updatedDate = months[month] + " " + day + ", " + year;
            $("span.date","#cs-report").html(updatedDate);
            if( $("#cs-report").is(":hidden")){
                $("#footer-wrap").height(700);

            }
            $("#cs-report").slideToggle(1000, function(){
                if( $("#cs-report").is(":hidden")){
                    $("#footer-wrap").animate({height: "300px"}, "normal");
                }else{
                    $('html, body').animate({
                        scrollTop: $(".disclaimer")
                        .offset().top }, "normal");
                }
            });
            $(this).toggleClass("active");
            return false;
         });
        }
     });
    }
});