function showInheritance() {
    var chicken = new Chicken('Little'),
        results = Y.one('#demo');

    results.setHTML('Running: ' + (new Date()));

    results.append(((chicken instanceof Object) ?
        "<p>chicken IS an instance of Object.</p>" :
        "<p>chicken IS NOT an instance of Object.</p>"));

    results.append(((chicken instanceof Bird) ?
        "<p>chicken IS an instance of Bird.</p>" :
        "<p>chicken IS NOT an instance of Bird.</p>"));

    results.append(((chicken instanceof Chicken) ?
        "<p>chicken IS an instance of Chicken.</p>" :
        "<p>chicken IS NOT an instance of Chicken.</p>"));

    // Chicken instances inherit Bird methods and members
    results.append(((chicken.isFlighted()) ?
        "<p>chicken CAN fly.</p>" :
        "<p>chicken CAN NOT fly.</p>"));

    results.append("<p>chicken's name is " + chicken.getName() + ".</p>");
}

Y.on('click', showInheritance, '#demo_btn');
