$(function(){
	var $rmi = $('.remember-me-input');
	
	var $remember = $('.remember-me-link').click(function(e){
		e.preventDefault();
		var $this = $(this);
		if ($this.is('.active'))
		{
			$this.removeClass('active');
			$rmi.val('false');
		}
		else
		{
			$(this).addClass('active');
			$rmi.val('true');
		}
		
	});
	
	$remember.keypress(function(e){
		if (e.charCode == 32)
		{
			$remember.click();
		}
		
	});
	

	var $form = $('.login-form');
	
	var $forgot_input = $('.forgot-input');
	

	/*$('.login-password-dummy').focus(function(){
		if (!$(this).data('title')) $(this).data('title', $(this).val());
		var title = $(this).data('title');
		//console.log('hej',$(this).val(), 'hej', title);
		if ($(this).attr('type') == 'text')//$(this).val() == title)
		{
			$(this).val('');
			$(this).attr('type', 'password');
			
		}
	}).blur(function(){
		if ($(this).val() == '')
		{
			$(this).val($(this).data('title'));
			$(this).attr('type', 'text');
		}
	});*/
	

	
	var $both = $('.login-password-real, .login-password-dummy');
	
	$('.login-email').focus(function(){
		if ($(this).val() == 'E-mail')
		{
			$(this).val('');
		}
	}).blur(function(){
		if ($(this).val() == '')
		{
			$(this).val('E-mail');
		}
	});
	
	
	
	var $forgot = $('.forgot-link').click(function(e){
		$('.front-page').addClass('forgot');
		e.preventDefault();
		$forgot_input.val('true');
		$('.info').remove();
		nuevo.merda.cur_pword.hide();
	});
	
	$('.cancel-forgot').click(function(e){
		e.preventDefault();
		$('.front-page').removeClass('forgot');
		nuevo.merda.cur_pword.show();
		$forgot_input.val('false');
	});
});
	
