		$(document).ready(function(){
			$(".xin_popup_window").click(function(){
				var xin_title = $(this).attr("title");
				var xin_url = $(this).attr("href");
				$.xinPlugin.popupWindow(xin_title, xin_url);
				return false;//这一句可以避免<a>标记点击之后转向链接地址
			});
		});
		//xinPlugin-popup对象
		jQuery.xinPlugin = {
			popupWindow:function(title, url) {//弹出层
				//获取url里面带过来的宽度和高度
				var width = this.request(url, "width");
				var height = this.request(url, "height");
				if ( width == "" ) width = 400;
				if ( height == "" ) height = 260;
				//弹出层口标题高度
				var titleheight = "26";
				//获取当前window的宽和高
				var iWidth = document.documentElement.clientWidth;
				var iHeight = document.documentElement.clientHeight;
				//使形参width和height兼容小数点
				if (("" + width).indexOf(".") > -1) width = width * iWidth;
				if (("" + height).indexOf(".") > -1) height = height * iHeight;
				//创建遮罩层
				$(document.body).append("<div id=\"xin_popup_grey\"></div>"); 
				//创建弹出层
				$(document.body).append("<div id=\"xin_popup_window\"></div>"); 
				//设置弹出层的属性
				$("#xin_popup_window").css("top", (iHeight - height) / 2 + "px");
				$("#xin_popup_window").css("left", (iWidth - width) / 2 + "px");
				$("#xin_popup_window").css("width", width + "px");
				$("#xin_popup_window").css("height", height + "px");
				//创建弹出层标题
				$("#xin_popup_window").append("<div id='xin_popup_window_title'></div>");
				//设置弹出层标题的属性
				$("#xin_popup_window_title").css("height", titleheight + "px");
				$("#xin_popup_window_title").css("line-height", titleheight + "px");
				$("#xin_popup_window_title").append("<span class=\"span_close\" onclick='$.xinPlugin.closeWindow()'><img src='../images/colse.gif' /></span>");
				$("#xin_popup_window_title").append("<span class=\"span_title\">" + title + "</span>");
				//创建弹出层内容
				$("#xin_popup_window").append("<div id=\"xin_popup_window_content\"></div>");
				$("#xin_popup_window_content").css("height", (height - titleheight) + "px");
				$("#xin_popup_window_content").append("<iframe src='" + url + "' width='100%' height='100%' scrolling='auto' frameborder='0'></iframe>");
			},
			closeWindow:function(){//关闭弹出层
				$("#xin_popup_grey").remove();
				$("#xin_popup_window").remove();
			},
			request:function(url, key){//获取网页传递的参数
				var reg = eval("/" + key + "=[^&]*/gi");
				var str = url.match(reg);
				var value = "";
				if ( str != null ){
					value = str.toString().split("=")[1];
				}
				return (value);
			}
		};