$(document).ready(function(){

    $('a.legals').click(function(){
        openLegal();
        return false;
    });

});

function openPopUp(provider) 
{
    var local = '';

    if (provider == 'outlook')
        local = '-local';    

    $('#import-contact').attr('src', '../php/email/get'+local+'.php?provider='+provider);
    $('#import-contact').show();
}

function uploadEmails(emails) 
{    
    document.getElementById('greetings').uploadEmails(emails);
    $('#import-contact').hide();
    $('#import-contact').attr('src', '../php/email/get.php');
}

function addEmail(email) 
{    
    document.getElementById('greetings').addEmail(email);
}

function openLegal() {
	popin_win = window.open("./inc/legals.php","newfen","width=748, height=378, scrollbars=yes");
	popin_win.focus();
}

function shareFacebook(src,title)
{
	window.open("http://www.facebook.com/sharer.php?u="+encodeURIComponent(src)+"&t="+encodeURIComponent(title),"_blank")
}

function shareTwitter(msg)
{
	window.open("http://twitter.com/home?status="+encodeURIComponent(msg),"_blank")
}
