﻿jQuery.preloadImages = function() {
    for (var i = 0; i < arguments.length; i++) {
        jQuery("<img>").attr("src", arguments[i]);
    }
}
$.preloadImages("/Images/bg_on.png");

var active_section = "";
jQuery(document).ready(function() {
    $('#accordion .section').click(function() {
        if ($(this).next().is(":hidden")) { $(this).addClass("on"); $(this).next().show("slide", { direction: "up" }, 500); }
        else { $(this).removeClass("on"); $(this).next().hide("slide", { direction: "up" }, 500); }
        return false;
    }).next().hide();
    if (active_section != "") {
        $('#accordion .' + active_section).addClass("on").next().show();
    }
});
