// JavaScript Document
$(document).ready(function(){
   $('.form-text').focus(function(){
   	 var title = $(this).attr("title");
	 var value = $(this).val();
	 if(title==value){
	 	$(this).val('');
	 } 
   });
   $('.form-text').blur(function(){
   	 var title = $(this).attr("title");
	 var value = $(this).val();
	 if(value==''){
	 	$(this).val(title);
	 } 
   });
   $('.form-text').each(function(index) {
   	var title = $(this).attr("title");
	 var value = $(this).val();
	 if(value==''){
	 	$(this).val(title);
	 }
  });
  $('.form-textarea').focus(function(){
   	 var title = $(this).attr("title");
	 var value = $(this).val();
	 if(title==value){
	 	$(this).val('');
	 } 
   });
   $('.form-textarea').blur(function(){
   	 var title = $(this).attr("title");
	 var value = $(this).val();
	 if(value==''){
	 	$(this).val(title);
	 } 
   });
   $('.form-textarea').each(function(index) {
   	var title = $(this).attr("title");
	 var value = $(this).val();
	 if(value==''){
	 	$(this).val(title);
	 }
  });
   
   
    /*
   
   $('.wpcf7-text').focus(function(){
   	 var title = $(this).attr("id");
	 var value = $(this).val();
	 if(title==value){
	 	$(this).val('');
	 } 
   });
   $('.wpcf7-text').blur(function(){
   	 var title = $(this).attr("id");
	 var value = $(this).val();
	 if(value==''){
	 	$(this).val(title);
	 } 
   });
   $('.wpcf7-text').each(function(index) {
   	var title = $(this).attr("id");
	 var value = $(this).val();
	 if(value==''){
	 	$(this).val(title);
	 }
  });
   


   $('.wpcf7-form textarea').focus(function(){
   	 var title = $(this).attr("id");
	 var value = $(this).val();
	 if(title==value){
	 	$(this).val('');
	 } 
   });
   $('.wpcf7-form textarea').blur(function(){
   	 var title = $(this).attr("id");
	 var value = $(this).val();
	 if(value==''){
	 	$(this).val(title);
	 } 
   });
   $('.wpcf7-form textarea').each(function(index) {
   	var title = $(this).attr("id");
	 var value = $(this).val();
	 if(value==''){
	 	$(this).val(title);
	 }
  });

  $('#wpcf7-f1-w1-o1').submit(function(){	
	  $('#wpcf7-f1-w1-o1 .wpcf7-form textarea').each(function(index) {
		  var title = $(this).attr("id");
		  if($(this).val()==title){
    		  $(this).val(" ");
    	  } 
	  });
	  $('#wpcf7-f1-w1-o1 .wpcf7-text').each(function(index) {
		  var title = $(this).attr("id");
		  if($(this).val()==title){
    		  $(this).val("");
    	  } 
	  });
	  
  });
  */

  $('#searchform').submit(function(){
	  $('#searchform .form-text').each(function(index) {
		  var title = $(this).attr("title");
		  if($(this).val()==title){
    		  $(this).val("");
    	  } 
	  });
  });
  
   
   
   
   
});
