$(document).ready(function() {

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

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

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

  $("a[rel='floorplans']").colorbox();
  
  $("a[rel='floorplans_image']").colorbox();
  
  $(".cbox").colorbox({iframe:"true", transition:"none", width:"710px", height:"660px"});

  $("a.hideBtn:first").removeClass("hideBtn");

  $(".specials").colorbox({iframe:"true", transition:"none", width:"450px", height:"350px"});
  


//***********************************
// Refer a Friend  adding additional friends

var showText='Add more friends';
var hideText='';

// initialise the visibility check
var is_visible = false;

// the add more friends link
$('.form_row_friend').prev().append('<a id="refer_friend" href="#" class="toggleLink">'+showText+'</a>');

// hide all of the elements with a class of 'toggle'
$('.form_row_friend').hide();

// capture clicks on the toggle links
$('a.toggleLink').click(function() {

// switch visibility
is_visible = !is_visible;

// change the link depending on whether the element is shown or hidden
$(this).html( (!is_visible) ? hideText : hideText);

// toggle the display - uncomment the next line for a basic "accordion" style
//$('.toggle').hide();$('a.toggleLink').html(showText);
$(this).parent().next('.form_row_friend').toggle('slow');

// return false so any link destination is not followed
return false;

});
//***********************************
  
  
  
});

/* FOR AMENITIES STYLING */

$("document").ready(function(){
$(".container-amenities:odd").css("margin-right", "0px");
$(".container-amenities h3:odd").css("width", "280px");
});

/* END AMENITIES STYLING */



