	this.label2value = function(){	

	var inactive = "inactive";
	var active = "active";
	var focused = "focused";
	
	$(".holding label").each(function(){		
			obj = document.getElementById($(this).attr("for"));
			if(($(obj).attr("type") == "text") || (obj.tagName.toLowerCase() == "textarea") || ($(obj).attr("type") == "password")){			
				$(obj).addClass(inactive);			
				var text = $(this).text();
				if ($(obj).val() != "")
					$(this).text("");
				$(obj).focus(function(){	
					label = $("label[for='"+$(this).attr("id")+"']");
					$(this).addClass(focused);
					$(this).removeClass(inactive);
					$(this).removeClass(active);	
					if($(label).text() == text) $(label).text("");
				});	
				$(obj).blur(function(){	
					label = $("label[for='"+$(this).attr("id")+"']");					
					$(this).removeClass(focused);													 
					if($(this).val() == "") {
						$(label).text(text);
						$(this).addClass(inactive);
					} else {
						$(this).addClass(active);		
					};				
				});				
			};	
		});		
	};
	
	$(document).ready(function(){
		$('#q').focus(function(){
			$(this).addClass("focused");
		});	
		$('#q').blur(function(){
			$(this).removeClass("focused");
		});			
	});

	// Preload images
	$.fn.preload = function() { 
		this.each(function(){ 
			$('<img/>')[0].src = this; 
		}); 
	} 	
	
