function validateIfAllLoaded(resolve) {
        var allLoaded = true;
        for (var key in resources)
            if (!resources[key].loaded) allLoaded = false;

        if (allLoaded) {
            // important: set loading before calling resolve(), in case resolution involves loading more resources
            loading = false;
            internalLoad = false;
            if (typeof resolve === "function") resolve();
        }
    }
/**
     * Validates if all resources have been loaded
     * @param {function} resolve Callback function to be executed if all resources are loaded
     */
Validates if all resources have been loaded
@param {function} resolve Callback function to be executed if all resources are loaded
Validates if all resources have been loaded @param { function } resolve Callback function to be executed if all resources are loaded
function validateIfAllLoaded(resolve) {
        var allLoaded = true;
        for (var key in resources)
            if (!resources[key].loaded) allLoaded = false;
        if (allLoaded) {
            loading = false;
            internalLoad = false;
            if (typeof resolve === "function") resolve();
        }
    }
function validateIfAllLoaded ( resolve ) { var allLoaded = true ; for ( var key in resources ) if ( ! resources [ key ] . loaded ) allLoaded = false ; if ( allLoaded ) { loading = false ; internalLoad = false ; if ( typeof resolve === "function" ) resolve ( ) ; } }
Validates if all resources have been loaded
 @param {function} resolve Callback function to be executed if all resources are loaded
Validates if all resources have been loaded @param { function } resolve Callback function to be executed if all resources are loaded
// important: set loading before calling resolve(), in case resolution involves loading more resources