function frgt_click(){
	$('#dialog_login').dialog('close');
	$("#dialog_frgt").dialog('open');
	return false;
};
$(function(){
	var webpath = $('#const_webpath').val();
	$('#dialog_frgt').dialog({
		bgiframe: false,
		modal: true,
		autoOpen: false,
		resizable: false,
		width: 330,
		buttons: {
			'Send new password': function() {				
				$.post(webpath+'/ajax/user.php', { action: "passwrd", email: $('#ipt_forgotten').val()}, function(data){
					
				});
				$(this).dialog('close');
			}
		}
	});
	$('#dialog_alert').dialog({
		bgiframe: false,
		modal: true,
		autoOpen: true,
		resizable: false,
		buttons: {
			'OK': function() {
				$(this).dialog('close');
			}
		}							  
	});
	/*$('#login_button').click(function(){
		$("#dialog_login").dialog('open');
		return false;
	});*/
	$('#logout_button').click(function(){
		$.post(webpath+'/ajax/user.php', { action: "logout" }, function(data){
			$('#loginform').submit();																																
		});	
		return false;
	});				
	$('#notcreatederror').dialog({
		bgiframe: false,
		modal: true,
		autoOpen: true,
		resizable: false,
		buttons: {
			OK: function() {
				$('#homeform').submit();
			}
		}
	});	
	$('.ui-dialog .dialog-close').click(function(){
		$(this).parent().dialog('close');
	}).tooltip({showURL: false});
	$('.infobox .dialog-close').click(function(){
		$(this).parent().hide();
	}).tooltip({showURL: false});
	$('.wasabitooltip').tooltip({showURL: false, top: -45, track: true});
	
	
});
