var windowFeatures = "location=yes,height=570,width=520,scrollbars=yes,status=yes";


function addListeners() {
    console.log('clicks');
    $("#sign").click(sign);
    $("#verify").click(verify);
    $("#getCerts").click(getCerts);
}

function sign() {
    console.log('Sign');
    // získa url k window priečinku
    fullURL = browser.extension.getURL("window") + "/sign/index.html";
    console.log(fullURL);
    window.open(fullURL, "Sign",windowFeatures);
    window.close();
}

function verify() {
    console.log('Verify');
    // získa url k window priečinku
    fullURL = browser.extension.getURL("window") + "/verify/index.html";
    console.log(fullURL);
    window.open(fullURL, "Verify",windowFeatures);
    window.close();
}

function getCerts() {
    console.log('GetCerts');
    // získa url k window priečinku
    fullURL = browser.extension.getURL("window") + "/certs/index.html";
    console.log(fullURL);
    window.open(fullURL, "Certificates",windowFeatures);
    window.close();
}
//zaklad s programovanim s jquery
//chceme, aby náš skript bežal až po načitaný celej stránky
$( document ).ready(function() {
    console.log( "ready!" );
    console.log(jQuery);
    addListeners();
});
