$(document).ready(function() {

  $('#slideshow img').addClass('gone');

  $.preload( '#slideshow img', {
    onFinish: function() {
      $('#slideshow img').removeClass('gone');
      $('#slideshow').slideshow({ timeout: 4000, fadetime: 600, type: 'sequence' });
    }
  });
  
  $('.search_field').keyup(function() {
    var s = jQuery.trim( $('.search_field').val() );
    if ((s != '') && (s.length > 2)) {  
      $('.search_form').submit();
    } else {
      $('#search-results').html("");
    };
  });

  $("a[rel='cbox']").colorbox();

  $("a[rel='floorplans']").colorbox();
  
  $("a[rel='floorplans_image']").colorbox();
  
  $("a[rel='sitemap']").colorbox();

  $(".cbox").colorbox({iframe:"true", transition:"none", width:"710px", height:"660px"});

  $(".movie").colorbox({iframe:"true", transition:"none", width:"640px", height:"480px"});

  $("#btn-gallery a.hideBtn:first").removeClass("hideBtn");

  $(".service_inline_cbox").colorbox({iframe:"true", transition:"none", width:"610px", height:"660px" });
  
  // Walkscore colorbox
  $(".rss").colorbox({width:"540px", height:"356px", inline:true, href:"#thewalkscore"});


});

// For Photogallery
$("document").ready(function(){
$("#photo_btn:first").css("display", "inline");
});
// End Photogallery


$("document").ready(function(){
$(".container-amenities:first").css("margin-top", "30px");
});


