//***********************************

$(document).ready(function(){

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

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


// For Photogallery
$("#photo_gallery:first").css("display", "block");


$("#gallery_img:first").css("display", "block");
$("#gallery_overlay:first").css("display", "block");

$("#gallery_img_placeholder:first").css("display", "block");
$("#gallery_overlay_placeholder:first").css("display", "block");

$("ul#main_menu li a.photos:first").css("display", "block");

$("#footer ul li a.photos_footer:first").css("display", "block");


$("#gallery:first").css("display", "block");
$("#gallery_overlay:first").css("display", "block");


// end photogallery

$(".container_amenity").hide();

$('.search_field').keyup(function() {
    var s = jQuery.trim( $('.search_field').val() );
    if ((s != '') && (s.length > 2)) {  
      $('.search_form').submit();
    } else {
      $('#search-results').html("");
    };
  });

}); // end


$(document).ready(function(){

 
  $.preload( '#slideshow img', {
    onFinish: function() {
      $('#slideshow img').removeClass('gone');
      $('#slideshow').slideshow({ timeout: 4000, fadetime: 600, type: 'sequence' });
    }
  });
  
  $.preload( '#slideshow_sub img', {
    onFinish: function() {
      $('#slideshow_sub img').removeClass('gone');
      $('#slideshow_sub').slideshow({ timeout: 4000, fadetime: 600, type: 'sequence' });
    }
  });



  

}); // end

function toggle_list(list_id) {
	//alert(list_id);
	//$(list_id).parent().find('.nonactive').toggleClass("active");
	$(list_id).parent().find('.nonactive').toggleClass("active");
	$(list_id).slideToggle("medium");
};


$().ready(function() {  

$('#team_member .team_content, #team_member .team_content_1, #team_member .team_content_2, #team_member .team_content_3, #team_member .team_content_4, #team_member .team_content_5, #team_member .team_content_6, #team_member .team_content_6, #team_member .team_content_7, #team_member .team_content_8, #team_member .team_content_9, #team_member .team_content_10').truncate({max_length: 25 }); 

});


