jQuery(document).ready(function() {

    // IE6 transparent png fix, browser independent
    try {
        if (typeof (supersleight) != "undefined") {
            if ($.isFunction(supersleight.run)) {
                supersleight.run();
            }
        }
    } catch (e) { }

    // Hide & Show definition lists
    $('.toggle-a dl dd').hide();
    $('.toggle-a dl dt a').click(function() {
        if ($(this).parent().parent().attr("class") == "active") {
            $(this).parent().parent().removeClass("active");
            $(this).parent().parent().find('dd').hide(400);
        }
        else {
            $(this).parent().parent().addClass("active");
            $('.toggle-a dl.active dd').show(400);
        }
        return false;
    });

    // enable all toggle-switches (fade in/out effect)
    $(".toggle-switch").click(function() {
        var speed = 400; // fade in/out speed
        var active = "active"; // active state css class
        var togglee = "." + $(this).toggleClass(active).attr("rel");
        if ($(this).hasClass(active))
            $(togglee).fadeIn(speed);
        else
            $(togglee).fadeOut(speed);
    });

});


