/**
 * NOTE: This is a example of usage of the classical inheritance extend function
 **/

// The super class
var Foo = function(name){
    this.name = name;
};
Foo.prototype.getName = function(){
    return this.name;
};


// The sub class
var Bar = function(name,tracks){
    Bar.superclass.constructor.call(this,name);
    this.tracks = tracks;
};
inheritance.extend(Bar,Foo);

Bar.prototype.getTracks = function(){
    return this.tracks;
};

function load(){
    // Instantiat objects
    var a = new Foo('Gluecifer');
    var b = new Bar('Hellacopters',14);
    document.getElementById('a').innerHTML = 'Object <strong>a</strong> is instantiated from Foo and has <strong>name</strong> = <i>' + a.getName() + '</i>';
    document.getElementById('b').innerHTML = 'Object <strong>b</strong> is instantiated from Bar and has <strong>name</strong> = <i>' + b.getName() + '</i> and <strong>tracks</strong> = <i>' + b.getTracks() + '</i>';
}
