// 
//  form_val_clear.js
//  javascript-jquery.ruble
//  
//  Created by Denis on 2011-09-02.
//  Copyright 2011 Denis. All rights reserved.
// 
$(document).ready(function() {

/*
 * ============================================================================
 * all email fields
 * ============================================================================
 */	
	
	
	$("input#email").focus(function(e) {
		var title = $("input#email").val();
		
		if (title == "email" || title == "email cant be empty" ) 
		{ 
			$("input#email").val("");
		}

		
	});
	
	
$("input#email").focusout(function(e) {
		var title = $("input#email").val();
		
		if (title == "") 
		{ 
			$("input#email").val("email cant be empty");
		}
	});
	
	/*
 * ============================================================================
 * all password fields
 * ============================================================================
 */	
	
	
	$("input#password").focus(function(e) {
		var title = $("input#password").val();
		
		if (title == "password" || title == "password cant be empty" ) 
		{ 
			$("input#password").val("");
		}

		
	});
	
	
$("input#password").focusout(function(e) {
		var title = $("input#password").val();
		
		if (title == "") 
		{ 
			$("input#password").val("password cant be empty");
		}
	});
	
	
	/*
 * ============================================================================
 * all password2 fields
 * ============================================================================
 */	
	
	
	$("input#password2").focus(function(e) {
		var password2 = $("input#password2").val();
		
		if (password2 == "password2" || password2 == "password2 cant be empty" ) 
		{ 
			$("input#password2").val("");
		}

		
	});
	
	
$("input#password2").focusout(function(e) {
		var password2 = $("input#password2").val();
		
		if (password2 == "") 
		{ 
			$("input#password2").val("password2 cant be empty");
		}
	});
	
	/*
 * ============================================================================
 * all captcha fields
 * ============================================================================
 */	
	
	
	$("input#captcha").focus(function(e) {
		var captchap = $("input#captcha").val();
		
		if (captchap == "captcha" || captchap == "captcha cant be empty" ) 
		{ 
			$("input#captcha").val("");
		}

		
	});
	
	
$("input#captcha").focusout(function(e) {
		var captchap = $("input#captcha").val();
		
		if (captchap == "") 
		{ 
			$("input#captcha").val("captcha cant be empty");
		}
	});
	
	
 /* ============================================================================
 * all report fields
 * ============================================================================
 */	
	
	
	$("textarea#report").focus(function(e) {
		var title = $("textarea#report").val();
		
		if (title == "report" || title == "Report Bugs" ) 
		{ 
			$("textarea#report").val("");
		}

		
	});
	
	
$("textarea#report").focusout(function(e) {
		var title = $("textarea#report").val();
		
		if (title == "") 
		{ 
			$("textarea#report").val("Report Bugs");
		}
	});	
	
});
