/*
  Fix for IE <= 8
  https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference%3AObjects%3AArray%3AforEach
  Attention, si MAJ du jQuery ui-selectmenu, il faut modifier une ligne dans ui.slectmenu.js : http://bugs.jqueryui.com/ticket/5034
*/

if (!Array.prototype.forEach)
{
  Array.prototype.forEach = function(fun /*, thisp */)
  {
    "use strict";
    
    if (this === void 0 || this === null)
      throw new TypeError();
    
    var t = Object(this);
    var len = t.length >>> 0;
    if (typeof fun !== "function")
      throw new TypeError();
    
    var thisp = arguments[1];
    for (var i = 0; i < len; i++)
    {
      if (i in t)
        fun.call(thisp, t[i], i, t);
    }
  };
}
