
$(document).ready(function()
	{//dragging and resizing disabled
		//$(".dragdiv").draggable();
		//$(".dragdiv").resizable({handles: "all", autoHide: true});
	var iFrames = $(".dragframe");//document.getElementsByTagName('iframe');
//alert(iFrames.length);
if (iFrames.length>0){
		// Resize heights.
		//$(".dragframe").draggable();
		function iResize()
		{
			// Iterate through all iframes in the page.
			for (var i = 0, j = iFrames.length; i < j; i++)
			{
				// Set inline style to equal the body height of the iframed content.
				//if(iFrames[i].contentWindow){
					//if(iFrames[i].contentWindow.document){
						try{
						if(iFrames[i].contentWindow.document.body){
							iFrames[i].style.height = iFrames[i].contentWindow.document.body.offsetHeight + 'px';
						}
						}catch (e){
						}
					//}
				//}
			}
		}

		// Check if browser is Safari or Opera.
		//if ($.browser.safari || $.browser.opera)
		//{
			// Start timer when loaded.
			$('iframe').load(function()
				{
					setTimeout(iResize, 1000);
				}
			);

			// Safari and Opera need a kick-start.
			for (var i = 0, j = iFrames.length; i < j; i++)
			{
				var iSource = iFrames[i].src;
				iFrames[i].src = '';
				iFrames[i].src = iSource;
			}
		//}
		//else
		//{
			// For other good browsers.
		//	$('iframe').load(function()
		//		{
		//			// Set inline style to equal the body height of the iframed content.
		//			this.style.height = this.contentWindow.document.body.offsetHeight + 'px';
		//		}
		//	);
		//}

	}
});


