/* login */
(function ($, LOGA) {

$(document).on('focus', '#password_origin', function() {
	$(this).attr('type', 'password');
})
.on('submit', '#formAdminLogin', function() {
	var password_origin = $('#password_origin').val();
	if('' != password_origin) {
		$('#password').val(hex_md5(password_origin));
	}
	else {
		$('#password').val('');
	}
});

$(document).on('change', '#langset', function() {
	var t = $(this).children('option:selected').val();
	window.location.href = t;
})
.on('focus', '#vcodeInput', function() {
	if('' == $('#vcodeImg').html()){
		$('#vcodeImg').html('<img class="pointer" src="'+GV.URL.VCODE+'&t='+ Math.random() +'" onclick="this.src += \'&\' + Math.random();" />');
	}
});

})(jQuery, LOGA);
