 /*********************************************************************************
 * at² GmbH
 * Bahnhofstr. 51
 * D-87435 Kempten
 * Germany
 *
 * at² GmbH
 * Löffelholzstr. 20
 * Haus 12 Mitte
 * D-90441 Nürnberg
 * Germany
 *
 * http://www.at2-software.com
 * info[at]at2-software.com
 *
 * @Creation: 07.07.2011
 * @Version: 0.5
 *
 * @Client:             GfG – Gesundheit für Generationen®
 * @Clientwebsite:      www.gfg-online.com
 * @Project:            Relaunch 2011
 *
 * JavaScript:
 * @Author:			    Markus Pezold  (für at² GmbH)
 * @Authorwebsite:      http://www.black-forever.de
 *
 * Used plugins & basic scripts:
 * 1. Implementation foreach for Internet Explorer < 9
 * 2. Lightweight wrapper for consolelog
 *********************************************************************************/

/*********************************************************************************
/* Plugin 1: Implementation foreach for Internet Explorer < 9
/* URL: https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/forEach
---------------------------------------------------------------------------------*/

if (!Array.prototype.forEach) {
  Array.prototype.forEach = function(fun /* , thisp */) {
    var len = this.length;
    if (typeof fun != "function") {
      throw new TypeError();
    }

    var thisp = arguments[1];
    for (var i = 0; i < len; i++) {
      if (i in this) {
        fun.call(thisp, this[i], i, this);
      }
    }
  };
}

/*********************************************************************************
/* Plugin 2: Lightweight wrapper for consolelog
/* usage: log('inside coolFunc', this, arguments);
/* URL: paulirish.com/2009/log-a-lightweight-wrapper-for-consolelog/
---------------------------------------------------------------------------------*/

window.log = function(){
  log.history = log.history || [];   // store logs to an array for reference
  log.history.push(arguments);
  arguments.callee = arguments.callee.caller;  
  if(this.console) console.log( Array.prototype.slice.call(arguments) );
};

// make it safe to use console.log always

(function(b){function c(){}for(var d="assert,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,markTimeline,profile,profileEnd,time,timeEnd,trace,warn".split(","),a;a=d.pop();)b[a]=b[a]||c})(window.console=window.console||{});
