// Get time for the log function
var ts = new Date().getTime();
// CUI function
var cui = {
	// Check if Firebug is installed and output the log
	log: function(msg){if (window.console && window.console.firebug){console.log((new Date().getTime() - ts) + ': '+ msg);};},

	init: function(){
		cui.log('init()');
	},

	domready: function(scope){
		cui.log('domready()');		
	
		if(!scope){scope = $(document);};

		// All categories rollover
		$('#allcategories', scope).hover(
			function () {
				$('#allcategories-expand').css('display','block');
			},
			function () {
				$('#allcategories-expand').css('display','none');
			}
		);
		$('#allcategories-expand', scope).hover(
			function () {
				$(this).css('display','block');
				$('#allcategories').addClass('current');
			},
			function () {
				$(this).css('display','none');
				$('#allcategories').removeClass('current');
			}
		);
	}
};

// Execute post DOM ready manipulation
$(document).ready(function(){cui.domready()});