(function() { var widgetID = 47939; var agentHeaderID = null; if (!widgetID) { alert('Invalid widget ID given.'); return false; } function widgetMainOut() { var widgetElement = idx('#idxwidgetsrc-47939'); // if it doesn't exist try getting it the old have via the src if (!widgetElement.size()) { var src = (!isNaN(widgetID)) ? 'customshowcasejs.php?widgetid=47939' : 'customshowcasejs.php'; widgetElement = idx('script[src*="'+src+'"]'); } var propc; var maincID = 'IDX-showcaseGallery-47939'; var mainc = idx('
').attr({'id': maincID, 'class': 'IDX-showcaseTable'}); widgetElement.after(mainc); var noPhotoUrl = "https://s3.amazonaws.com/clientphotos.idxbroker.com/customNoPhoto/customNoPhoto-16861"; idx('#'+maincID).before(''); var propr = idx('
').addClass('IDX-showcaseRow'); var aLink, imgUrl, img, thumbnail; aLink = idx(''); imgUrl = decodeURIComponent("https%3A%2F%2Fs3.amazonaws.com%2Fmlsphotos.idxbroker.com%2Fphotos%2F278c%2Fc872e5cc6eb27d4d1ea94b4fe69d29b4%2Fb022"); img = '2404 Belmont Blvd'; thumbnail = aLink.append(img); propc = idx('
').attr('class','IDX-showcaseCell') .append( idx('
').addClass('IDX-showcaseContainer').append(thumbnail ).append( idx('
').attr('class', 'IDX-showcaseListingID').html('2646652') ).append( idx('
').attr('class', 'IDX-showcaseAddress IDX-showcaseAddressElement').html('2404 Belmont Blvd') ).append( idx('
').attr({'class': 'IDX-showcaseCCZ', 'class': 'IDX-showcaseCityStateZip'}).append( idx('') .attr('class', 'IDX-showcaseAddressElement IDX-showcaseCity') .html('Nashville') ).append( idx('').attr('class','IDX-showcaseAddressElement IDX-showcaseComma1').text(', ') ).append( idx('') .attr('class','IDX-showcaseAddressElement IDX-showcaseState') .html('Tennessee ') ).append( idx('') .attr('class','IDX-showcaseAddressElement IDX-showcaseStateAbrv') .html('TN ') ).append( idx('') .attr('class','IDX-showcaseAddressElement IDX-showcaseZipcode') .html('') ) ).append( idx('
').attr('class','IDX-showcasePrice').html('$3,650,000') ).append( idx('
').attr('class', 'IDX-showcaseBeds').html('4 Bedrooms') ).append( idx('
').attr('class', 'IDX-showcaseBaths').html('7 Total Baths') ).append( idx('
').attr('class', 'IDX-showcaseFull').html('5 Full Baths') ).append( idx('
').attr('class', 'IDX-showcasePartial').html('2 Partial Baths') ).append( idx('
').attr('class', 'IDX-showcaseRemarks').html('Primely situated & Move In Ready on the most walka ... ') ).append( idx('
').attr('class', 'IDX-showcaseStatus').html('Active') ) ); propr.append(propc); aLink = idx(''); imgUrl = decodeURIComponent("https%3A%2F%2Fs3.amazonaws.com%2Fmlsphotos.idxbroker.com%2Fphotos%2F4902%2F20942f21f114a0293f8c37e0ca78f0b2%2Fb022"); img = '2156 Golf Club Ln'; thumbnail = aLink.append(img); propc = idx('
').attr('class','IDX-showcaseCell') .append( idx('
').addClass('IDX-showcaseContainer').append(thumbnail ).append( idx('
').attr('class', 'IDX-showcaseListingID').html('2637912') ).append( idx('
').attr('class', 'IDX-showcaseAddress IDX-showcaseAddressElement').html('2156 Golf Club Ln') ).append( idx('
').attr({'class': 'IDX-showcaseCCZ', 'class': 'IDX-showcaseCityStateZip'}).append( idx('') .attr('class', 'IDX-showcaseAddressElement IDX-showcaseCity') .html('Nashville') ).append( idx('').attr('class','IDX-showcaseAddressElement IDX-showcaseComma1').text(', ') ).append( idx('') .attr('class','IDX-showcaseAddressElement IDX-showcaseState') .html('Tennessee ') ).append( idx('') .attr('class','IDX-showcaseAddressElement IDX-showcaseStateAbrv') .html('TN ') ).append( idx('') .attr('class','IDX-showcaseAddressElement IDX-showcaseZipcode') .html('') ) ).append( idx('
').attr('class','IDX-showcasePrice').html('$3,295,000') ).append( idx('
').attr('class', 'IDX-showcaseBeds').html('4 Bedrooms') ).append( idx('
').attr('class', 'IDX-showcaseBaths').html('6 Total Baths') ).append( idx('
').attr('class', 'IDX-showcaseFull').html('5 Full Baths') ).append( idx('
').attr('class', 'IDX-showcasePartial').html('1 Partial Baths') ).append( idx('
').attr('class', 'IDX-showcaseRemarks').html('Would you love space for live in help, adult kids ... ') ).append( idx('
').attr('class', 'IDX-showcaseStatus').html('Active') ) ); propr.append(propc); aLink = idx(''); imgUrl = decodeURIComponent("https%3A%2F%2Fs3.amazonaws.com%2Fmlsphotos.idxbroker.com%2Fphotos%2Ffdbe%2Febdfdaf2200cab2fa7c2200565e78cf7%2Fb022"); img = '2600 Acklen Ave'; thumbnail = aLink.append(img); propc = idx('
').attr('class','IDX-showcaseCell') .append( idx('
').addClass('IDX-showcaseContainer').append(thumbnail ).append( idx('
').attr('class', 'IDX-showcaseListingID').html('2648182') ).append( idx('
').attr('class', 'IDX-showcaseAddress IDX-showcaseAddressElement').html('2600 Acklen Ave') ).append( idx('
').attr({'class': 'IDX-showcaseCCZ', 'class': 'IDX-showcaseCityStateZip'}).append( idx('') .attr('class', 'IDX-showcaseAddressElement IDX-showcaseCity') .html('Nashville') ).append( idx('').attr('class','IDX-showcaseAddressElement IDX-showcaseComma1').text(', ') ).append( idx('') .attr('class','IDX-showcaseAddressElement IDX-showcaseState') .html('Tennessee ') ).append( idx('') .attr('class','IDX-showcaseAddressElement IDX-showcaseStateAbrv') .html('TN ') ).append( idx('') .attr('class','IDX-showcaseAddressElement IDX-showcaseZipcode') .html('') ) ).append( idx('
').attr('class','IDX-showcasePrice').html('$2,750,000') ).append( idx('
').attr('class', 'IDX-showcaseBeds').html('5 Bedrooms') ).append( idx('
').attr('class', 'IDX-showcaseBaths').html('7 Total Baths') ).append( idx('
').attr('class', 'IDX-showcaseFull').html('5 Full Baths') ).append( idx('
').attr('class', 'IDX-showcasePartial').html('2 Partial Baths') ).append( idx('
').attr('class', 'IDX-showcaseRemarks').html('Sublime new construction in highly desirable Vande ... ') ).append( idx('
').attr('class', 'IDX-showcaseStatus').html('Active') ) ); propr.append(propc); if (propr.children().size()) { idx('#'+maincID).append(propr); } var gallery = idx("#IDX-showcaseGallery-47939"); var cells = idx("#IDX-showcaseGallery-47939 .IDX-showcaseCell"); var containers = idx('#IDX-showcaseGallery-47939 .IDX-showcaseContainer'); cells.css('box-sizing', 'border-box'); var galleryWidth = gallery.outerWidth(); var cells = idx('#IDX-showcaseGallery-47939 .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) { idx(function() { var widetSrc = widgetElement.attr('src'); if (widetSrc.match(/.+quicksearchjs\.php/)) { var quicksearchForm = idx('#IDX-quicksearchForm-47939'); 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=Zi2focNUt6CQSnZ@M@d-FQAAACQ'; 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(); } })();