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) {
		var max = 500;
		var selector = ".lfr-column.sk620 img";
		jQuery(selector).each(function() {
			var w = jQuery(this).width();
			var h = jQuery(this).height();

			if (w > max) {
				var ratio = (h/w);
				jQuery(this).height(max * ratio).width(max);
			}

		});

	}
);

jQuery(document).last(

	/*
	This function gets loaded when everything, including the portlets, is on
	the page.
	*/

	function() {
	}
);
