InputPlaceholder=function(c,b,a){
	this.jPtr=c;
	this.sEmptyValue=b||this.getValue();
	this.oClasses=a;
	this.init();
	this.attachEvents()
};

InputPlaceholder.prototype={
	init:function(){
		if(this.isEmpty()){
			this.jPtr.val(this.sEmptyValue)
		}
		if(this.isNotTouched()){
			this.jPtr.addClass(this.oClasses.sEmpty)
		}
	},
	attachEvents:function(){
		var a=this;
		this.jPtr.keyup(
			function(){
				a.inputKeyDown()
			}
		).focus(
			function(){
				a.inputFocus()
			}
		).blur(
			function(){
				a.inputBlur()
			}
		)
	},
	inputKeyDown:function(){
		if(this.getValue()){
			this.makeFilled()
		}
	},
	inputFocus:function(){
		if(this.getValue()===this.sEmptyValue){
			this.jPtr.val("");
			this.jPtr.removeClass(this.oClasses.sEmpty)
		}else{
			this.makeFilled()
		}
	},
	inputBlur:function(){
		if(this.isNotTouched()){
			this.jPtr.val(this.sEmptyValue);
			this.makeEmpty()
		}else{
			this.makeFilled()
		}
	},
	makeFilled:function(){
		this.jPtr.removeClass(
			this.oClasses.sEmpty
		).addClass(
			this.oClasses.sFilled||""
		)
	},
	makeEmpty:function(){
		this.jPtr.removeClass(
			this.oClasses.sFilled||""
		).addClass(
			this.oClasses.sEmpty
		)
	},
	isEmpty:function(){
		return $.trim(this.getValue())===""
	},
	isNotTouched:function(){
		return(this.isEmpty()||this.getValue()===this.sEmptyValue)
	},
	getValue:function(){
		return this.jPtr.val()
	}
};