function changeSearchControl(field) {
  
  var duration = 600;
  
  switch (field.options[field.selectedIndex].value) {
	  case "single_family_home": $('.seach_attribute_nutzflche').hide(duration, '');
	  							 $('.seach_attribute_zimmer').hide(duration, ''); 
	  							 $('.seach_attribute_kaltmiete').hide(duration, '');
	  							 $('.seach_attribute_for_sale').hide(duration, '');
	  							 $('.seach_attribute_for_rent').hide(duration, '');
	  							 $('.seach_attribute_etage ').hide(duration, '');
	  							 
	  							 $('.seach_attribute_wohnflche').show(duration, '');
	  							 $('.seach_attribute_price').show(duration, '');
								 $('.seach_attribute_grundstcksgre').show(duration, '');
	  							 break;
	
	  case "mehrfamilienhaus":	 $('.seach_attribute_nutzflche').hide(duration, '');
								 $('.seach_attribute_zimmer').hide(duration, ''); 
								 $('.seach_attribute_kaltmiete').hide(duration, '');
								 $('.seach_attribute_for_sale').hide(duration, '');
								 $('.seach_attribute_for_rent').hide(duration, '');
								 $('.seach_attribute_etage ').hide(duration, '');
								 
								 $('.seach_attribute_wohnflche').show(duration, '');
								 $('.seach_attribute_price').show(duration, '');
								 $('.seach_attribute_grundstcksgre').show(duration, '');
	                   			 break;
	
	  case "eigentumswohnungen": $('.seach_attribute_nutzflche').hide(duration, '');
								 $('.seach_attribute_kaltmiete').hide(duration, '');
								 $('.seach_attribute_for_sale').hide(duration, '');
								 $('.seach_attribute_for_rent').hide(duration, '');
								 $('.seach_attribute_etage ').hide(duration, '');
								 $('.seach_attribute_grundstcksgre').hide(duration, '');
								 
								 $('.seach_attribute_wohnflche').show(duration, '');
								 $('.seach_attribute_price').show(duration, '');
								 $('.seach_attribute_zimmer').show(duration, '');
								 $('.seach_attribute_etage ').show(duration, '');
	                   			 break;
	
	  case "1raum":			     $('.seach_attribute_nutzflche').hide(duration, '');
								 $('.seach_attribute_for_sale').hide(duration, '');
								 $('.seach_attribute_for_rent').hide(duration, '');
								 $('.seach_attribute_price').hide(duration, '');
								 $('.seach_attribute_grundstcksgre').hide(duration, '');
								 
								 $('.seach_attribute_wohnflche').show(duration, '');
								 $('.seach_attribute_etage ').show(duration, '');
								 $('.seach_attribute_kaltmiete').show(duration, '');
								 $('.seach_attribute_zimmer').show(duration, ''); 
								 break;
	
	  case "2raum": 			 $('.seach_attribute_nutzflche').hide(duration, '');
								 $('.seach_attribute_for_sale').hide(duration, '');
								 $('.seach_attribute_for_rent').hide(duration, '');
								 $('.seach_attribute_price').hide(duration, '');
								 $('.seach_attribute_grundstcksgre').hide(duration, '');
								 
								 $('.seach_attribute_wohnflche').show(duration, '');
								 $('.seach_attribute_etage ').show(duration, '');
								 $('.seach_attribute_kaltmiete').show(duration, '');
								 $('.seach_attribute_zimmer').show(duration, ''); 
								 break;
			
	  case "3raum": 			 $('.seach_attribute_nutzflche').hide(duration, '');
								 $('.seach_attribute_for_sale').hide(duration, '');
								 $('.seach_attribute_for_rent').hide(duration, '');
								 $('.seach_attribute_price').hide(duration, '');
								 $('.seach_attribute_grundstcksgre').hide(duration, '');
								 
								 $('.seach_attribute_wohnflche').show(duration, '');
								 $('.seach_attribute_etage ').show(duration, '');
								 $('.seach_attribute_kaltmiete').show(duration, '');
								 $('.seach_attribute_zimmer').show(duration, ''); 
								 break;
		
	  case "4raum": 			 $('.seach_attribute_nutzflche').hide(duration, '');
								 $('.seach_attribute_for_sale').hide(duration, '');
								 $('.seach_attribute_for_rent').hide(duration, '');
								 $('.seach_attribute_price').hide(duration, '');
								 $('.seach_attribute_grundstcksgre').hide(duration, '');
								 
								 $('.seach_attribute_wohnflche').show(duration, '');
								 $('.seach_attribute_etage ').show(duration, '');
								 $('.seach_attribute_kaltmiete').show(duration, '');
								 $('.seach_attribute_zimmer').show(duration, ''); 
								 break;
		
	  case "grere_wohnungen": 	 $('.seach_attribute_nutzflche').hide(duration, '');
								 $('.seach_attribute_for_sale').hide(duration, '');
								 $('.seach_attribute_for_rent').hide(duration, '');
								 $('.seach_attribute_price').hide(duration, '');
								 $('.seach_attribute_grundstcksgre').hide(duration, '');
								 
								 $('.seach_attribute_wohnflche').show(duration, '');
								 $('.seach_attribute_etage ').show(duration, '');
								 $('.seach_attribute_kaltmiete').show(duration, '');
								 $('.seach_attribute_zimmer').show(duration, ''); 
								 break;
		
	  case "miethuser": 		 $('.seach_attribute_nutzflche').hide(duration, '');
							 	 $('.seach_attribute_zimmer').hide(duration, ''); 
							 	 $('.seach_attribute_price').hide(duration, '');
								 $('.seach_attribute_for_sale').hide(duration, '');
								 $('.seach_attribute_for_rent').hide(duration, '');
								 $('.seach_attribute_etage ').hide(duration, '');
								 
								 $('.seach_attribute_wohnflche').show(duration, '');
								 $('.seach_attribute_kaltmiete').show(duration, '');
								 $('.seach_attribute_grundstcksgre').show(duration, '');
								 break;
		
	  case "bauvorhaben": 		 $('.seach_attribute_nutzflche').hide(duration, '');
								 $('.seach_attribute_zimmer').hide(duration, ''); 
								 $('.seach_attribute_kaltmiete').hide(duration, '');
								 $('.seach_attribute_for_sale').hide(duration, '');
								 $('.seach_attribute_for_rent').hide(duration, '');
								 $('.seach_attribute_etage ').hide(duration, '');
			 
								 $('.seach_attribute_wohnflche').show(duration, '');
								 $('.seach_attribute_price').show(duration, '');
								 $('.seach_attribute_grundstcksgre').show(duration, '');
								 break;
		
	  case "baugrundstcke": 	 $('.seach_attribute_nutzflche').hide(duration, '');
								 $('.seach_attribute_zimmer').hide(duration, ''); 
								 $('.seach_attribute_kaltmiete').hide(duration, '');
								 $('.seach_attribute_for_sale').hide(duration, '');
								 $('.seach_attribute_for_rent').hide(duration, '');
								 $('.seach_attribute_etage ').hide(duration, '');
								 $('.seach_attribute_wohnflche').hide(duration, '');
								 
								 $('.seach_attribute_price').show(duration, '');
								 $('.seach_attribute_grundstcksgre').show(duration, '');
								 break;
		
	  case "gewerbeobjektezumverkauf": 	
								 $('.seach_attribute_zimmer').hide(duration, ''); 
								 $('.seach_attribute_kaltmiete').hide(duration, '');
								 $('.seach_attribute_for_sale').hide(duration, '');
								 $('.seach_attribute_for_rent').hide(duration, '');
								 $('.seach_attribute_etage ').hide(duration, '');
								 $('.seach_attribute_wohnflche').hide(duration, '');
		 
								 $('.seach_attribute_nutzflche').show(duration, '');
								 $('.seach_attribute_price').show(duration, '');
								 $('.seach_attribute_grundstcksgre').show(duration, '');
								 break;
		
	  case "gewerbeobjektezumvermieten": 	
								 $('.seach_attribute_zimmer').hide(duration, ''); 
								 $('.seach_attribute_for_sale').hide(duration, '');
								 $('.seach_attribute_for_rent').hide(duration, '');
								 $('.seach_attribute_etage ').hide(duration, '');
								 $('.seach_attribute_wohnflche').hide(duration, '');
								 $('.seach_attribute_price').hide(duration, '');
						
								 $('.seach_attribute_nutzflche').show(duration, '');
								 $('.seach_attribute_kaltmiete').show(duration, '');
								 $('.seach_attribute_grundstcksgre').show(duration, '');
								 break;
	
	  default:   				 $('.seach_attribute_nutzflche').hide(duration, '');
								 $('.seach_attribute_zimmer').hide(duration, ''); 
								 $('.seach_attribute_etage ').hide(duration, '');
								 $('.seach_attribute_price').hide(duration, '');
								 $('.seach_attribute_grundstcksgre').hide(duration, '');
								 $('.seach_attribute_kaltmiete').hide(duration, '');
								 $('.seach_attribute_wohnflche').hide(duration, '');
								 
								 $('.seach_attribute_for_sale').show(duration, '');
								 $('.seach_attribute_for_rent').show(duration, '');
								 
								 // vermieten/verkaufen
								 $(".wpp_search_select_field_for_sale option[selected]").removeAttr("selected");
								 $(".wpp_search_select_field_for_sale option[value='Alle']").attr("selected", "selected"); 
								 $(".wpp_search_select_field_for_rent option[selected]").removeAttr("selected");
								 $(".wpp_search_select_field_for_rent option[value='Alle']").attr("selected", "selected");
								 // Ort
								 $(".wpp_search_select_field_city option[selected]").removeAttr("selected");
								 $(".wpp_search_select_field_city option[value='-1']").attr("selected", "selected"); 
								 // Ort
								 //$(".wpp_search_select_field_city option[selected]").removeAttr("selected");
								 //$(".wpp_search_select_field_city option[value='-1']").attr("selected", "selected"); 
								 break;
	}
  
}
// Standardanzeige der Suche
function searchDefault()
{
	 // Speed 
	 var duration = 0;
	 // ausgeblendete Elemente
	 $('.seach_attribute_nutzflche').hide(duration, ''); 
	 $('.seach_attribute_zimmer').hide(duration, ''); 
	 $('.seach_attribute_etage ').hide(duration, '');
	 $('.seach_attribute_price').hide(duration, '');
	 $('.seach_attribute_grundstcksgre').hide(duration, '');
	 $('.seach_attribute_kaltmiete').hide(duration, '');
	 $('.seach_attribute_wohnflche').hide(duration, '');
	 // eingeblendete Elemente
	 $('.seach_attribute_for_sale').show(duration, '');
	 $('.seach_attribute_for_rent').show(duration, '');  
	 // Wechsel auf Standardanzeige der Selectboxen
	 // Art
	 $(".wpp_search_select_field_property_type option[selected]").removeAttr("selected");
	 $(".wpp_search_select_field_property_type option[value='Alle']").attr("selected", "selected");  
	 // vermieten/verkaufen
	 $(".wpp_search_select_field_for_sale option[selected]").removeAttr("selected");
	 $(".wpp_search_select_field_for_sale option[value='Alle']").attr("selected", "selected"); 
	 $(".wpp_search_select_field_for_rent option[selected]").removeAttr("selected");
	 $(".wpp_search_select_field_for_rent option[value='Alle']").attr("selected", "selected");
	 // Ort
	 $(".wpp_search_select_field_city option[selected]").removeAttr("selected");
	 $(".wpp_search_select_field_city option[value='-1']").attr("selected", "selected"); 
}

