window.debug
if (!(Array.indexOf || [].indexOf)) {
    Array.prototype.indexOf
window.debug = (function() {

window.debug, a console dot log wrapper adapted from html5boilerplate.com's window.log and Ben Alman's window.debug Only logs information when sakai.config.displayDebugInfo is switched on debug.log, debug.error, debug.warn, debug.debug, debug.info usage: debug.log('argument', {more:'arguments'}) paulirish.com/2009/log-a-lightweight-wrapper-for-consolelog/ benalman.com/projects/javascript-debug-console-log/ https://gist.github.com/466188


if (!(Array.indexOf || [].indexOf)) {

name Array
namespace Array extensions for Sakai


Array.prototype.indexOf = function(obj,start) {

Finds the first occurrence of an element in an array and returns its position. This only kicks in when the native .indexOf method is not available in the browser.
param {Object/String/Integer} obj The element we are looking for
param {Integer} start Where the search starts within the array
returns Returns the position of the first matched element
type Integer