﻿var popupsPath = "content/images/popups/";
var _showingCommercial = false;

function showFloorPlans(floor) {
    showPopupMask();
    showFloorPlan(floor);
}
function showCommercial(unit) {
    showPopupMask();
    showUnit(unit);
}
function showUnit(unit) {
    document.getElementById('cpopupContentImage').src = popupsPath + "cp" + unit + ".png";
    document.getElementById('cpopupFloorButton').src = popupsPath + "cb" + unit + ".jpg";
    showDetailsWindow("commercialViewer");
    _showingCommercial = true;
}
function showFloorPlan(floor) {
    document.getElementById('popupContentImage').src = popupsPath + "p" + floor + ".png";
    document.getElementById('popupFloorButton').src = popupsPath + "b" + floor + ".jpg";
    showDetailsWindow("floorViewer");
    _showingCommercial = false;
}
function hideAll() {
    if (!_showingCommercial)
        hideDetailWindow("floorViewer");
    else
        hideDetailWindow("commercialViewer");
}
$(function() {
    $("#floorViewer").hide();
});
$(function() {
    $("#commercialViewer").hide();
});
