Array.prototype.sum = function() {
  return (! this.length) ? 0 : this.slice(1).sum() +
      ((typeof this[0] == 'number') ? this[0] : 0);
};

Array.prototype.last = function() {
  return (! this.length) ? null : this.slice(-1)[0];
};

jQuery.fn.refresh_image = function(){
    return this.each(function(){   
        var src = jQuery(this).attr("src");
        if(src.indexOf('?') >= 0){
            src = src+"&_="+(Math.random() * 100000);
        }else{
            src = src+"?_="+(Math.random() * 100000);    
        }
        jQuery(this).attr("src",src);
    });
}

var ibusiness = {
    core: {
        init: function(){}            
    }       
};
