﻿$(document).ready(function() {
    //Setup any dialog for the current page.  All dialog links and dialogs will
    //follow the convention used below.
    $('.dialog').dialog({
        bgiframe: true,
        height: 550,
        width: 850,
        modal: true,
        autoOpen: false,
        show: 'blind',
        hide: 'blind'
    });

    $(".dialog-link").click(function(e) {
        var dialogId = $(this).attr('targetDialog');
        $(".dialog[dialogId='" + dialogId + "']").dialog('open');
        return false;
    });

    //Setup the navigation menu    
    $('ul.menu > li:last').css("float", "right");

    //The last row of the side nav menu should not
    //have a bottom border.  However, the IE doesn't
    //support the last-child psuedo class selector
    //so we'll use JS to help out
    $('.side-menu > li:last').css('border-bottom', 'none');
    $('.menu').menu(function() { $('html').removeClass('hide-menu') });
});

//This will hide the navigation menu from view until it is setup to avoid flicker
$('html').addClass('hide-menu');