//restricao de dominio
if(self.location.host.indexOf(".terra.")!=-1 || self.location.href.indexOf(".dsv-blog")!=-1 || self.location.href.indexOf(".54.164")!=-1){


// retorna um elemento aleatorio de um array
Array.prototype.randomElement=function(){ return this[Math.floor(Math.random()*this.length)]; }
// retorna o último elemento de um array
Array.prototype.lastElement=function(){ return this[this.length-1]; }
// embaralha um array
Array.prototype.shuffle=function(){ this.sort(function(){ return Math.floor(Math.random()*3)-1; }); }
// ordena um array de objetos a partir de uma ou mais propriedades de seus elementos
Array.prototype.sortOn=function(){ for(var i=arguments.length-1; i>=0; i--){ var v=arguments[i]; eval("this.sort(function(a, b){ return a."+v+">b."+v+"? 1 : (a."+v+"<b."+v+"? -1 : 0); });"); }	 }
// retorna o índice da primeira ocorrencia de um elemento dado
Array.prototype.indexOf=function(s){ for(var i=0; i<this.length; i++){ if(this[i]==s){ return i; } } return -1; }
// retorna o índice da ultima ocorrencia de um elemento dado
Array.prototype.lastIndexOf=function(s){ for(var i=this.length-1; i>=0; i--){ if(this[i]==s){ return i; } } return -1; }
// copia um array
Array.prototype.clone=function(){ var a=[]; return a.concat(this); }



//restricao de dominio
}
