jQuery(document).ready(

	/*
	This function gets loaded when all the HTML, not including the portlets, is
	loaded.
	*/

	function() {
	}
);

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() {
	}
);

/* javascript functions to display and hide the portlet menu, referenced from portlet.vm but cannot be included there for compatibility with IE. */
var iconsDisplayedTimeout=new Array();

function SetIconsDisplay(portletId, displayStyle) {
    try
    {
      if (iconsDisplayedTimeout[portletId]) {
        clearTimeout(iconsDisplayedTimeout[portletId]);
      }
      iconsDisplayedTimeout[portletId] = setTimeout(function(){ShowOrHideIcons(portletId, displayStyle);} , displayStyle == 'none' ? 1000 : 300);
    }
    catch(e)
    {
        //ignore
    }
}
function ShowOrHideIcons(portletId,displayStyle) {
    try
    {
        iconsDisplayedTimeout[portletId]=null;
        var iconsDiv=document.getElementById('portlet-small-icon-bar_'+portletId);
        var iconsShortImg=document.getElementById('showIconsBullet'+portletId);
        if(iconsDiv.style.display != displayStyle)
        {
            iconsDiv.style.display = displayStyle;
            if(displayStyle == 'none')
            {
              iconsShortImg.style.display = 'block';
            }
            else
            {
              iconsShortImg.style.display = 'none';
            }
        }
    }
    catch(e)
    {
      // ignore
    }
}