function init_front_end_admin() {
		$('.admin-change-link').each(function () {
						$(this).hover(function () { $(this).addClass("hover"); },
													function () { 
															var el = $(this);
															el.removeClass("hover");
															/* eye candy */
															el.addClass("hover-out");
															setTimeout(function () {
																			el.removeClass("hover-out");
																	}, 500); 
													});
				});

}


function init_autolabels() {
		/// not fully tested port to jquery
		function _set_input_default(input, initial_text) {
				if (!input || (input.value && input.value!=initial_text)) return;
				var is_password_input = input.type == "password";
				
				function _display_label(input) {
						input.value = initial_text; 
						if (is_password_input) input.type = "text";
						$(input).addClass("autolabel-inactive");
				}
				function _undisplay_label(input) {
						input.value = ''; 
						if (is_password_input) input.type = "password";
						$(input).removeClass("autolabel-inactive"); 																		
				}
				
				function _on_focus(ev) {
						if (this.value == initial_text) 
								_undisplay_label(this);
						$(this).removeClass("autolabel-inactive"); 
				}
				function _on_blur(ev) {
						if (this.value == '') { 
								_display_label(this);
						}
				}
				
				$(input).focus(_on_focus);
				$(input).blur(_on_blur);
				_display_label(input);
				function _reset() {
						if (input.value==initial_text) {
								input.value = '';
						}
				}
				$(input.form).submit(_reset);
		}

		$(".autolabel").each(function() {
						var input = this;
						var label = input.title;
						input.title = '';
						_set_input_default(input, label);
				});
}


$(document).ready(function(){
				init_front_end_admin();
				init_autolabels();
		});
