(function() {
var widgetID = 59993;
var agentHeaderID = null;
var clientLevel = 24;
if (!widgetID) {
alert('Invalid widget ID given.');
return false;
}
function widgetMainOut() {
var widgetElement = idx('#idxwidgetsrc-59993');
// if it doesn't exist try getting it the old have via the src
if (!widgetElement.size()) {
var src = (!isNaN(widgetID)) ? 'customshowcasejs.php?widgetid=59993' : 'customshowcasejs.php';
widgetElement = idx('script[src*="'+src+'"]');
}
var propc;
var maincID = 'IDX-showcaseGallery-59993';
var mainc = idx('').attr({'id': maincID, 'class': 'IDX-showcaseTable'});
widgetElement.after(mainc);
var noPhotoUrl = "https://s3.amazonaws.com/clientphotos.idxbroker.com/customNoPhoto/customNoPhoto-5642";
idx('#'+maincID).before('');
var propr = idx('').addClass('IDX-showcaseRow');
var aLink, imgUrl, img, thumbnail;
idx('#'+maincID).append(
idx('
No Properties Found
'
)
);
var gallery = idx("#IDX-showcaseGallery-59993");
var cells = idx("#IDX-showcaseGallery-59993 .IDX-showcaseCell");
var containers = idx('#IDX-showcaseGallery-59993 .IDX-showcaseContainer');
cells.css('box-sizing', 'border-box');
var galleryWidth = gallery.outerWidth();
var cells = idx('#IDX-showcaseGallery-59993 .IDX-showcaseRow .IDX-showcaseCell');
idx(window).resize(function() {
cells.find('.IDX-showcaseContainer').height('auto');
var heights = cells.map(function () {
return idx(this).outerHeight();
});
var maxHeight = Math.max.apply(null, heights);
cells.find('.IDX-showcaseContainer').height(maxHeight);
});
idx(window).trigger('resize');
if (agentHeaderID && clientLevel === 20) {
idx(function() {
var widetSrc = widgetElement.attr('src');
if (widetSrc.match(/.+quicksearchjs\.php/)) {
var quicksearchForm = idx('#IDX-quicksearchForm-59993');
quicksearchForm.append(idx('').attr({
type: 'hidden',
name: 'agentHeaderID',
value: agentHeaderID
}));
} else if (widetSrc.match(/.+leadloginwidget\.php/)) {
var leadLoginForm = idx('#IDX-widgetLeadLoginForm');
leadLoginForm.append(idx('').attr({
type: 'hidden',
name: 'agentHeaderID',
value: agentHeaderID
}));
} else if (widetSrc.match(/.+mapwidgetjs\.php/)) {
idx('#IDX-map-' + widgetID).on('click', 'a[href^="http"]', function (e) {
e.preventDefault();
var href = idx(e.target).attr('href');
if (href.match(/.+\?.+/)) {
href = href + '&agentHeaderID=' + agentHeaderID;
} else {
href = href + '?agentHeaderID=' + agentHeaderID;
}
window.location.href = href;
});
} else {
// carousel, showcase, and slideshow
var detailsLinks = idx('div[id*='+widgetID+']').find('a[href*=widgetReferer]');
detailsLinks.each(function(index, element) {
var originalLink = idx(element).attr('href');
idx(element).attr('href', originalLink + '&agentHeaderID=' + agentHeaderID );
});
}
});
}
}
// build a script tag with our version of jquery provided if it doesn't already exist
if (typeof idx == 'undefined') {
/**
* fake idx object to let other widgets know the first widget has inserted jqidx.js
* wait to jqwidx.js loaded, idx will be the jquery object.
*/
window.idx = {};
var jqsrc = '//d1qfrurkpai25r.cloudfront.net/graphical/javascript/jqwidx.js?auid=Xrq-rX8AAAEAABcsz6cAAAAI';
var idxjs = document.createElement('script');
idxjs.setAttribute('type','text/javascript');
idxjs.setAttribute('id','idx_jquery_include_tag');
idxjs.setAttribute('src',jqsrc);
// lets let IE in or he'll just sit outside and drink and cry
if (idxjs.readyState) {
idxjs.onreadystatechange = function () {
if (this.readyState == 'complete' || this.readyState == 'loaded') {
widgetMainOut();
}
};
}
// For gooder browsers
else {
idxjs.onload = widgetMainOut;
}
// for loading speed our best bet is to insert our jquery before the first script tag on their site since, at minimum,
// this widget is being loaded in a script tag, we know there's at least 1 in the document and we know for sure this
// will load before any version of jquery on their site so that we can sequester our version behind noConflict
var s1 = document.getElementsByTagName('script')[0];
s1.parentNode.insertBefore(idxjs, s1);
}
// if the idx jquert is loaded then we need to wait until the idx val is defined
else {
// wait to the first widget's idx jquery object loaded
var callWidgetOut = function () {
if (window.idx && window.idx.fn) {
widgetMainOut();
} else {
setTimeout(function() {
callWidgetOut();
}, 500);
}
};
callWidgetOut();
}
})();
Scroll To Top