function zumVerkaufen(field)
{
	 var duration = 600;
	 if(field.options[field.selectedIndex].value == "ja")
	 {
		 $('.seach_attribute_nutzflche').hide(duration, '');
		 $('.seach_attribute_zimmer').hide(duration, ''); 
		 $('.seach_attribute_etage ').hide(duration, '');
		 $('.seach_attribute_grundstcksgre').hide(duration, '');
		 $('.seach_attribute_kaltmiete').hide(duration, '');
		 $('.seach_attribute_wohnflche').hide(duration, '');
		 $('.seach_attribute_for_sale').hide(duration, '');
		 $('.seach_attribute_for_rent').hide(duration, '');
		 
		 $('.seach_attribute_price').show(duration, ''); 
	 }
}

function zumVermieten(field)
{
	 var duration = 600;
	 if(field.options[field.selectedIndex].value == "ja")
	 {
		 $('.seach_attribute_nutzflche').hide(duration, '');
		 $('.seach_attribute_zimmer').hide(duration, ''); 
		 $('.seach_attribute_etage ').hide(duration, '');
		 $('.seach_attribute_price').hide(duration, '');
		 $('.seach_attribute_grundstcksgre').hide(duration, '');
		 $('.seach_attribute_wohnflche').hide(duration, '');
		 $('.seach_attribute_for_sale').hide(duration, '');
		 $('.seach_attribute_for_rent').hide(duration, ''); 
		 
		 $('.seach_attribute_kaltmiete').show(duration, '');
	 }
}

