login_form = function() {
	this.init();
};

login_form.prototype = {
	init: function() {
		this.login_link = $('#login_link');
		this.popup = $('#popup');
		this.close = this.popup.find('.content .close');

		var that = this;

		this.login_link.click(function() {
			that.popup.removeClass('not_display');
			return false;
		});

		$(document).click(function() {
			that.close_popup();
		});

		this.close.click(function() {
			that.close_popup();
		});

		this.popup.click(function(evt) {
			evt.stopPropagation();
		});
	},

	close_popup: function() {
		this.popup.addClass('not_display');
	}
};

$(function() {
	new login_form();
});
