var PropertyMenu = {
    init: function() {
        $(PropertyMenu._init);
    },

    _init: function() {
        $('#propertyBox').data('originalHeight', $('#propertyBox').height());
        $('#propertyBox').css({ height: 0, overflow: 'hidden' });

        $('#btnPropertyClose').click(function() {
            DestinationMenu.hideMenu();
        });
		
		$('.property a.findahotel').click(function() {
			return false;
		})

        $('.property, .property .findahotel, #propertyBox').mouseenter(function() {
            PropertyMenu.showMenu();
        }).mouseleave(function() {
            PropertyMenu.hideMenu();
        });
    },

    showMenu: function() {
        $('.property .findahotel').addClass('active');
        var originalHeight = $('#propertyBox').data('originalHeight');
        $('#propertyBox').stop().animate({ height: originalHeight }, { duration: 500, queue: false });
    },

    hideMenu: function() {
        $('#propertyBox').stop().animate({ height: 0 }, { duration: 300, queue: false,
            complete: function() {
                $('.property .findahotel').removeClass('active');
            }
        });
    }
}

PropertyMenu.init();
