$(document).ready(function() {


	$(".external").attr('target','_blank');
	$(".previous").attr('href','javascript:history.go(-1)');

	$(".redirectform").change(function(){
		this.submit();
	});

	$(window).load( function() {

		var photoheight = $("#photo").height();
		var mainbodyheight = $("#mainbody .content").height();
		var sidebarheight = $("#sidebar").height()-photoheight;

		if (mainbodyheight && sidebarheight) {
			var height = (mainbodyheight > sidebarheight ? mainbodyheight : sidebarheight);
			$("#sidebar").height(height+photoheight+parseInt($("#mainbody .content").css("margin-top") != 'auto' ? $("#mainbody .content").css("margin-top") : 0)+parseInt($("#mainbody .content").css("padding-top"))+parseInt($("#mainbody .content").css("padding-bottom")));
			$("#mainbody .content").height(height);
		}

	});



});

