code: function(fn) {
  	/*!
  	 * contentloaded.js
  	 *
  	 * Author: Diego Perini (diego.perini at gmail.com)
  	 * Summary: cross-browser wrapper for DOMContentLoaded
  	 * Updated: 20101020
  	 * License: MIT
  	 * Version: 1.2
  	 *
  	 * URL:
  	 * http://javascript.nwbox.com/ContentLoaded/
  	 * http://javascript.nwbox.com/ContentLoaded/MIT-LICENSE
  	 *
  	 */
  	
  	// @fn function reference
  
  	var done = false,
  		top = true,
  
  		root = document.documentElement,
  	
  		add = document.attachEvent ? 'attachEvent' : 'addEventListener',
  		rem = document.attachEvent ? 'detachEvent' : 'removeEventListener',
  		pre = document.attachEvent ? 'on' : '',
  	
  		init = function(e) {
  			if (e.type == 'readystatechange' && document.readyState != 'complete') return;
  			(e.type == 'load' ? window : document)[rem](pre + e.type, init, false);
  			if (!done && (done = true)) fn.call(window, e.type || e);
  		},
  	
  		poll = function() {
  			try { 
  				if(!root.doScroll('left')){ 
  					setTimeout(poll, 50); return;
  				} 
  			} catch(e) { setTimeout(poll, 50); return; }
  			init('poll');
  		};
  
  	if (document.readyState == 'complete') fn.call(window, 'lazy');
  	else {
  		if (document.createEventObject && root.doScroll) {
  			try { top = !window.frameElement; } catch(e) { }
  			if (top) poll();
  		}
  		document[add](pre + 'DOMContentLoaded', init, false);
  		document[add](pre + 'readystatechange', init, false);
  		window[add](pre + 'load', init, false);
  	}
  }
docs: Fires a callback when the dom is ready