﻿$(document).ready(function() {

    //Make corners round
    $('.contentBlock.left').corner();
    $('.contentBlock.middle').corner();
    $('.contentBlock.main').corner();
    $('.contentBlock.right').corner();
    $('.contentBlock.helpcontent').corner();
    
    // Remove the class 'nojs' from the <body> tag.  This allows for css
    // based alternatives when js isn't enabled.
    $("body:first").removeClass("nojs");

    //handle scrolling on schedule
    var $panel = $("#schedulePanel");

    // Scroll a page at a time.
    $("#scrollContentUp").click(function() {
        $panel.scrollTo("-=" + $panel.height()/2 + "px", 1000);
    });

    $("#scrollContentDown").click(function() {
        $panel.scrollTo("+=" + $panel.height()/2 + "px", 1000);
    });

    $("#scrollContentUp").hover(
        function() { $(this).addClass('hover'); },
        function() { $(this).removeClass('hover'); }
    );

    $("#scrollContentDown").hover(
        function() { $(this).addClass('hover'); },
        function() { $(this).removeClass('hover'); }
    );
    

    $(".expander .expanderIcon").click(function() {
        $(this).parent().toggleClass("expanded");
    });

});
