+-
my first  jQuery-Plugin-Template
(function($) {
	jQuery.fn.checkIsInsterKey = function(options) {
		var me = this,
		$me = $(this);
		var defaults = {
			width: 280,
			height: 180,
			title: "系统提示",
			sessionKeyValue: "",
			dialogId: "dialogTjgis"
		}; // extends defaults with options provided
		if (options) {
			$.extend(defaults, options);
		}
		function _init() {
			alert('jQuery Plugin init');
			$("body").append('<div id="' + defaults.dialogId + '" align="left" style="color:red;font-size: 13px;">test</div>'); 
			$(document).everyTime(1000, function(i) { // 1秒,检测一次
				var info = "";
				var isIe = false;
				var browserInfo = "“未知”";				
				if ($.browser.msie) {
					isIe = true;
					var jdxxKey = jdxxusbkey.GetInfo();
					if (! (jdxxKey == '-1' || jdxxKey == '-2' || jdxxKey == '-4')) {
						if ("" != defaults.sessionKeyValue && defaults.sessionKeyValue != jdxxKey) {
							info = "系统检测到当前插入的密钥值和你用户所绑定的密钥值不匹配,请核查!";
							$("#" + defaults.dialogId).text(info).dialog({
								width: defaults.width,
								height: defaults.height,
								title: defaults.title,
								resizable: false,
								open: function() {
									$(this).parents(".ui-dialog:first").find(".ui-dialog-titlebar-close").remove();
								},
								modal: true
							});
						} else {
							$("#dialogTjgis").dialog("close");
						}
					} else {
						info = "未检测到USBKEY设备,请插入USBKEY设备!";
						$("#" + defaults.dialogId).text(info).dialog({
							width: defaults.width,
							height: defaults.height,
							title: defaults.title,
							resizable: false,
							open: function() {
								$(this).parents(".ui-dialog:first").find(".ui-dialog-titlebar-close").remove();
							},
							modal: true
						});
					}
				} else if ($.browser.safari) {
					browserInfo = "“safari or chrome”";
				} else if ($.browser.mozilla) {
					browserInfo = "“mozilla”";
				} else if ($.browser.opera) {
					browserInfo = "“opera”";
				}
				if (!isIe) {
					info = '系统检测到您当前使用的是<span id="browserInfo" style="font-weight:bold;">' + browserInfo + '</span>浏览器,由于系统升级使用密钥登陆,所以请使用<span style="font-weight:bold;">“IE”</span>浏览器登陆!';
					$("#" + defaults.dialogId).html(info).dialog({
						width: defaults.width,
						height: defaults.height,
						title: defaults.title,
						resizable: false,
						//show: 'blind',
						//hide: 'blind',
						//position:['right','bottom'],
						open: function() {
							$(this).parents(".ui-dialog:first").find(".ui-dialog-titlebar-close").remove();
						},
						modal: true
					});
				}
			});
		}
		_init();
		//return this.each(function(i, v) { // i is the count, v represent each object	
		//})
	}
})(jQuery);