Resort Detail
Resort Detail
Resort Detail
@using BAT.Business.Helpers
@using BAT.Business.Services
@using BAT.Business.BindableModels.Resort
@using System.Text.RegularExpressions
@model BAT.Business.BindableModels.Resort.ResortDetail
@{
Layout = "~/Views/" + Session["DomainName"] + "/Shared/_LayoutResp_V1.cshtml";
var resortLargePicURl = "";
var resortNoPicUrL = "";
var resortSmallPicUrl = "";
var ResortEventWithDistanceModel = new ResortEventWithDistanceModel();
var ResortZipWithDistance = new ResortZipWithDistance();
var ResortReview = new Reviews();
var resortid = 0.0;
var reviewid = 0.0;
string Website = "";
string link = "";
string Address = "";
string PrintImage = "";
double Currency = 0.0;
string displaywebsite = "";
var C_continue = true;
string ResortCompanyName = "";
// Declare varaibles for breadcrumbs
string ResortName = "";
//For LD-Json Data Start
var domainName = "";
var currentUrl = "";
System.Web.HtmlString companyUrl;
var rcity = "";
var rState = "";
var rzip = "";
var raddress = "";
var rcountry = "";
var rphone = "";
var image = "";
var rc = "0";
var ratingValue = "0";
var firstreview = "";
var review = "";
string QueryStrings = "";
string hiddenSource = "";
string hiddenCampaign = "";
string hiddenAdGroup = "";
string hiddenKeyword = "";
//New Link Resort
var new_resort = "";
var DomainSettings = Model.DomainSettings; //
DomainService.GetCurrentDomainSettings();
try
{
// show two buttons on registration form
ViewBag.EnableSecondbtn = true;
resortLargePicURl = ViewBag.ResortPicURL;
//Html.SettingValueByKey("ResortPicURL"); //prev Large, now thumb
resortNoPicUrL = ViewBag.ResortSmallPicNoPhoto;
//Html.SettingValueByKey("ResortSmallPicNoPhoto"); //Large
resortSmallPicUrl = ViewBag.ResortSmallPicURL;
//Html.SettingValueByKey("ResortSmallPicURL");
ResortEventWithDistanceModel = new ResortEventWithDistanceModel
{
AreaEvent = Model.GetAreaEvent,
ZipRanges = Model.ZipRange,
ZipDistance = Model.DistanceInMiles,
ResortId = Model.ResortId
};
ResortZipWithDistance = new ResortZipWithDistance
{
GetAreaAttraction = Model.GetAreaAttraction,
ZipRange = Model.ZipRange,
DistanceInMiles = Model.DistanceInMiles,
ResortId = Model.ResortId
};
if (Model.ResortModel != null && Model.ResortModel.Resort != null)
{
resortid = @Model.ResortModel.Resort.ResortId;
ResortCompanyName = Model.ResortModel.ResortCompanyName;
}
if (Model.ResortModel != null && Model.ResortModel.Resort != null &&
Model.ResortModel.Resort.Name != null)
{
ResortName = Model.ResortModel.Resort.Name;
}
ResortReview = new Reviews
{
reviews = Model.reviews,
ResortId = Convert.ToUInt16(resortid),
ResortName = ResortName,
};
domainName = DomainService.GetCurrentDomainName();
currentUrl = Request.Url.AbsoluteUri;
companyUrl = Html.CompanyFriendlyURL(ResortCompanyName);
rcity = Model != null ? (Model.ResortModel != null ?
(Model.ResortModel.Resort != null ? (Model.ResortModel.Resort.City) : "") : "") :
"";
rState = Model != null ? (Model.ResortModel != null ?
(Model.ResortModel.StateName) : "") : "";
rzip = Model != null ? (Model.ResortModel != null ?
(Model.ResortModel.Resort != null ? (Model.ResortModel.Resort.Zip) : "") : "") :
"";
raddress = Model != null ? (Model.ResortModel != null ?
(Model.ResortModel.Resort != null ? (Model.ResortModel.Resort.Address1) : "") : "")
: "";
rcountry = Model != null ? (Model.ResortModel != null ?
(Model.ResortModel.CountryName) : "") : "";
rphone = Model != null ? (Model.ResortModel != null ?
(Model.ResortModel.Resort != null ? (Model.ResortModel.Resort.Phone) : "") : "") :
"";
try
{
if (Model.Pics.Count > 0)
{
var checkurl1 = resortLargePicURl + Model.Pics[0];
var ImageURL1 = Utility.IsImageUrl(checkurl1);
if (ImageURL1 == true)
{
image = @resortLargePicURl + @Model.Pics[0];
}
}
ratingValue =
Convert.ToString((Convert.ToInt32(ViewBag.AverageStars) /* * 20*/));
if (Model.reviews.Count > 0)
{
review =
Model.reviews.First().Tblresortreview.Review.Replace(System.Environment.NewLine,
"<br/>");
}
rc = Convert.ToString(Convert.ToInt32(ViewBag.totalRatingContributer));
//For LD-Json Data End
}
catch { }
//New Properties for Sale Module
QueryStrings = System.Web.HttpContext.Current.Request.Url.Query;
hiddenSource = Utility.getVarFromQueryString(QueryStrings, "source");
if ((hiddenSource == "" || hiddenSource == "0") && !
string.IsNullOrEmpty(Session["Source"] as string))
{
hiddenSource = Session["Source"].ToString();
}
hiddenCampaign = Utility.getVarFromQueryString(QueryStrings, "campaign");
if ((hiddenCampaign == "" || hiddenCampaign == "0") && !
string.IsNullOrEmpty(Session["Campaign"] as string))
{
hiddenCampaign = Session["Campaign"].ToString();
}
hiddenAdGroup = Utility.getVarFromQueryString(QueryStrings, "adgroup");
if ((hiddenAdGroup == "" || hiddenAdGroup == "0") && !
string.IsNullOrEmpty(Session["AdGroup"] as string))
{
hiddenAdGroup = Session["AdGroup"].ToString();
}
hiddenKeyword = Utility.getVarFromQueryString(QueryStrings, "keyword");
if ((hiddenKeyword == "" || hiddenKeyword == "0") && !
string.IsNullOrEmpty(Session["Keyword"] as string))
{
hiddenKeyword = Session["Keyword"].ToString();
}
}
catch { }
//reassigning outside of try catch because this variable is also used in
Javascript and giving error of using unassigned variable
var _rres = "";
try
{
if (System.Web.HttpContext.Current.Request != null &&
System.Web.HttpContext.Current.Request.Url != null && UriPartial.Path.ToString() !=
null)
{
_rres =
System.Web.HttpContext.Current.Request.Url.GetLeftPart(UriPartial.Path);
_rres = _rres.ToLower();
}
}
catch
{
}
}
@section ViewSpecificStyles
{
@Styles.Render("~/Content/Responsive-css-hint.css")
<link href="/Content/Responsive/css/print.css" rel="stylesheet" type="text/css"
media="print">
<link href="/Content/Responsive/css/easy-responsive-tabs.css" rel="stylesheet"
type="text/css">
<link rel="canonical" href="@Utility.GetCanonicalUrl(_rres,
Convert.ToInt32(resortid), "resort")" />
}
@section ViewSpecificScripts
{
<script async src="/Content/Responsive/js/jquery.cycle2.min.js"></script>
<script async defer
src="/Content/Responsive/js/easyResponsiveTabs.min.js"></script>
<script>
if ($(window).width() >= 767) { //new pos
$(document).find('.resort_info .MOBdis').remove();
}
else if ($(window).width() < 767) {
$('#mobile_description').css('display', 'block');
$('#desktop_description').css('display', 'none');
$(document).find('.resort_info .DeskDis').remove();
}
</script>
}
<style>
.btn-shadow.active {background-color: #e59808 !important;}
.btn-shadow.active span.arrows-bg {background-color: #e59808;}
.resort-pages {
margin-top: 3rem;
margin-bottom: 50px;
}
.gray-box {
background-color: #f1f1f1;
border: 1px solid #d3d3d3;
padding: 30px;
}
.temp {
height: 501px;
display: flex;
align-items: center;
justify-content: center;
background-image: url("/Content/Responsive/images/gray-border-bg.webp");
background-repeat: no-repeat;
background-size: 100% 100%;
}
.temp img {
width: 420px;
height: 240px;
outline: 2px solid #cecece;
border: 10px solid #fff;
}
.btn-shadow {
outline: 0;
height: 80px;
color: #fff;
letter-spacing: 0;
margin-bottom: 40px;
border-radius: 0;
font-size: 20px;
text-transform: uppercase;
transition: letter-spacing 0.5s;
display: flex;
align-items: center;
background-color: #0d6efd;
border: 0;
text-align: left;
}
.btn-shadow:hover {
outline: 0;
height: 80px;
color: #fff;
letter-spacing: 1.7px;
margin-bottom: 40px;
border-radius: 0;
transition: letter-spacing 0.5s;
background-color: #0d6efd;
border-radius: 0;
border: 0;
}
.btn-shadow span.arrows-bg,
.btn-shadow:hover span.arrows-bg {
background-color: #0554c9;
letter-spacing: 0;
transition: unset;
padding: 20px;
margin-right: 15px;
}
.btn-shadow:last-child {
margin-bottom: 0;
background-color: #f4b030;
}
.btn-shadow:last-child span.arrows-bg {
background-color: #e59808;
}
#resort-details-tab {
width: 100%;
border-radius: 0px;
height: 60px;
}
li.nav-item button.nav-link:hover {
border-color: transparent;
}
.add_tab_bar ul.search-container {
margin-bottom: -1px;
}
#myTabContent {
border: 2px solid #2349a3;
border-top: none;
padding: 20px;
float: left;
width: 100%;
}
button.nav-link, button.nav-link:hover {
color: #fff;
}
ul.add_item_list {
width: 100%;
list-style: none;
float: left;
margin-bottom: 20px;
padding-left: 0;
}
li.tick_icon {
background:url(/Content/Responsive/images/tick_icon.png) left 8px no-
repeat;
}
ul.add_item_list li {
float: left;
width: 25%;
margin-bottom: 7px;
text-indent: 25px;
}
.add_tab_bar .tab3 {
margin-top: 3rem !important;
padding:4px 0% 0px;
}
.add_tab_bar .tab3 li {
width: 30%;
padding: 0px !important;
font-weight: 600;
font-size: 18px;
cursor: pointer;
}
.tab-pane h4{margin-bottom:0px;}
.btn-shadow:last-child span.arrows-bg {
background-color: #e59808;
}
.review {
background-color: #edeff6;
padding-top: 50px;
padding-bottom: 50px;
border-bottom: 1px solid #d3e3fd;
}
</div>
</div>
<div class="col-lg-5 col-md-5 col-sm-12 col-xs-12">
<div class="gray-box">
@if (!string.IsNullOrEmpty(Model.ResortModel.CmsSellPageAlt) &&
!string.IsNullOrEmpty(Model.ResortModel.CmsSellPageAnchor) && !
string.IsNullOrEmpty(Model.ResortModel.CmsSellPageLink))
{
<a href="@Model.ResortModel.CmsSellPageLink" class="btn
btn-shadow p-0 w-100">
<span class="arrows-bg" aria-hidden="true"><img
src="~/Content/Responsive/images/btn-arrows.webp" border="0" width="53" height="39"
alt="@Model.ResortModel.CmsSellPageAlt"
title="@Model.ResortModel.CmsSellPageAlt\" /></span>
<div class="w-
100">@Model.ResortModel.CmsSellPageAnchor</div>
</a>
}
else
{
<a href="https://www.buyatimeshare.com/sell-timeshare.asp"
class="btn btn-shadow p-0 w-100">
<span class="arrows-bg" aria-hidden="true"><img
src="~/Content/Responsive/images/btn-arrows.webp" border="0" width="53" height="39"
alt="Sell @Model.ResortModel.Resort.Name timeshare" title="Sell
@Model.ResortModel.Resort.Name timeshare" /></span>
<div class="w-100">Sell Your Timeshare</div>
</a>
}
@if ((Model.NewLinkedResort != null) &&
(Model.NewLinkedResort.Count > 0))
{
<a href="@Html.ResortFriendlyURL(Model.NewLinkedResort[1],
"for-sale")" class="btn btn-shadow p-0 w-100">
<span class="arrows-bg" aria-hidden="true"><img
src="~/Content/Responsive/images/btn-arrows.webp" border="0" width="53" height="39"
alt="For Sale Image" title="For Sale Image" /></span>
<div class="w-100">Timeshares for Sale</div>
</a>
<a href="@Html.ResortFriendlyURL(Model.NewLinkedResort[1],
"for-rent")" class="btn btn-shadow p-0 w-100">
<span class="arrows-bg" aria-hidden="true"><img
src="~/Content/Responsive/images/btn-arrows.webp" border="0" width="53" height="39"
alt="For Rent Image" title="For Rent Image" /></span>
<div class="w-100">Timeshares for Rent</div>
</a>
<a href="#" class="btn btn-shadow p-0 w-100 getPalert">
<span class="arrows-bg" aria-hidden="true"><img
src="~/Content/Responsive/images/btn-arrows.webp" border="0" width="53" height="39"
/></span>
<div class="w-100">Get Price Alerts</div>
</a>
}
else
{
<a
href="@Html.ResortFriendlyURL(Model.ResortModel.Resort.Name, "for-sale")"
class="btn btn-shadow p-0 w-100">
<span class="arrows-bg" aria-hidden="true"><img
src="~/Content/Responsive/images/btn-arrows.webp" border="0" width="53" height="39"
alt="For Sale Image" title="For Sale Image" /></span>
<div class="w-100">Timeshares for Sale</div>
</a>
<a
href="@Html.ResortFriendlyURL(Model.ResortModel.Resort.Name, "for-rent")"
class="btn btn-shadow p-0 w-100">
<span class="arrows-bg" aria-hidden="true"><img
src="~/Content/Responsive/images/btn-arrows.webp" border="0" width="53" height="39"
alt="For Rent Image" title="For Rent Image" /></span>
<div class="w-100">Timeshares for Rent</div>
</a>
<a href="#" class="btn btn-shadow p-0 w-100 getPalert">
<span class="arrows-bg" aria-hidden="true"><img
src="~/Content/Responsive/images/btn-arrows.webp" border="0" width="53" height="39"
/></span>
<div class="w-100">Get Price Alerts</div>
</a>
}
@if (@Model.ResortModel.Resort.IsVacationClub == 1)
{
if ((Model.NewLinkedResort != null) &&
(Model.NewLinkedResort.Count > 0))
{
<a
href="@Html.ParticipatingResortsFriendlyURL(Model.NewLinkedResort[1])"
class="search_blue_bg"><span><img class="participating-icon" style="margin-
right:20px;" alt="Resort Image"
src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAYAQMAAADAhU81AAAAA1BMVEX/
//+nxBvIAAAAAXRSTlMAQObYZgAAAAxJREFUeNpjYKAtAAAAYAAB2E7biwAAAABJRU5ErkJggg==">
Participating Resorts</span></a>
}
else
{
<a
href="@Html.ParticipatingResortsFriendlyURL(Model.ResortModel.Resort.Name)"
class="search_blue_bg"><span><img class="participating-icon" style="margin-
right:20px;" alt="Resort Image"
src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAYAQMAAADAhU81AAAAA1BMVEX/
//+nxBvIAAAAAXRSTlMAQObYZgAAAAxJREFUeNpjYKAtAAAAYAAB2E7biwAAAABJRU5ErkJggg==">
Participating Resorts</span></a>
}
}
@if ((DomainSettings.MultiOfferLimitWithAccount > 0 &&
DomainSettings.MultiOfferLimitWithoutAccount > 0) ||
(DomainSettings.MultiOfferLimitWithoutAccount == 0 &&
DomainSettings.MultiOfferLimitWithAccount > 0 && Session["UserAccountID"] != null)
||
(DomainSettings.MultiOfferLimitWithoutAccount > 0
&& DomainSettings.MultiOfferLimitWithAccount == 0))
{
if ((Model.NewLinkedResort != null) &&
(Model.NewLinkedResort.Count > 0))
{
<a
href="/offer/makemultioffer/@Model.NewLinkedResort[0]/popup" rel="noindex,
nofollow" data-value="@Model.NewLinkedResort[1]" data-company="True" class="btn
btn-shadow active p-0 w-100 offer" id="smart_offer">
<span class="arrows-bg" aria-hidden="true"><img
src="~/Content/Responsive/images/btn-arrows.webp" border="0" width="53" height="39"
alt="Make Offer" title="Make Offer" /></span>
<div class="w-100">Make Offer</div>
</a>
}
else
{
<a
href="/offer/makemultioffer/@Model.ResortModel.Resort.ResortId/popup" rel="noindex,
nofollow" data-value="@Model.ResortModel.Resort.ResortId" data-company="True"
class="btn btn-shadow active p-0 w-100 offer" id="smart_offer">
<span class="arrows-bg" aria-hidden="true"><img
src="~/Content/Responsive/images/btn-arrows.webp" border="0" width="53" height="39"
alt="Make Offer" title="Make Offer" /></span>
<div class="w-100">Make Offer</div>
</a>
}
}
<div id="overlay_no_ad"></div>
</div>
</div>
}>
<li class="nav-item" role="presentation" onclick="ga('send',
'event', 'Tabbed Content', 'Resort Details');">
<button class="nav-link active" id="resort-details-tab"
data-bs-toggle="tab" data-bs-target="#resort-details" type="button" role="tab"
aria-controls="resort-details" aria-selected="true">Resort Details</button>
</li>
<li class="nav-item" role="presentation" onclick="ga('send',
'event', 'Tabbed Content', 'Check In');">
<button class="nav-link" id="resort-details-tab" data-bs-
toggle="tab" data-bs-target="#check-in" type="button" role="tab" aria-
controls="check-in" aria-selected="false">Check in</button>
</li>
@if (Model.GetAreaEvent != null)
{
<li class="nav-item" role="presentation"
onclick="ga('send', 'event', 'Tabbed Content', 'Timeshare Events');">
<button class="nav-link" id="resort-details-tab" data-
bs-toggle="tab" data-bs-target="#timeshare-events" type="button" role="tab" aria-
controls="timeshare-events" aria-selected="false">Timeshare Events</button>
</li>
}
@if (Model.GetAreaAttraction != null)
{
<li class="nav-item" role="presentation"
onclick="ga('send', 'event', 'Tabbed Content', 'Attractions');">
<button class="nav-link" id="resort-details-tab" data-
bs-toggle="tab" data-bs-target="#attractions" type="button" role="tab" aria-
controls="attractions" aria-selected="false">Attractions</button>
</li>
}
@if (Model.ResortModel.ComapanyLinks != null)
{
<li class="nav-item" role="presentation"
onclick="ga('send', 'event', 'Tabbed Content', 'See Also');">
<button class="nav-link" id="resort-details-tab" data-
bs-toggle="tab" data-bs-target="#see-also" type="button" role="tab" aria-
controls="see-also" aria-selected="false">Attractions</button>
</li>
}
</ul>
</ul>
</div>
<div class="tab-pane fade" id="check-in" role="tabpanel" aria-
labelledby="check-in-tab">
@if (!
string.IsNullOrEmpty(Convert.ToString(@Model.ResortModel.Resort.CheckInDate)) || !
string.IsNullOrEmpty(Convert.ToString(@Model.ResortModel.Resort.CheckInTime)))
{
<p><strong>Days:</strong>
@Model.ResortModel.Resort.CheckInDate / <strong>Time:</strong>
@Model.ResortModel.Resort.CheckInTime</p>
}
else
{
<p>Check-in is not available against this resort.</p>
}
</div>
@if (Model.GetAreaEvent != null)
{
<div class="tab-pane fade" id="attractions" role="tabpanel"
aria-labelledby="get-area-event-tab">
<h5>Timeshare Events </h5>
@{ try { Html.RenderPartial(ViewService.View("Resort",
"ResortEventWithDistance"), ResortEventWithDistanceModel); }
catch { } }
</div>
}
@if (Model.GetAreaAttraction != null)
{
<div class="tab-pane fade" id="attractions" role="tabpanel"
aria-labelledby="get-area-event-tab">
<h5>@Html.ActionLink(Model.ResortModel.Resort.Name,
"Attraction", "Resort", new { id = Model.ResortModel.Resort.ResortId }, new { rel =
"nofollow" })</h5>
@{ try { Html.RenderPartial(ViewService.View("Resort",
"ResortZipWithDistance"), ResortZipWithDistance); }
catch { }}
</div>
}
@if (Model.ResortModel.ComapanyLinks != null)
{
<div class="step5">
<ul class="add_item_list">
@* // SEE ALSO (LINKS)*@
@if (!
string.IsNullOrEmpty(@Model.ResortModel.ComapanyLinks.Link1) && !
string.IsNullOrEmpty(@Model.ResortModel.ComapanyLinks.Anchor1)
&& !
(@Model.ResortModel.ComapanyLinks.Link1).Equals("NA") && !
(@Model.ResortModel.ComapanyLinks.Anchor1).Equals("NA"))
{
link = link + "<li><a href=\"" +
HttpUtility.UrlDecode(@Model.ResortModel.ComapanyLinks.Link1) + "\">" +
HttpUtility.UrlDecode(@Model.ResortModel.ComapanyLinks.Anchor1) + "</a></li>";
}
@if (!
string.IsNullOrEmpty(@Model.ResortModel.ComapanyLinks.Link2) && !
string.IsNullOrEmpty(@Model.ResortModel.ComapanyLinks.Anchor2)
&& !
(@Model.ResortModel.ComapanyLinks.Link1).Equals("NA") && !
(@Model.ResortModel.ComapanyLinks.Anchor1).Equals("NA"))
{
link = link + "<li><a href=\"" +
HttpUtility.UrlDecode(@Model.ResortModel.ComapanyLinks.Link2) + "\">" +
HttpUtility.UrlDecode(@Model.ResortModel.ComapanyLinks.Anchor2) + "</a></li>";
}
@if (!
string.IsNullOrEmpty(@Model.ResortModel.ComapanyLinks.Link3) && !
string.IsNullOrEmpty(@Model.ResortModel.ComapanyLinks.Anchor3)
&& !
(@Model.ResortModel.ComapanyLinks.Link3).Equals("NA") && !
(@Model.ResortModel.ComapanyLinks.Anchor3).Equals("NA"))
{
link = link + "<li><a href=\"" +
HttpUtility.UrlDecode(@Model.ResortModel.ComapanyLinks.Link3) + "\">" +
HttpUtility.UrlDecode(@Model.ResortModel.ComapanyLinks.Anchor3) + "</a></li>";
}
@if (!
string.IsNullOrEmpty(@Model.ResortModel.ComapanyLinks.Link4) && !
string.IsNullOrEmpty(@Model.ResortModel.ComapanyLinks.Anchor4)
&& !
(@Model.ResortModel.ComapanyLinks.Link4).Equals("NA") && !
(@Model.ResortModel.ComapanyLinks.Anchor4).Equals("NA"))
{
link = link + "<li><a href=\"" +
HttpUtility.UrlDecode(@Model.ResortModel.ComapanyLinks.Link4) + "\">" +
HttpUtility.UrlDecode(@Model.ResortModel.ComapanyLinks.Anchor4) + "</a></li>";
}
@if (!
string.IsNullOrEmpty(@Model.ResortModel.ComapanyLinks.Link5) && !
string.IsNullOrEmpty(@Model.ResortModel.ComapanyLinks.Anchor5)
&& !
(@Model.ResortModel.ComapanyLinks.Link5).Equals("NA") && !
(@Model.ResortModel.ComapanyLinks.Anchor5).Equals("NA"))
{
link = link + "<li><a href=\"" +
HttpUtility.UrlDecode(@Model.ResortModel.ComapanyLinks.Link5) + "\">" +
HttpUtility.UrlDecode(@Model.ResortModel.ComapanyLinks.Anchor5) + "</a></li>";
}
@if (!
string.IsNullOrEmpty(@Model.ResortModel.ComapanyLinks.Link6) && !
string.IsNullOrEmpty(@Model.ResortModel.ComapanyLinks.Anchor6)
&& !
(@Model.ResortModel.ComapanyLinks.Link6).Equals("NA") && !
(@Model.ResortModel.ComapanyLinks.Anchor6).Equals("NA"))
{
link = link + "<li><a href=\"" +
HttpUtility.UrlDecode(@Model.ResortModel.ComapanyLinks.Link6) + "\">" +
HttpUtility.UrlDecode(@Model.ResortModel.ComapanyLinks.Anchor6) + "</a></li>";
}
@if (!
string.IsNullOrEmpty(@Model.ResortModel.ComapanyLinks.Link7) && !
string.IsNullOrEmpty(@Model.ResortModel.ComapanyLinks.Anchor7)
&& !
(@Model.ResortModel.ComapanyLinks.Link7).Equals("NA") && !
(@Model.ResortModel.ComapanyLinks.Anchor7).Equals("NA"))
{
link = link + "<li><a href=\"" +
HttpUtility.UrlDecode(@Model.ResortModel.ComapanyLinks.Link7) + "\">" +
HttpUtility.UrlDecode(@Model.ResortModel.ComapanyLinks.Anchor7) + "</a></li>";
}
@if (!
string.IsNullOrEmpty(@Model.ResortModel.ComapanyLinks.Link8) && !
string.IsNullOrEmpty(@Model.ResortModel.ComapanyLinks.Anchor8)
&& !
(@Model.ResortModel.ComapanyLinks.Link8).Equals("NA") && !
(@Model.ResortModel.ComapanyLinks.Anchor8).Equals("NA"))
{
link = link + "<li><a href=\"" +
HttpUtility.UrlDecode(@Model.ResortModel.ComapanyLinks.Link8) + "\">" +
HttpUtility.UrlDecode(@Model.ResortModel.ComapanyLinks.Anchor8) + "</a></li>";
}
@if (!
string.IsNullOrEmpty(@Model.ResortModel.ComapanyLinks.Link9) && !
string.IsNullOrEmpty(@Model.ResortModel.ComapanyLinks.Anchor9)
&& !
(@Model.ResortModel.ComapanyLinks.Link9).Equals("NA") && !
(@Model.ResortModel.ComapanyLinks.Anchor9).Equals("NA"))
{
link = link + "<li><a href=\"" +
HttpUtility.UrlDecode(@Model.ResortModel.ComapanyLinks.Link9) + "\">" +
HttpUtility.UrlDecode(@Model.ResortModel.ComapanyLinks.Anchor9) + "</a></li>";
}
@if (!
string.IsNullOrEmpty(@Model.ResortModel.ComapanyLinks.Link10) && !
string.IsNullOrEmpty(@Model.ResortModel.ComapanyLinks.Anchor10)
&& !
(@Model.ResortModel.ComapanyLinks.Link10).Equals("NA") && !
(@Model.ResortModel.ComapanyLinks.Anchor10).Equals("NA"))
{
link = link + "<li><a href=\"" +
HttpUtility.UrlDecode(@Model.ResortModel.ComapanyLinks.Link10) + "\">" +
HttpUtility.UrlDecode(@Model.ResortModel.ComapanyLinks.Anchor10) + "</a></li>";
}
@if (!
string.IsNullOrEmpty(@Model.ResortModel.ComapanyLinks.Link11) && !
string.IsNullOrEmpty(@Model.ResortModel.ComapanyLinks.Anchor11)
&& !
(@Model.ResortModel.ComapanyLinks.Link11).Equals("NA") && !
(@Model.ResortModel.ComapanyLinks.Anchor11).Equals("NA"))
{
link = link + "<li><a href=\"" +
HttpUtility.UrlDecode(@Model.ResortModel.ComapanyLinks.Link11) + "\">" +
HttpUtility.UrlDecode(@Model.ResortModel.ComapanyLinks.Anchor11) + "</a></li>";
}
@if (!
string.IsNullOrEmpty(@Model.ResortModel.ComapanyLinks.Link12) && !
string.IsNullOrEmpty(@Model.ResortModel.ComapanyLinks.Anchor12)
&& !
(@Model.ResortModel.ComapanyLinks.Link12).Equals("NA") && !
(@Model.ResortModel.ComapanyLinks.Anchor12).Equals("NA"))
{
link = link + "<li><a href=\"" +
HttpUtility.UrlDecode(@Model.ResortModel.ComapanyLinks.Link12) + "\">" +
HttpUtility.UrlDecode(@Model.ResortModel.ComapanyLinks.Anchor12) + "</a></li>";
}
@if (!
string.IsNullOrEmpty(@Model.ResortModel.ComapanyLinks.Link13) && !
string.IsNullOrEmpty(@Model.ResortModel.ComapanyLinks.Anchor13)
&& !
(@Model.ResortModel.ComapanyLinks.Link13).Equals("NA") && !
(@Model.ResortModel.ComapanyLinks.Anchor13).Equals("NA"))
{
link = link + "<li><a href=\"" +
HttpUtility.UrlDecode(@Model.ResortModel.ComapanyLinks.Link13) + "\">" +
HttpUtility.UrlDecode(@Model.ResortModel.ComapanyLinks.Anchor13) + "</a></li>";
}
@if (!
string.IsNullOrEmpty(@Model.ResortModel.ComapanyLinks.Link14) && !
string.IsNullOrEmpty(@Model.ResortModel.ComapanyLinks.Anchor14)
&& !
(@Model.ResortModel.ComapanyLinks.Link14).Equals("NA") && !
(@Model.ResortModel.ComapanyLinks.Anchor14).Equals("NA"))
{
link = link + "<li><a href=\"" +
HttpUtility.UrlDecode(@Model.ResortModel.ComapanyLinks.Link14) + "\">" +
HttpUtility.UrlDecode(@Model.ResortModel.ComapanyLinks.Anchor14) + "</a></li>";
}
@if (!
string.IsNullOrEmpty(@Model.ResortModel.ComapanyLinks.Link15) && !
string.IsNullOrEmpty(@Model.ResortModel.ComapanyLinks.Anchor15)
&& !
(@Model.ResortModel.ComapanyLinks.Link15).Equals("NA") && !
(@Model.ResortModel.ComapanyLinks.Anchor15).Equals("NA"))
{
link = link + "<li><a href=\"" +
HttpUtility.UrlDecode(@Model.ResortModel.ComapanyLinks.Link15) + "\">" +
HttpUtility.UrlDecode(@Model.ResortModel.ComapanyLinks.Anchor15) + "</a></li>";
}
@if (!string.IsNullOrEmpty(link))
{
@Html.Raw(link)
}
</ul>
<div class="clear_all"></div>
</div>
}
</div>
</div>
</div>
</section>
<section class="container mt-5">
<div class="row villa_info">
<h2>Address & Map</h2>
<div class="border_around">
<ul class="resort_address">
<li>
<img class="ad-address-icon" alt="Resort Image"
style="width:30px;height:30px;"
src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeAQMAAAAB/
jzhAAAAA1BMVEX///
+nxBvIAAAAAXRSTlMAQObYZgAAAAxJREFUeNpjYBiMAAAAlgABjcjBIQAAAABJRU5ErkJggg==">
@{
var tmpAddresses =
ResortService.GetResortAddress(Model.ResortModel.Resort.Address1,
Model.ResortModel.Resort.Address2, Model.ResortModel.Resort.City,
Model.ResortModel.StateName, Model.ResortModel.Resort.Zip,
Model.ResortModel.Resort.Country, Model.ResortModel.CountryName);
Address = tmpAddresses.Item2 ?? "";
}
@Html.Raw(tmpAddresses.Item1)
</li>
@if
(string.IsNullOrEmpty(Convert.ToString(@Model.ResortModel.Resort.Phone)) == false)
{
<li>
<img class="ad-address-icon" alt="Resort Image"
style="width:30px;height:30px;"
src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAYAAAA7MK6iAAAAGXRFWHRT
b2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyFpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/
eHBhY2tldCBiZWdpbj0i77u/
IiBpZD0i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DHUUFhDZ7AebQsorQlmio0L46wHYJJ1COOIAO1octGioEjhidAIpRV1GTKwBOs
jbFQqcIKWen6EObdcmhLTUS4EsObS+YvGId/hVgAGQ39uvAdwsCAAAAAElFTkSuQmCC">
<a onclick="ga('send', 'event', 'Phone Numbers',
'@Model.ResortModel.Resort.Phone');" href="tel:
[email protected](Model.ResortModel.Resort.Phone, true,
true)">@Model.ResortModel.Resort.Phone</a>
</li>
}
@{ Website =
Convert.ToString(@Model.ResortModel.Resort.Website);}
@if (!string.IsNullOrEmpty(Website))
{
try { displaywebsite = new System.Uri(Website).Host; }
catch (Exception)
{
displaywebsite = Website;
}
if (Website.IndexOf("https://") != -1 ||
Website.IndexOf("http://") != -1)
{
<li>
<img class="ad-link-icon"
style="width:30px;height:30px;" alt="Resort Image"
src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeAQMAAAAB/
jzhAAAAA1BMVEX///
+nxBvIAAAAAXRSTlMAQObYZgAAAAxJREFUeNpjYBiMAAAAlgABjcjBIQAAAABJRU5ErkJggg==">
<a onclick="ga('send', 'event', 'Off Site Links',
'@Website');" href="@Website" target="_blank" rel="nofollow">@displaywebsite</a>
</li>
}
else
{
<li>
<img class="ad-link-icon"
style="width:30px;height:30px;" alt="Resort Image"
src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeAQMAAAAB/
jzhAAAAA1BMVEX///
+nxBvIAAAAAXRSTlMAQObYZgAAAAxJREFUeNpjYBiMAAAAlgABjcjBIQAAAABJRU5ErkJggg==">
<a onclick="ga('send', 'event', 'Off Site Links',
'@Website');" href="https://@Website" target="_blank"
rel="nofollow">@displaywebsite</a>
</li>
}
}
</ul>
<div class="row map" id="map-canvas" style="height: 300px; width:
100%"></div>
</div>
</div>
</section>
@*<section class="container-fluid review">
<div class="container">
<h2>Reviews</h2>
<div class="row">
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
@if (DomainService.ReviewsEnabled())
{
<div id="rest_starcontent" class="row villa_info review_wrap">
@if (Model.reviews.Count != 0)
{
<div class="row">
<div class="border_around">
@{ try
{ Html.RenderPartial(ViewService.View("Resort", "_Reviews_V1"), ResortReview); }
catch { }}
</div>
</div>
}
else
{
<div class="row">
<div class="write_review_btn btn_one xo-b-case">
@Html.ActionLink("Review This Resort",
"addreview", "users", new { id = resortid }, new { @class = "btn search_blue_bg" })
</div>
</div>
}
</div>
}
</div>
</div>
</div>
</section>*@
@*<section class="container-fluid review mt-5">
<div class="container">
@if (DomainService.ReviewsEnabled())
{
<div id="rest_starcontent" class="row villa_info review_wrap">
@if (Model.reviews.Count != 0)
{
<div class="row">
<h2>Reviews</h2>
<div class="border_around">
@{ try
{ Html.RenderPartial(ViewService.View("Resort", "_Reviews_V1"), ResortReview); }
catch { }}
</div>
</div>
}
else
{
<div class="row">
<div class="write_review_btn btn_one xo-b-case">
@Html.ActionLink("Review This Resort", "addreview",
"users", new { id = resortid }, new { @class = "btn search_blue_bg" })
</div>
</div>
}
</div>
}
</div>
</section>*@
}
<script type="text/javascript">
$(document).ready(function () {
DisplayImage();
bat.cms.getModuleData('@Model.PageId', '@Model.TemplateId', '5',
'@(Model.ResortModel == null ? 0 : Model.ResortModel.Resort.ResortId)', '0',
'@Model.CompanyId', '@hiddenSource', '@hiddenCampaign', '@hiddenAdGroup',
'@hiddenKeyword', $("#newPropForSale"), false);
$("#SearchButton").click(function () {
//debugger;
var hasError = false;
var searchVal = $("#KeywordSearch").val();
if (searchVal == "") {
bat.common.toastr.error("Please enter a search term")
hasError = true;
}
if (hasError == true) { return false; }
});
bat.search.Search_DropDown();
$('#Distance option:contains("10 Miles")').prop('selected', true);
//old pos
function sideBarTop() {
if ($(".first-sidebar .right_penal").length > 0) {
$(".first-sidebar").css("display", "table");
$('#mobile_description').css('display', 'table-footer-group');
} else {
$(".first-sidebar").css("display", "block");
}
}
if ($(document).width() < 769) {
sideBarTop();
}
var imgUrl = "@resortLargePicURl";
setTimeout(function () {
$(".img-lazyload").each(function () {
var image_id = $(this).attr('data-src');
if (image_id != '')
$(this).attr("src", image_id);
});
}, 400); //3500
$(".getPalert").on('click', function() { //new price alert popup
$(".NewAlert").css('display', 'block');
$(".NewAlert1").css('z-index', '999999999 !important');
$('#overlay_no_ad').fadeIn(300); //blackout other area!
$('html, body').animate({ scrollTop: 0 }, 800); //not working!
return false;
});
//Added by Zarar for to show more content in Read More Button
$("#short_text_1").click(function() {
//$('#short_text_display_1').css('display', 'none');
$('#complete_text_1').css('display', 'block');
var target = $(this.getAttribute('href'));
if (target.length) {
event.preventDefault();
$('html, body').stop().animate({
scrollTop: target.offset().top
}, 1000);
}
return false;
});
$("#short_text_2").click(function() { //road more
$('#complete_text_2').css('display', 'block');
var target = $(this.getAttribute('href'));
if (target.length) {
event.preventDefault();
$('html, body').stop().animate({
scrollTop: target.offset().top
}, 1000);
}
return false;
});
setTimeout(function() {
try {
bat.common.init.easyResponsiveTabs($('#ad_tab'), 'default', 'auto',
true, 'accordion', function(event) {
var $tab = $(this);
var $info = $('#tabInfo');
var $name = $('span', $info);
$name.text($tab.text());
$info.show();
});
} catch (e) { }
$('.Email').magnificPopup({
type: 'iframe',
iframe: {
markup: '<div class="mfp-iframe-scaler customError">' +
'<div class="mfp-close"></div>' +
'<iframe class="mfp-iframe" frameborder="0"
allowfullscreen></iframe>' +
'</div>'
}
});
}, 10000); //20000
//Scroll(Animate) to target div on Click event, Added by team.
$("#Star_Button").on('click', function() {
$('html, body').animate({
scrollTop: $("#rest_starcontent").offset().top
}, 2000);
});
}); //ready
var oneTime = false;
$(window).scroll(function() {
var scrollTop = $(window).scrollTop();
var $results = $("#map-canvas");
if (scrollTop + $results.height() + $results.height() +
$results.height()/2/*+ $(".resort_detail").height()*/ >= $results.offset().top
/*.height()*/) {
if (!oneTime) {
$.getScript("https://maps.googleapis.com/maps/api/js?
v=3.exp&sensor=false&key=AIzaSyDUpgNILQ1Z4QbrF76vtOTFl8R4X3q_Xjo&libraries=places",
function(data, textStatus, jqxhr) { //do $.post or other things!
@if (Model.ResortModel != null &&
Model.ResortModel.Resort.IsMapCoord == 1)
{
<text>bat.common.init.Google.Geocoder.initialize('map-
canvas', "@Address", 14, @(Model.ResortModel.Resort.Coordinates != null ?
Model.ResortModel.Resort.Coordinates.Split(',')[0] : ""),
@((Model.ResortModel.Resort.Coordinates != null &&
Model.ResortModel.Resort.Coordinates.Split(',').Count() > 1) ?
Model.ResortModel.Resort.Coordinates.Split(',')[1] : ""));</text>
}
else
{
<text>bat.common.init.Google.Geocoder.initialize('map-
canvas', "@Address", 14);</text>
}
});
oneTime = true;
}
}
});
var currentuser = '@Session["UserAccountID"]';
var multi_offer_limit_without_account =
'@DomainSettings.MultiOfferLimitWithoutAccount';
if (currentuser == "" && multi_offer_limit_without_account == 0) {
setTimeout(function() {
$('.offer').magnificPopup({
type: 'iframe',
iframe: {
markup: '<div class="mfp-iframe-scaler your-special-css-
class">' +
'<div class="mfp-close"></div>' +
'<iframe class="mfp-iframe" frameborder="0"
allowfullscreen></iframe>' +
'</div>'
}
});
}, 8000);
}
function DisplayImage() {
var ResortId = '@resortid';
$.ajax({
url: '/Resort/LazyLoadResortImages',
data: { 'id' : ResortId },
dataType: 'html',
success: function(response) {
$('#slider').html(response);
}
}).complete(function () {
setTimeout(function () {
bat.common.init.cycle($('#slider'), 'scrollHorz', 1000, 4000,
'.btn_next', '.btn_prev', '.slider_caption');
$('#slider').cycle('pause');
setTimeout(function () {
$("img.ImgResorts").each(function () { //lazy load, no ajax
call as image already present as 'data-src' attribute
var image_id = $(this).attr('src');
image_id = image_id.replace("/thumb/", "/detail/");
$(this).attr("src", image_id);
});
}, 3000);
}, 1000);
});
//},500);
}
</script>