﻿$(document).ready(function () {
    // Dialog			
    $('#offshore-dialog').dialog({
        autoOpen: false,
        width: 800,
        modal: true
    });

    $('#us-person-dialog').dialog({
        autoOpen: false,
        width: 800,
        modal: true,
        buttons: {
            "OK": function () {
                $(this).dialog("close");
            }
        }
    });

    $('#contact-us-dialog').dialog({
        autoOpen: false,
        width: 600,
        modal: true,
        buttons: {
            "OK": function () {
                $(this).dialog("close");
            }
        }
    });

    $('#rnt-natixis-contact-us-dialog').dialog({
        autoOpen: false,
        width: 600,
        modal: true,
        resizable: false,
        buttons: {
            "OK": function () {
                $(this).dialog("close");
            }
        }
    });

    // Dialog Link
    $('#offshore-dialog-link').click(function () {
        $('#offshore-dialog').dialog('open');
        return false;
    });

    $('#us-person-dialog-link').click(function () {
        $('#us-person-dialog').dialog('open');
        return false;
    });

    $('.contact-us-dialog-link').click(function () {
        $('#contact-us-dialog').dialog('open');
        return false;
    });

    $('.rnt-natixis-contact-us-dialog-link').click(function () {
        $('#rnt-natixis-contact-us-dialog').dialog('open');
        return false;
    });

    //$('#announcement').collapsiblePanel();

    //hover states on the static widgets
    $('ul#icons li').hover(
					function () { $(this).addClass('ui-state-hover'); },
					function () { $(this).removeClass('ui-state-hover'); }
				);

    $('input[type=submit]').button();

});

$(function () {
    //    $("#announcement").dialog({
    //        bgiframe: true,
    //        modal: true,
    //        resizable: false,
    //        autoOpen: false,
    //        height: 265,
    //        width: 400,
    //        close: function () {
    //            $.cookie("announcement", "closed");
    //        },
    //        buttons: {
    //            Ok: function () {
    //                $(this).dialog("close");
    //            }
    //        }
    //    });

});

//$(window).scroll(function () {
//    var pos = parseInt($(window).scrollTop()) + parseInt($(window).height());
//    $('#announcement').animate({
//        top: pos - $('#announcement').height() - 10 + "px"
//    },
//        {
//            queue: false, duration: 500
//        });
//});
