jQuery(document).ready(

	/*
	This function gets loaded when all the HTML, not including the portlets, is
	loaded.
	*/

	function() {
		var navigation = jQuery('#top-navigation > ul > li');
		navigation.hover(
			function () {
				var element = jQuery(this);
				navigation.removeClass('drop-down');
				element.addClass('drop-down');
				var widthA = element.width();
				var widthB = element.children('.child-menu').width();
				if (widthA < widthB) {
					widthC = widthA - 28;
				}
				else {
					widthC = widthB - 8;
				}
				element.find('.child-menu-connector').css({ width: widthC });
			},
			function () {
				navigation.removeClass('drop-down');
			}
		);
	}
);

Liferay.Portlet.ready(

	/*
	This function gets loaded after each and every portlet on the page.

	portletId: the current portlet's id
	jQueryObj: the jQuery wrapped object of the current portlet
	*/

	function(portletId, jQueryObj) {
	}
);

jQuery(document).last(

	/*
	This function gets loaded when everything, including the portlets, is on
	the page.
	*/

	function() {
	}
);