var $j = jQuery.noConflict();

$j(document).ready(
	function() {
		fitPage();
		
		$j('a[title^="popup_"]').click(
			function() {
				var tmp = $j(this).attr('title').split('_');
				var width = tmp[1];
				var height = tmp[2];
				var w = window.open($j(this).attr('href'), 'pw', 'width='+width+',height='+height+'');
				w.focus();
				return false;
			}
		);
		
	}
)

function fitPage() {
	var content = $j('#content_wrapper');
	var layout = $j('#layout_wrapper');
	layout.height((Math.floor(content.height()/206)*206));
}