var now = new Date();

//Start
$(window).load(function() {

    site.loadScripts();

    //console.log("total time: "+((new Date()).getTime() - now.getTime())+"ms");
});

var site = (function() {
	applySiteCommon();
	
    var that = this;
    var path = "/assets/js/mylibs/";
    var urls = {
        store: [
            path + "store.js"
        ],
    };

    /*
     * An array of current uri, separated by /
     */
    this.currentUrl = window.location.pathname.split('/').slice(-1);

    return {
        /*
         * Custom scripts to be loaded
         */
        loadScripts: function() {

            var url = urls[that.currentUrl]; 

            if (url === undefined)
            {
                head.js(path + "home.js"); // default
            }
            else
            {
                if (typeof url === 'string')
                {
                    head.js(url);
                }
                else
                {
                    head.js.apply(head, url);
                }
            }
        }
    };
})();

function applySiteCommon()
{

}
