(function() { var widgetID = 50493; var agentHeaderID = null; if (!widgetID) { alert('Invalid widget ID given.'); return false; } function widgetMainOut() { var widgetElement = idx('#idxwidgetsrc-50493'); // if it doesn't exist try getting it the old have via the src if (!widgetElement.size()) { var src = (!isNaN(widgetID)) ? 'customshowcasejs.php?widgetid=50493' : 'customshowcasejs.php'; widgetElement = idx('script[src*="'+src+'"]'); } var propc; var maincID = 'IDX-showcaseGallery-50493'; 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%2F3660%2F0663e29a51f36806730a3fb6bf89a703%2Fb022"); img = '1510 Demonbreun St 503'; thumbnail = aLink.append(img); propc = idx('
').attr('class','IDX-showcaseCell') .append( idx('
').addClass('IDX-showcaseContainer').append(thumbnail ).append( idx('
').attr('class', 'IDX-showcaseListingID').html('2647077') ).append( idx('
').attr('class', 'IDX-showcaseAddress IDX-showcaseAddressElement').html('1510 Demonbreun St 503') ).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('$599,000') ).append( idx('
').attr('class', 'IDX-showcaseBeds').html('1 Bedrooms') ).append( idx('
').attr('class', 'IDX-showcaseBaths').html('1 Total Baths') ).append( idx('
').attr('class', 'IDX-showcaseFull').html('1 Full Baths') ).append( idx('
').attr('class', 'IDX-showcasePartial').html('0 Partial Baths') ).append( idx('
').attr('class', 'IDX-showcaseRemarks').html('Fully remodeled and immaculate condo with new quar ... ') ).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%2Fc354%2F453cb8d09839400074c425a05cc86a9c%2Fb022"); img = '1510 Demonbreun St 1212'; thumbnail = aLink.append(img); propc = idx('
').attr('class','IDX-showcaseCell') .append( idx('
').addClass('IDX-showcaseContainer').append(thumbnail ).append( idx('
').attr('class', 'IDX-showcaseListingID').html('2645320') ).append( idx('
').attr('class', 'IDX-showcaseAddress IDX-showcaseAddressElement').html('1510 Demonbreun St 1212') ).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('$1,100,000') ).append( idx('
').attr('class', 'IDX-showcaseBeds').html('2 Bedrooms') ).append( idx('
').attr('class', 'IDX-showcaseBaths').html('2 Total Baths') ).append( idx('
').attr('class', 'IDX-showcaseFull').html('2 Full Baths') ).append( idx('
').attr('class', 'IDX-showcasePartial').html('0 Partial Baths') ).append( idx('
').attr('class', 'IDX-showcaseRemarks').html('This renovated unit comes with two primary bedroom ... ') ).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%2Fbe91%2F19eb827251dda0bcc375c86a7fe68f6b%2Fb022"); img = '1510 Demonbreun St 504'; thumbnail = aLink.append(img); propc = idx('
').attr('class','IDX-showcaseCell') .append( idx('
').addClass('IDX-showcaseContainer').append(thumbnail ).append( idx('
').attr('class', 'IDX-showcaseListingID').html('2642687') ).append( idx('
').attr('class', 'IDX-showcaseAddress IDX-showcaseAddressElement').html('1510 Demonbreun St 504') ).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,500') ).append( idx('
').attr('class', 'IDX-showcaseBeds').html('2 Bedrooms') ).append( idx('
').attr('class', 'IDX-showcaseBaths').html('2 Total Baths') ).append( idx('
').attr('class', 'IDX-showcaseFull').html('2 Full Baths') ).append( idx('
').attr('class', 'IDX-showcasePartial').html('0 Partial Baths') ).append( idx('
').attr('class', 'IDX-showcaseRemarks').html('Special leasing incentive: we\'re waiving May\'s ren ... ') ).append( idx('
').attr('class', 'IDX-showcaseStatus').html('Active') ) ); propr.append(propc); if (propr.children().size()) { idx('#'+maincID).append(propr); } var gallery = idx("#IDX-showcaseGallery-50493"); var cells = idx("#IDX-showcaseGallery-50493 .IDX-showcaseCell"); var containers = idx('#IDX-showcaseGallery-50493 .IDX-showcaseContainer'); cells.css('box-sizing', 'border-box'); var galleryWidth = gallery.outerWidth(); var cells = idx('#IDX-showcaseGallery-50493 .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-50493'); 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=ZjRMB1DbK6WiG375ehOSsQAAAAI'; 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(); } })();