function adjust_layout() {
	maxW = document.getElementById('content').offsetWidth;
	if(jQuery.browser.opera) {
		if (maxW % 2 == 0) {
			$('#top_ln, #bottom').css("marginLeft", "-381px");
			$('#main_photo').css("marginLeft", "-380px");
		}
		else {
			$('#top_ln, #bottom').css("marginLeft", "-380px");
			$('#main_photo').css("marginLeft", "-379px");
		}
	}
	else if(jQuery.browser.mozilla) {
		$('#top_ln, #bottom').css("marginLeft", "-381px");
		$('#main_photo').css("marginLeft", "-380px");
	}
	else if(jQuery.browser.msie6 || maxW % 2 == 0) {
		$('#top_ln, #bottom').css("marginLeft", "-381px");
		$('#main_photo').css("marginLeft", "-380px");
	}
	else {
		$('#top_ln, #bottom').css("marginLeft", "-382px");
		$('#main_photo').css("marginLeft", "-381px");
	}
}

function links_effects() {
	$("a.link_tree_item").bind("click", function() {
		var tree_id = $(this).attr("id").replace('ltree_', '');
		var subitem = $("#ltree_box_"+tree_id);
		
		if (subitem.is(":hidden")) {
			subitem.slideDown("fast");
		}
		else {
			subitem.slideUp("fast");
		}
	});
}

function references_list_effects(type) {
	ref_list_loaded_id = -1;
	$("table.ref_list td a").hoverIntent(ref_list_item_over, ref_list_item_out);
}

function ref_list_item_over ()	{
	var item_id = $(this).attr("class").replace('ref_list_img_', '');

	if (ref_list_loaded_id != item_id) {
		$.get(host_name+"/get_main_photo.php?id="+item_id, function(data) {
			$("#main_photo").fadeOut("normal", function() {
	  			$("#main_photo").html(data);
	  			$("#main_photo").fadeIn("normal");
			});
			ref_list_loaded_id = item_id;
		});
	}
}

function ref_list_item_out () {
}
