application.js
var Application = { init: function(){ if (Browser.Engine.trident) Application.fixIE(); if ($('form-entry')) Application.initFormEntry(); if ($$('a.hover-me').length > 0) Application.initHoverEffects(); }, start: function(){ if ($$('a.resize-me')) Application.resizeImages(); }, fixIE: function(){ ... }, ... } window.addEvent('domready', Application.init); window.addEvent('load', Application.start);