jQuery(document).ready(

	/*
	This function gets loaded when all the HTML, not including the portlets, is
	loaded.
	*/

	function() {
		//Hide (Collapse) the toggle containers on load
		jQuery(".toggle_container").hide(); 

		//Switch the "Open" and "Close" state per click
		jQuery(".toggleTrigger").toggle(function(){
			jQuery(this).addClass("active");
		}, function () {
			jQuery(this).removeClass("active");
		});

		//Slide up and down on click
		jQuery(".toggleTrigger").click(function(){
			//jQuery(this).next(".toggle_container").slideToggle("fast,");
			jQuery(this).next(".toggle_container").toggle();
			/*if(jQuery(this).next(".toggle_container").is(":visible") == "true") {
				jQuery(this).next(".toggle_container").hide();
			} else {
				jQuery(this).next(".toggle_container").show();
			}*/
		});
	}
);

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() {
	}
);