(function ($) {

/**
 * Front_About_ContactPost
 * @constructor jQuery
 * 
 */
$.widget('ui.Front_About_ContactPost', $.extend({}, $.ui.Component.prototype, {
	type: 'Front_About_ContactPost',
	_init: function () {

		$.ui.Component.prototype._init.call(this); // chain parent constructor
		var self = this

		var name = self.element.find('#name')
		var subject = self.element.find('#subject')
		var comment = self.element.find('#comment')
		var mail = self.element.find('#mail')

		var FC = Front_About_ContactPost

		name.focus(function (){
			if($(this).val() == FC.name){
				$(this).val('');
			}
		})
		subject.focus(function (){
			if($(this).val() == FC.subject){
				$(this).val('');
			}
		})
		comment.focus(function (){
			if($(this).val() == FC.comment){
				$(this).val('');
			}
		})
		mail.focus(function (){
			if($(this).val() == FC.mail){
				$(this).val('');
			}
		})



		name.blur(function (){
			if($(this).val() == ''){
				$(this).val(FC.name);
			}
		})
		subject.blur(function (){
			if($(this).val() == ''){
				$(this).val(FC.subject);
			}
		})
		comment.blur(function (){
			if($(this).val() == ''){
				$(this).val(FC.comment);
			}
		})
		mail.blur(function (){
			if($(this).val() == ''){
				$(this).val(FC.mail);
			}
		})
	}
}));

}).require('Component')(jQuery);
