(function($)
{
	$.extend(
	{
		common : 
		{
		//-----------------------------------------------------------------------------------------
            resize : function(){                
				var wh = $(window).height();
				var dh = $(document).height();
				var mh = $(".main_box").height();

				if(dh < wh){ var hh = dh; }else{ var hh = wh; }	
				if(mh > (hh-170)){
					$(".contents").height(mh);
				}else{
					$(".contents").height(hh-170);
				}
			}
			,

			usr_info : function (usr_id){
				$("#dialog").dialog('option', 'title', '유저 정보' );
				$("#dialog").load("../mybox/usr_info.php?id="+usr_id);

				$("#dialog").dialog('option', 'height', 190);
				$("#dialog").height(149);
				$("#dialog").dialog('option', 'buttons', {});
				$('#dialog').dialog('open');
			}
            ,
			error : function(msg){
				$('#error .error_msg').html(msg);
				$('#error').fadeIn("slow", function(){
					window.setTimeout(function(){
						$('#error').fadeOut('slow');
					},5000);
				});
			}
			,
			msg : function(msg){
				$('#help .help_msg').html(msg);
				$('#help').fadeIn("slow", function(){
					window.setTimeout(function(){
						$('#help').fadeOut('slow');
					},5000);
				});
			}
        //-----------------------------------------------------------------------------------------
		}
	});
})(jQuery);