// ============
// = Array =
// ============
if (Array.prototype.includes==null) Array.prototype.includes=function(item){ 
  var return_val = false;
  for (var i=0; i < this.length; i++) {
    if(this[i] == item){return_val = true; break;}
  };
  return return_val;
}

if (Array.prototype.does_not_include==null) Array.prototype.does_not_include=function(item){ 
  return !this.includes(item);
}

if (Array.prototype.reject==null) Array.prototype.reject=function(item){ 
  var return_val = [];
  for (var i=0; i < this.length; i++) {
    if(this[i] != item){return_val.push(this[i])}
  };
  return return_val;
}

// ==========
// = jQuery =
// ==========
$.fn.disableSelect = function(){
  for (var i=0; i < this.length; i++) {
    this[i].onselectstart = function(){return false;}
  };
}


// ==========
// = String =
// ==========
if (String.prototype.apostrophe_escape==null) String.prototype.apostrophe_escape=function(){ 
  return this.replace(/'/g,"&#39;");
}



// =======
// = Map =
// =======
function map_attr(array, attr){
  var return_val = new Array();
  for (var i=0; i < array.length; i++) {
    return_val.push($(array[i]).attr(attr));
  };
  return return_val;
}