/*
 * 
	bm_main
	used to remove all globals from bm_stories
 */

;(function($){

var $$;


$$ = $.fn.bm_main = function($options) {

	// check for basic CSS support
	if (!$$.hasCSS()) { return false; }
	// init the modified history object
	$.historyInit($$.onPageLoad);
		
	// set default options
	var $defaults = {
		poemid   : 0,
		history : true,
		onLoad  : function() {},
	};
	
	// extend the options
	var $opts = $.extend($defaults, $options);
	
	// bring the options to the jquery object
	for (var i in $opts) {
		$.bm_poems[i]  = $opts[i];
	}
};


$$.onPageLoad = function() {	
	alert("in onPageLoad");
}
// Used mostly by window.keyUp to handle keyboard input. Scope locally.
$.extend({bm_main : {
	page_loaded : false,
	debug : false,
/*
	KEY_TAB : 9,
	KEY_ENTER : 13,
	KEY_SPACE : 32,
	KEY_PAGE_UP : 33,
	KEY_PAGE_DOWN : 34,
	KEY_LEFT_ARROW : 37,
	KEY_UP_ARROW : 38,
	KEY_RIGHT_ARROW : 39,
	KEY_DOWN_ARROW : 40,
	EDITING_NOTHING : 0,
	EDITING_USERNAME : 1,
	EDITING_PASSWORD : 2,
	EDITING_EMAIL : 3,
	EDITING_CITY : 4,
	EDITING_COMMENTS : 5,
	EDITING_EXISTING_PASSWORD : 6,
	EDITING_NEW_PASSWORD : 7,
	EDITING_CONFIRM_NEW_PASSWORD : 8,
	EDITING_FIRST_NAME : 9,
	EDITING_LAST_NAME : 10,
	EDITING_PREFERENCES_UPDATE_PASSWORD_BUTTON : 11,
	EDITING_LOGIN_REMEMBER_ME : 12,
*/

	DEFAULT_IMAGE_ALBUM : "india-400px", /* capitals signify constants */
	DEFAULT_SLIDESHOW_LOADED : "last-india-400px-li",
	WIDTH_WIDE : 1, //wide column width, narrow tab control
	WIDTH_NARROW : 2,
	current_col_width : 1,
	previous_cursor_style : "defaults", /* NB old code - used by content-inner on mouse out event to reset cursor. Change css */
	current_focus : null
}
})

})(jQuery);

