//records page table expanding bar
function initializeRecordsAnim() {
    $(document).ready(function(){  
        $(".type_wrap_header").bind("click", function(e) {
            var link = this.getAttribute("link"); 
            var bar = "#" + link + "_wrap";
            var button = "#" + link + "_wrap_arrow";
            var disp = $("#" + link + "_wrap").css("display");
            
            if (disp.toLowerCase() == "block") {               
                $(button).removeClass("type_wrap_arrow_opened");
                $(bar).slideUp("slow", function() { });
                $(this).removeClass("header_opened");                               
            } else {
                $(button).addClass("type_wrap_arrow_opened");            
                $(bar).slideDown("slow", function() { });
                $(this).addClass("header_opened");            
            }
            setHeight();
        });    
    });
}

function setRecordsTertiary() {
  var tertiary = $('#cricket_tertiary > div');
  var urlpath = window.location.pathname;
  
  try {
    if (urlpath == '/cricket/records.aspx')
        tertiary.find('#statsrecords_test').removeAttr('href').css('font-weight', 'normal').css('color', '#999999').css('text-decoration', 'none');
    else if (urlpath == '/cricket/records-odi.aspx')
        tertiary.find('#statsrecords_odi').removeAttr('href').css('font-weight', 'normal').css('color', '#999999').css('text-decoration', 'none');
    else if (urlpath == '/cricket/records-twenty20.aspx')
        tertiary.find('#statsrecords_twenty').removeAttr('href').css('font-weight', 'normal').css('color', '#999999').css('text-decoration', 'none');
  }
  catch (ex) { }

}