function shakeHands(to) {
    $.ajax({
        type: "POST",
        url: "/accounts/shakeHands",
        data: "to=" + to,
        success: function(msg){
            $("#shake_hands").hide();
            if(msg == "error") {
                /*$.fancybox('Whoops! There was an error trying to shake hands with this user.', { 'transitionIn': 'elastic', 'transitionOut': 'fade' });*/
                document.getElementById('shakediv').innerHTML = '<p>ERROR EA44E4</p>';
                
            }
            else {
                /*$.fancybox('Handshake Request Sent!', { 'transitionIn': 'elastic', 'transitionOut': 'fade' });*/
                /*<a href="#" onclick="shakeHands(2);" id="shake_hands">Shake Hands</a>*/
                document.getElementById('shakediv').innerHTML = '<p>Request Sent</p>';
            }

            setTimeout(function() { $.fancybox.close(); }, 3000);
        }
    });
}
