// Add ECMA functions not found in older browsers
// see: http://stackoverflow.com/questions/2790001/fixing-javascript-array-functions-in-internet-explorer-indexof-foreach-etc
define([], function() {"use strict";
    if(!('map' in Array.prototype)) {
        Array.prototype.map = function(mapper, that /*opt*/) {
            var other = new Array(this.length);
            for(var i = 0, n = this.length; i < n; i++)
            if( i in this)
                other[i] = mapper.call(that, this[i], i, this);
            return other;
        };
    }
    
    if (!('indexOf' in Array.prototype)) {
        Array.prototype.indexOf= function(find, i /*opt*/) {
            if (i===undefined) i= 0;
            if (i<0) i+= this.length;
            if (i<0) i= 0;
            for (var n= this.length; i<n; i++)
                if (i in this && this[i]===find)
                    return i;
            return -1;
        };
    }
});
