function imageHover(input, url){
	input.src = url;
}

function getURL(){
    var fullURL;
	if(window.location.toString().match(contextPath)){
		fullURL = window.location.toString().substring(0,window.location.toString().indexOf(contextPath)) + contextPath;
	}
	else{
		fullURL = window.location.toString();
	}
	return fullURL;
}


$(document).ready(function(){
								$("span.field-help").hide();
								$(":input").siblings("span.field-help").each(function(){
																							var text = $(this).text();
																							$(this).siblings("input:last, select:last, textarea:last").after("<img class='tooltipbutton' style='cursor:help' src='" + getURL() + "/themes/vireo/images/verio-tooltip-button.gif' title='"+text+"'/>");
																						
																							
																						
																						
																						});
								$("img.tooltipbutton").tooltip({
																  track: false,
																  delay: 0,
																  showURL: false,
																  opacity: 1,
																  fixPNG: true,
																  showBody: " - ",
																  extraClass: "pretty",
																  top: -100,
																  left: -100
																 }); 
								
								$("textarea#aspect_vireo_submit_DocumentMetaData_field_keywords").focus(function(){
																											if($(this).hasClass('subtle')){
																												var defaultValue = this.value;
																												$(this).removeClass('subtle');
																												this.value = "";
																												$(this).blur(function(){
																																if(this.value == defaultValue || this.value == ""){
																																		$(this).addClass('subtle');
																																		this.value = defaultValue;
																																}
																															})	
																											}
																											
																										});
							});