require.config({
    paths: {
        jQuery: [
            'http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.0/jquery.min'
        ],
        underscore: [
            'http://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.6.0/underscore-min'
        ],
        handlebars: [
            'http://cdnjs.cloudflare.com/ajax/libs/handlebars.js/2.0.0-alpha.2/handlebars.min'
        ],
        kendo: 'libs/kendo',
        text: 'libs/require/text',
        async: 'libs/require/async',
        templates: 'templates'

    },
    shim: {
        'jQuery': {
            exports: '$'
        },
        'underscore': {
            exports: '_'
        },
        'handlebars': {
            exports: 'Handlebars'
        },
        "kendo": {
            deps: ["jQuery"]
        }
    }
});
require(['jQuery', 'handlebars', 'helpers/handlebarsHelper', 'kendo/kendo.notification', 'kendo/kendo.window'], function ($, Handlebars, hh) {

    hh.init();
    //console.log('jQuery version:', $.fn.jquery); // 1.9.0
    //_.each({one: 1, two: 2, three: 3}, function(model){console.log(model)});
    //var temp = Handlebars.compile(template);

    var context = {
        title: 'Hello',
        body: 'world!',
        people: [{
            firstName: "Yehuda",
            lastName: "Katz"
        }, {
            firstName: "Carl",
            lastName: "Lerche"
        }, {
            firstName: "Alan",
            lastName: "Johnson"
        }]
    };
	
	var context2 = {
        title: 'This is just a test',
        body: 'world!',
    };

    //$('#container').html(temp(context));
    //hh.test();

    var x = hh.getTemplate('test');
    $('#container2').html(x(context));
    var x = hh.getTemplate('window');
    //$('#container').html(x(context2));

    var popupNotification = $("#popupNotification").kendoNotification({
        position: {
            top: 20,
            right: 20
        }
    }).data("kendoNotification");

    window.setInterval(function () {
        var d = new Date();
        popupNotification.show(kendo.toString(d, 'HH:MM:ss.') + kendo.toString(d.getMilliseconds(), "000"), "error");
    }, 7000);

    $(x(context2)).kendoWindow({
        width: "500px",
        modal: true,
		draggable: false,
        resizable: false,
        actions: ["Close"],
        title: "About Josef Hoffmann",
        visible: false
    }).data("kendoWindow").center().open();

});