// Form
$.ui.form.subclass('ui.open_id_sign_in_form', {
	submitHandler: function(responce) {
		this._super(responce);
		if (responce) {
			if (responce.html && responce.html.form) {
				$('#tmp').html(responce.html.form);
				$('#tmp').find('#openid_message').each(function () {
					this.submit();
				});
			}
		}
	}, 
});
// Page
$.ui.page.subclass('ui.open_id_sign_in_page', {
	_init: function() {
		this.createForm();
	}, 
	createForm: function() {
		this.form = this.getBodyObject('#open_id_sign_in_form').open_id_sign_in_form();
	}
});
/********* Init *********/
$(document).ready(function() {
	$('.page').open_id_sign_in_page();
});