$(document).ready(function () {
	$('#nav li:has(ul)').hover( 
		function () {
	$(this).find('ul').fadeIn('fast');
	}, 
		function () {
	$(this).find('ul').hide();
	}
);

	$('#nav li:has(ul) > a').click( function () {
		return true;
	});

});



    
function formatText(index, panel) {
	return index + "";
}

$(function () {

   $('.anythingSlider').anythingSlider({
   
		easing: "easeInOutExpo",        	 	 // Anything other than "linear" or "swing" requires the easing plugin
		autoPlay: true,                  	 // This turns off the entire FUNCTIONALY, not just if it starts running or not.
		delay: 6000,                    		 // How long between slide transitions in AutoPlay mode
		startStopped: false,            	 	 // If autoPlay is on, this can force it to start stopped
		animationTime: 2000,             	 // How long the slide transition takes
		hashTags: true,                 	 	 // Should links change the hashtag in the URL?
		buildNavigation: true,          	 	 // If true, builds and list of anchor links to link to each slide
		pauseOnHover: true,                  // If true, and autoPlay is enabled, the show will pause on hover
		startText: "Play",             		 // Start text
		stopText: "Pause",               	 // Stop text
		navigationFormatter: formatText      // Details at the top of the file on this use (advanced use)
   });
      
   $("#slide-jump").click(function(){
       $('.anythingSlider').anythingSlider(6);
   });
   
});




$(function () {
      var tabContainers = $('div.tabs > div');
      tabContainers.hide().filter(':first').show();
      
      $('div.tabs ul.tabNavigation a').click(function () {
              tabContainers.hide();
              tabContainers.filter(this.hash).show();
              $('div.tabs ul.tabNavigation a').removeClass('selected');
              $(this).addClass('selected');
              return false;
      }).filter(':first').click();
});



$(document).ready(function () {
   
   
   var saturdayFilter = function (date) {
      return (date.getDay() != 6) ? [false, ''] : [true, ''];
   }
   
   var mydate = new Date();
   mydate.setFullYear(2012, 0, 1)
   
   $('.be-date').datepicker({
      showOn: 'button',
      buttonImage: '/images/icons/calendar.png',
      buttonImageOnly: true,
      beforeShowDay: saturdayFilter,
      maxDate: '+51W',
      minDate: mydate
   });
     
   
  

});

   
   
   

   
   
   
   
   // $('.be-add-favorite').post('add-to-favorites.cfm',)
   
   $('#be-details-thumbs a').hover(
      function () {
         $('#be-details-main-image img').attr('src', $(this).attr('href'));
      },
      function () {
         $('#be-details-main-image img').attr('src', $('#be-details-thumbs a:first').attr('href'));
      }
   );
   $('.be-results-condos table').hide();
   $('.be-results-condos>a').remove();
   $('<a href="javascript:;" class="be-condo-toggle">Toggle available condos</a>').prependTo('.be-results-condos');
   $('.be-condo-toggle').click(function () {
      $(this).parents('.be-results-condos').find('table').toggle();
   });
   
   




