/* 页面交互效果 */

(function(win, $) {

	// 全局搜索
	$('.ico-box')
			.on(
					'click',
					function() {
						// console.log($('#type').val());
						// console.log($('#searchtext').val());
						// console.log($("#type").find("option:selected").text());
						if ($('#type').val() == '0') {
							// 企业
							window
									.open(
											window.location.protocol
													+ "//"
													+ window.location.host
													+ window.location.pathname
															.substring(
																	0,
																	window.location.pathname
																			.substr(
																					1)
																			.indexOf(
																					'/') + 1)
													+ "/szjs_ythpt/frame/workportal/enterprise.html?corpname="
													+ $('#searchtext').val(),
											'_self');
						} else if ($('#type').val() == '1') {
							// 人员
							window
									.open(
											window.location.protocol
													+ "//"
													+ window.location.host
													+ window.location.pathname
															.substring(
																	0,
																	window.location.pathname
																			.substr(
																					1)
																			.indexOf(
																					'/') + 1)
													+ "/szjs_ythpt/frame/workportal/peolink.html?name="
													+ $('#searchtext').val(),
											'_self');
						} else {
							// 项目
							window
									.open(
											window.location.protocol
													+ "//"
													+ window.location.host
													+ window.location.pathname
															.substring(
																	0,
																	window.location.pathname
																			.substr(
																					1)
																			.indexOf(
																					'/') + 1)
													+ "/szjs_ythpt/frame/workportal/projectlink.html?prjname="
													+ $('#searchtext').val(),
											'_self');
						}

					})

}(this, jQuery));