The Global Object Model

Levi and I came up with a real-life equivalent to the Document Object Model (DOM). It's called the Global Object Model (GOM), and it can be used to organize, reference, and manipulate elements around the globe using simple JavaScript statements.

Where the DOM limits you to window and document, the GOM opens the door to bigger and better things. For example:

var idiot = world.countries['USA'].currentPresident();
alert( idiot.approvalRating() ); // outputs 3%

The GOM supports event handling. The following code would guarantee that I alway have Taking Back Sunday tickets as soon as the band goes on tour:

world.musicians['TakingBackSunday'].onTour = function() {

Error catching is easy with the GOM:

try {
} catch {
alert('Excuse me!');

I'm even working on a jQuery port so we can minimize the amount of code and the time it takes to write said code. Now, you can reference multiple people, places, and things with simple CSS selectors. To make it snow in Las Vegas, Phoenix, and Albuquerque, we say:

$('#las_vegas, #phoenix, #albuquerque').weather('snow');

To invoke uproar in every U.S. city simultaneously, we could use:

$('#USA .city').pandemonium();

Standard jQuery functions still work:

$('#reportCard').hide(); // for kids with bad grades

$('.breasts').show(); // at Mardi Gras
$('#g_w_bush').replaceWith('#mr_t'); // a better choice

And, of couse, chainability. Here's how I would wake up every morning:

$('#cory').onWake( function() {

And, in case you're wondering, within a few minutes I'll be doing something like $('#cory').sleep();