
	$(document).ready(function(){
		//resizolunk dimanikusan

		//var iFrame = $("#win");

		/*function iResize() {
			iFrame.style.height = iFrame.contentWindow.document.body.offsetHeight + 'px';
		}*/

		// ez minden böngésző alatt megy
		// timeoutolunk és utána töltjük be az iframet
		/*$('#win').load(function() {
			setTimeout(iResize, 2);
		});*/

		/*var iSource = $("#win").src;
		$("#win").removeAttr("src");
		$("#win").attr("src",'http://web/progressive.hu/blog');*/
	});

	function resize_blog(wTop,wLeft,wHeight){
		$("#win").css("top",parseInt(wTop)+"px");
		$("#win").css("left",parseInt(wLeft)+"px");
		$("#win").height(parseInt(wHeight)+"px");
	}

	function show_blog(wTop,wLeft,wHeight) {
		var parts = window.location.pathname.split('/');
		var path = 'blog';
		if (/\d+/.test(parts[parts.length - 1])) {
			path += '/show_post/'+parts[parts.length - 1];
		}

		$("#win").attr({src: SITE_URL+path});
		$('#win').fadeIn(1000,resize_blog(wTop,wLeft,wHeight));
	}

	function hide_blog () {
		$('#win').hide();
	}

