(function($){		  
	$.extend($.fn,{
		juiCon:function(title,msg)
		{
				var openDialog = $("#dialog").dialog({
				bgiframe: true,
				resizable: false,
				autoOpen:false,
				height:200,
				modal: true,
				overlay: {
					backgroundColor: '#000',
					opacity: 0.5
				}
			});
			this.click(function(){
				var url = $(this).attr('href');
				$('#dialog > p >.msg').html(msg);
				$('#dialog').dialog('option','title',title);
				$('#dialog').dialog('option', 'buttons',
				{
					'确定': function() {
						location.href = url;
						$(this).dialog('close');;
						
					},
					'取消': function() {
						$(this).dialog('close');
					}			
				});							  
				openDialog.dialog("open");
				return false;	
			})
		}
	
	});
	$.extend({
		juiAlert: function (inTitle,content)
		{
			var alertObj = $("#alertDom").dialog({
				bgiframe: true,
				modal: true,
				autoOpen: false,
				buttons: {
					Ok: function() {
						$(this).dialog('close');
					}
				}
			});				
			var title = $('#alertDom').dialog('option', 'title');
			content || (content = inTitle);
			$('#alertDom>p>.msg').html(content); 
			$('#alertDom').dialog('option', 'title', inTitle);
			alertObj.dialog('open');			
		},
		errorMsg:function (msg,type)
		{
			$("#massageBox").show();
			$("#massageBox").find("strong").html(msg);
		}
	}); 
})(jQuery);


