window.addEvent('domready', function() {

$(document.body).getElements('input[type=text]').addEvents({
    'focus': function(){

		if(!this.get('readonly') && this.className.indexOf('filterTextBox')<0)
		{
        var morph = new Fx.Morph(this);
		morph.start('.focusedArea');

			if(this.id=='place-search'){
			var morphcode = new Fx.Morph($('citycode'));
			morphcode.start('.focusedArea');}
		}
	
	},
	'blur': function(){

		if(!this.get('readonly') && this.className.indexOf('filterTextBox')<0)
		{
		var morph = new Fx.Morph(this);
		morph.start('.TextBoxAfterFocus');

			if(this.id=='place-search'){
			var morphcode = new Fx.Morph($('citycode'));
			morphcode.start('.TextBoxAfterFocus');}
		}
	}
});


$(document.body).getElements('input[type=password]').addEvents({
    'focus': function(){

		if(!this.get('readonly'))
		{
        var morph = new Fx.Morph(this);
		morph.start('.focusedArea');
		}
	
	},
	'blur': function(){

		if(!this.get('readonly'))
		{
		var morph = new Fx.Morph(this);
		morph.start('.TextBoxAfterFocus');
		}
	}
});


$(document.body).getElements('textarea').addEvents({
    'focus': function(){
		if(!this.get('readonly'))
		{
        var morph = new Fx.Morph(this);
		morph.start('.focusedArea');
		}
    },
    'blur': function(){
		if(!this.get('readonly'))
		{
		var morph = new Fx.Morph(this);
		morph.start('.TextAreaAfterFocus');
		}
    }
});

});