﻿$(document).ready(function() {
    // initial hide of sub bullets
    $('tr:not(.titleBar)').hide(1, function() { IEredraw() });

    // add individual close open function
    $('th.title').click(function() {
        var elem = $(this).parent().siblings('.subs')[0];
        if (elem.style.display == 'none') {
            $(this).parent().siblings('.subs').show();
            $(this).addClass('titleOpen');
        }
        else {
            $(this).parent().siblings('.subs').hide();
            $(this).removeClass('titleOpen');
        }
        IEredraw();
    });

    // add open all functionality
    $('#openAll').click(function() {
        $('.features-list tr:not(.titleBar)').show();
        $('.features-list .titleBar .title').addClass('titleOpen');
        IEredraw();
    });

    // add close all functionality
    $('#closeAll').click(function() {
        $('.features-list tr:not(.titleBar)').hide();
        $('.features-list .titleBar .title').removeClass('titleOpen');
        IEredraw();
    });
})

function IEredraw() {
    //if ($.browser.msie) { curvyCorners.redraw() }
}