$(document).ready(function() {
    //accordion on home page
    $('.accordion1').hSlides({
        totalWidth: 905,
        totalHeight: 340,
        minPanelWidth: 77,
        maxPanelWidth: 597,
        easing: 'swing',
        eventHandler: 'click',
        activeClass: 'activate' //equals the div class name that you want open by default
    });

    //tabs on about page
    var tabContainers = $('div#tabs > div');
    $('div#tabs ul.tabNav li a').click(function() {
        tabContainers.hide().filter(this.hash).show();
        $('div#tabs ul.tabNav li a').removeClass('selected');
        $(this).addClass('selected');
        return false;
    }).filter(':first').click();


    //expanding charts on services page
    $("#trqDirect").hide(); //DesktopDirect price table
    $("a.DesktopDirect").toggle(function() {
        $("#trqDirect").animate({ height: 'hide', opacity: 'hide' }, 'slow');
    }, function() {
        $("#trqDirect").animate({ height: 'show', opacity: 'show' }, 'slow');
    });
    $("#SystemsDirect").hide(); //SystemsDirect price table
    $("a.SystemsDirect").toggle(function() {
        $("#SystemsDirect").animate({ height: 'hide', opacity: 'hide' }, 'slow');
    }, function() {
        $("#SystemsDirect").animate({ height: 'show', opacity: 'show' }, 'slow');
    });
    $("#NetworkDirect").hide(); //SystemsDirect price table
    $("a.NetworkDirect").toggle(function() {
        $("#NetworkDirect").animate({ height: 'hide', opacity: 'hide' }, 'slow');
    }, function() {
        $("#NetworkDirect").animate({ height: 'show', opacity: 'show' }, 'slow');
    });

    //jFlow
    $(function() {
        $("#controller").jFlow({ 
            slides: "#slides", //div id of content of slides
            selectedWrapper: "jFlowSelected", //selected tab style
            width: "1023px",
            height: "700px",
            duration: 400
        });
    });
    
});