$(document).ready(function(){
      $.fn.clearForm = function() {
        return this.each(function() {
          var type = this.type, tag = this.tagName.toLowerCase();
          if (tag == 'form')
            return $(':input',this).clearForm();
          if (type == 'text' || type == 'password' || tag == 'textarea')
            this.value = '';
          else if (type == 'checkbox' || type == 'radio')
            this.checked = false;
          //else if (tag == 'select')
            //this.selectedIndex = -1;
        });
      };
	$("form").clearForm();
	$("label").css("display","inline");
	var input = $("form :text");
	var label = $(input).parent().prev().children("label");
	$(label).click(function() {
		$(this).css("display","none");
		$(this).parent().next().children(input).focus();
	});
	$(input).focus(function () {
		$(this).parent().prev().children(label).css("display","none");					   
	});
	$(input).blur(function () {
		if (this.value=="") {
			$(this).parent().prev().children(label).css("display","inline");  
		}
	});
	if ($(input).value !== "") {
		$(this).parent().prev().children(label).css("display","none");
	}
});
/*
$(document).ready(function(){
	var $tabs = $(this).find('.tabs');
	var panelIds = $tabs.find('a').map(function () {
		return this.hash;
	}).get().join(','); 
	var $panels = $(panelIds); 
	var hoverIntent = null;
	$tabs.find('a').hover(function () {
		clearTimeout(hoverIntent);
		var el = this;
		hoverIntent = setTimeout(function () {
		$tabs.find("li").fadeTo(1, 0.75);								   
		$panels.removeClass("active").hide().filter(el.hash).addClass("active").show();
		$(el).parent("li").fadeTo(1, 1);
			}, 250);
		}, function () {
			clearTimeout(hoverIntent);
		}).click(function () {
			return false;
		}); 
	$(".panel:first").show().addClass("active");
	$tabs.find("li:not(:first)").fadeTo(1, 0.75);
});
*/