Careers = {
	updatePortfolio : function() {
		if ($('portfolio_type_1').checked) {
			$('portfolio_file').enable().show().focus();
			$('portfolio_link').disable().hide();
		}
		else {
			$('portfolio_file').disable().hide();
			$('portfolio_link').enable().show().focus();
		}
	},
	apply : function(link, type) {
		var text = j(link).closest('li').find('span').html();
		j('#apply-what').show().find('em').html(text);
		j('#technology').val(type);
		j('#careers-form').slideDown(500, function() {
			$('careers-form').focusFirstElement();
			j.scrollTo(j('#name'), 1000);
		});
	}
};

j(function() {
	var f = $('careers-form');
	if (f){
		f.focusFirstElement();
		var opt = {
			autoOpen:false,
			width : 600,
			resizable : false,
			modal : true,
			title : i18n.zedplan_careers
		};
		j('#info_php').dialog(opt);
		j('#info_iphone').dialog(opt);
		j('#info_java').dialog(opt);
		j('#info_net').dialog(opt);
		j('#info_web').dialog(opt);
	}
});