// JavaScript Document

/**

	Meos default javascript file
	This file is used to call / set all default
	javascript objects and methods.
	
**/

/* onLoad [Start] */
document.observe('dom:loaded', function () {

	// Instantiate the side bar class
	
	if ( $('nav-block') ) {
		window.oMainSideBar = new MainSideBar();
	}
	
	// Check to see if the side menu exists
	if ( $('nav-block') ) {
		
		if ( typeof(oMainSideBar) == 'object') {
			oMainSideBar.setInitialPosition();
			oMainSideBar.checkPosition();
		}
		
	}
	
	// Create objects
	//var jar = new CookieJar();
	//var top_menu = new Topmenu();
	
	if ( $('ranges-grid') ) {
		var calloutsObj = new Callout();
	}
	
	/* onScroll [Start] */

	Event.observe(window, 'scroll', function () {
					
		// Instantiate the side bar class
		if ( $('nav-block') ) {
			window.oMainSideBar.checkPosition();
		}
	
	} );

/* onScroll [End] */

} );

/* onLoad [End] */
