$(document).ready(function()
	{

		// Set specific variable to represent all iframe tags.
		var iFrames = $('.iframeContent');

		// Resize heights.
		function iResize()
		{
			// Iterate through all iframes in the page.
			for (var i = 0, j = iFrames.length; i < 1; i++)
			{
				// Set inline style to equal the body height of the iframed content.
				$('#iframeLoading').hide();

				if (iFrames[i].contentWindow.document.body)
				{
					iFrames[i].style.height = iFrames[i].contentWindow.document.body.offsetHeight + 'px';
					iFrames[i].style.visibility = 'visible';
					timer = window.setTimeout(iResize, 500);
				}
			}
		}

		// Check if browser is Safari or Opera.
		if ($.browser.safari || $.browser.opera || $.browser.msie)
		{
			// Start timer when loaded.
			$('.iframeContent').load(function()
				{
					var timer = setTimeout(iResize, 0);
				}
			);

			// Safari and Opera need a kick-start.
			for (var i = 0, j = iFrames.length; i < 1; i++)
			{
				var iSource = iFrames[i].src;
				iFrames[i].src = '';
				iFrames[i].src = iSource;
			}
		}
		else
		{
			// For other good browsers.
			$('.iframeContent').load(function()
				{
					// Set inline style to equal the body height of the iframed content.
					$('#iframeLoading').hide();
					this.style.height = this.contentWindow.document.body.offsetHeight + 'px';
					this.style.visibility = 'visible';
					var timer = setTimeout(iResize, 500);

				}
			);

		}
	}
);


