$(function(){

   $("#searchbtn").click(function() { 
     $("form#homesearch").submit(); 
   });
	
   $("#advanced-options").hide();

   $("div.ao-open").click(function(){
	$(this).toggleClass("active");
	$('#advanced-options').slideToggle("medium");
   });
 
$('#dl-mobile').hoverIntent(makeTall,makeShort);


$('#slider').bxSlider({ 
         auto: true, 
         pause: 4000,
         displaySlideQty: 3,
	 moveSlideQty: 1,			
         speed: 700
});

$("a.dlml").fancybox({
         'scrolling' : 'no'
});
	
		
$('select#Beds, select#Baths, select#Garage, select#Acres, select#Search').selectmenu();

  $('#Search').change(function() {
       if($('option:selected', this).val() == "Other") {
             location.href="/search-properties";
       }
  });
});	

function makeTall() {$('#dl-mobile').animate({top:'58px'}, 300);}
function makeShort() {$('#dl-mobile').animate({top:'88px'}, 300);} 
