/// <reference path="typings\jquery\jquery.d.ts" />

function getCurrentTime(): string {

    var currentdate = new Date();
    return zeroPad(currentdate.getHours(),2) + ":"
        + zeroPad(currentdate.getMinutes(),2) + ":" + zeroPad(currentdate.getSeconds(),2);
   
}

function zeroPad(num, places) {
    var zero = places - num.toString().length + 1;
    return Array(+(zero > 0 && zero)).join("0") + num;
}

function log(text: string): void {
    $('#log').append(getCurrentTime() + ": " + text + "<br>");
    $('#log').css("background-color", "red");
    $('#log').css("color", "white");
}

function ausgabe(text: string): void {
 $('#content').append(text + "<br>");
}

function headline(text: string): void {
 $('#content').append("<h2>" + text + "<h2>");
}