document.write('');
document.write('
');
document.write('' + 's' + 'cript>');
document.write('' + 's' + 'cript>');
mobileIDX = "";
appLinkIphone = "";
appLinkAndroid = "";
domainName = "coldwellbankerbg.com";
$(document).ready(function(){
idxRedirect();
if ($(window).width() < 980){
$("#menu").hide();
$("").appendTo("#mobile-menu");
$("", {
"selected": "selected",
"value" : "",
"text" : "MOBILE MENU"
}).appendTo("#mobile-menu select");
$("#menu a").each(function() {
var item = $(this);
if (item.parent("#menu ul li ul li").length > 0)
{
$("", {
"value" : item.attr("href"),
"text" : " - "+item.text()
}).appendTo("#mobile-menu select");
}
else
{
$("", {
"value" : item.attr("href"),
"text" : item.text()
}).appendTo("#mobile-menu select");
}
});
}
if ($(window).width() >= 980)
{
$("#menu").show();
$("#mobile-menu").hide();
}
$("#mobile-menu").on('change', 'select', function(){
var value = $(this).val();
window.location.href= value;
});
//Mobile Content Scale
$("#secondary-body-content-wrapper img, #secondary-body-content-wrapper iframe, #secondary-body-content-wrapper table").filter(function()
{
var temp_this = $(this);
var temp_true_width = $(this).width();
var temp_true_height = $(this).height();
var temp_aspectRatio = temp_true_height / temp_true_width;
$(temp_this).attr('data-width', temp_true_width);
$(temp_this).attr('data-height', temp_true_height);
$(temp_this).attr('data-aspectRatio', temp_aspectRatio);
if(temp_true_width > $("#secondary-body-content-wrapper").width())
{
$(temp_this).css("width", "100%");
$(temp_this).css("height", "auto");
}
var temp_width = $(this).width();
var temp_adjusted_height = temp_aspectRatio * temp_width;
if(temp_width < temp_true_width || $(temp_this).is("iframe"))
{
$(temp_this).css("height", temp_adjusted_height);
}
});
});
$(window).resize(function(){
idxRedirect();
if ($(window).width() < 980){
$("#menu").hide();
$("#mobile-menu").show();
}
if ($(window).width() >= 980)
{
$("#menu").show();
$("#mobile-menu").hide();
}
if($("#mobile-menu select").length < 1)
{
if ($(window).width() < 980){
$("").appendTo("#mobile-menu");
$("", {
"selected": "selected",
"value" : "",
"text" : "Go to..."
}).appendTo("#mobile-menu select");
$("#menu a").each(function() {
var item = $(this);
if (item.parent("#menu ul li ul li").length > 0)
{
$("", {
"value" : item.attr("href"),
"text" : " - "+item.text()
}).appendTo("#mobile-menu select");
}
else
{
$("", {
"value" : item.attr("href"),
"text" : item.text()
}).appendTo("#mobile-menu select");
}
});
}
}
//Mobile Content Scale
$("#secondary-body-content-wrapper img, #secondary-body-content-wrapper iframe, #secondary-body-content-wrapper table").filter(function(){
var temp_this = $(this);
var temp_width = $(temp_this).width();
if(temp_width > $("#secondary-body-content-wrapper").width())
{
$(temp_this).css("width", "100%");
$(temp_this).css("height", "auto");
}
var temp_width = $(temp_this).width();
var temp_true_width = $(temp_this).attr('data-width');
var temp_true_height = $(temp_this).attr('data-height');
var temp_aspectRatio = $(temp_this).attr('data-aspectRatio');
var temp_adjusted_height = temp_aspectRatio * temp_width;
if(temp_width > temp_true_width)
{
$(temp_this).css("width", temp_true_width);
}
if(temp_width > temp_true_width || $(temp_this).is("iframe"))
{
$(temp_this).css("height", temp_true_height);
}
if(temp_width < temp_true_width || $(temp_this).is("iframe"))
{
$(temp_this).css("height", temp_adjusted_height);
}
});
var desiredSize = $(window).height() - $("#menu-wrapper").outerHeight() - $("#header").outerHeight() - $("#footer-wrapper").outerHeight();
$("#secondary-body-content-wrapper").css("min-height", desiredSize);
});
$(document).ready(function(){
var desiredSize = $(window).height() - $("#menu-wrapper").outerHeight() - $("#header").outerHeight() - $("#footer-wrapper").outerHeight();
$("#secondary-body-content-wrapper").css("min-height", desiredSize);
});
document.write('