﻿/// <reference path="~/js/jquery-min.js" />
/// common functions / utils
/// Author: Shaun Latham

///PopUp dialog, can be used with GridView
///See DocumentManagement.aspx for ref

$(document).ready(function() {
    $('.buttonClass').click(function() {
        var id = ($(this).siblings('.dialogClass').attr('id'));
        $('#' + id).dialog({ autoOpen: false });
        $('#' + id).dialog('open');

        $.clipboardReady(function() {
        $("a").click(function() {
                        $.clipboard("You clicked on a link and copied this text!");
                return false;
            });
        });

    });

    $('#ctl00_ContentPlaceHolder1_chkMemberID').click(function() {
    if ($('#ctl00_ContentPlaceHolder1_chkMemberID').is(':checked')) {
            $('#ctl00_ContentPlaceHolder1_txtMemberID').removeAttr('disabled');           
        } else {
            $('#ctl00_ContentPlaceHolder1_txtMemberID').attr('disabled', true);           
        }
    });
});


 function mailMe(sDom, sUser){
  return("mail"+"to:"+sUser+"@"+sDom.replace(/%23/g,"."));
}
