﻿


$(document).ready(function() {
    $("#PrintScreen").click(function(event) {
        print();
        return false;
    });
    $("#ShareTwitter").click(function(event) {
        twitter_click();
        return false;
    });
    $("#ShareFaceBook").click(function(event) {
        fbs_click();
        return false;
    });
    $("#ShareNettby").click(function(event) {
        nettby_link_share();
        return false;
    });

});

function fbs_click() {
    u = location.href;
    t = document.title;
    window.open('http://www.facebook.com/sharer.php?u=' + encodeURIComponent(u) + '&amp;t=' + encodeURIComponent(t), 'sharer', 'toolbar=0,status=0,width=626,height=436');
    return false;
}
function twitter_click() {
    u = location.href;
    t = document.title;
    window.open('http://twitter.com/home?status=' + encodeURIComponent(t + " via " + u), 'Twitter', '', '');
    return false;

}
function nettby_link_share() {
    var name = escape('heyerdahl-institute.no');
    var url = escape(location.href);
    var description = escape(document.title);
    wnd = window.open('http://www.nettby.no/user/edit_link.php?name=' + name + '&url=' + url + '&description=' + description, 'edit_link', 'scrollbars=no,width=450,height=430');
    wnd.focus();
}
