<?php
// $INC_DIR2 = $_SERVER["DOCUMENT_ROOT"]. "/z/f/public/";

$year = date("Y");
?>
        </div><!-- closed the div started in header file -->
        <!--
        <div id="before-footer-1" class="before-footer">
            <div class="inner-overlay">
                <div class="container">
                    <section id="custom_html-5" class="widget_text widget">
                        <div class="widget_text widget-wrap">
                            <div class="textwidget custom-html-widget">
                                <div class="bf-subscribe-box">
                                    <h1>Stay in Touch</h1>
                                    <p>I am text block. Click edit button to change this text. Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
                                    <form>
                                        <input type="email" name="email">
                                        <input type="submit" value="Subscribe">
                                    </form>
                                </div>
                            </div>
                        </div>
                    </section>
                </div>
            </div>
        </div>
        -->
        <div class="footer-widgets">
            <div class="container">
                <div class="row">
                    <div class="footer-widget-area footer-widgets-1">
                        <div class="widget widget_custom_html">
                            <div class="widget-wrap">
                                <div class="footer-widget-about-sec">
                                    <!--<img src="/includes/images/markcansell-logo2.png" alt="Main Logo">-->
                                    <p class="center">Get a free Comparative Market Analysis and Marketing Plan for your home.</p>
                                    <p class="center"><a class="button" href="/cma/">Free CMA Search</a></p>
                                </div>
                                <!--
                                <div class="footer-widget-social-sec">
                                    <ul class="socials">
                                        <li><a href="#"><i class="fa fa-facebook"></i></a></li>
                                        <li><a href="#"><i class="fa fa-linkedin"></i></a></li>
                                        <li><a href="#"><i class="fa fa-pinterest"></i></a></li>
                                        <li><a href="#"><i class="fa fa-twitter"></i></a></li>
                                        <li><a href="#"><i class="fa fa-instagram"></i></a></li>
                                        <li><a href="#"><i class="fa fa-youtube"></i></a></li>
                                    </ul>
                                </div>-->
                            </div>
                        </div>
                    </div>
                    <div class="footer-widget-area footer-widgets-2">
                        <div class="widget widget_nav_menu">
                            <div class="widget-wrap">
                                <h4 class="widget-title">Navigation</h4>
                                <ul class="menu">
                                    <li class="menu-item"><a href="/z/calcs">Calculators</a></li>
                                    <li class="menu-item"><a href="/z/e/finding-a-loan-officer.php">Finding A Loan Officer</a></li>
                                    <li class="menu-item"><a href="/z/e/mortgage-glossary.php">Mortgage Glossary</a></li>
                                    <li class="menu-item"><a href="/z/e/the-loan-process.php">The Loan Process</a></li>
                                    <li class="menu-item"><a href="/z/h/metro-markets/">Metro Markets</a></li>
                                </ul>
                            </div>
                        </div>
                    </div>
                    <div class="footer-widget-area footer-widgets-3">
                        <div class="widget widget_text">
                            <div class="widget-wrap">
                                <h4 class="widget-title">Let's stay in touch...</h4>
                                <div class="footer-cb">
                                    <button class="button" onclick="div_show()">Contact Me</button>
                                </div>
                                <div id="popup-box" class="popup-box">
                                    <div class="inner">
                                        <iframe src="<?php echo $link;?>/footer-contact-form-page/" width="100%" height="880" frameborder="0" class="gfiframe child-iframe"></iframe>
                                        <script src="/wp-content/plugins/gravity-forms-iframe-develop/assets/scripts/gfembed.min.js" type="text/javascript"></script>
                                        <i id="close" class="fa fa-times close" onclick="div_hide()"></i>
                                    </div>
                                </div>
                                <script type="text/javascript">
                                    function div_show(){
                                        document.getElementById('popup-box').style.display = "block";
                                    }
                                    function div_hide(){
                                        document.getElementById('popup-box').style.display = "none";
                                    }
                                </script>
                            </div>
                        </div>
                    </div>
                </div>
                <!--
                <div class="copyright-act">
                    <p>Digital Millennium Copyright Act (DMCA) Notices: The Digital Millennium Copyright Act of 1998, 17 U.S.C. 512 (the "DMCA"), provides recourse for copyright owners who believe that material appearing on the Internet infringes their rights under U.S. copyright law. If you believe in good faith that any content or material made available in connection with our website or services infringes your copyright, you (or your agent) may send us a notice requesting that the content or material be removed, or access to it blocked. Notices and counter-notices should be sent in writing by mail to: Michael Bisping, Director of Customer Relations at Regional Multiple Listing Service of Minnesota, Inc., 2550 University Avenue West, Suite 259S, Saint Paul, MN 55114 or by email to mbisping@northstarmls.com.</p>
                    <p>The DMCA requires that your notice of alleged copyright infringement include the following information: (1) description of the copyrighted work that is the subject of claimed infringement; (2) description of the alleged infringing content and information sufficient to permit us to locate the content; (3) contact information for you, including your address, telephone number and e-mail address; (4) a statement by you that you have a good faith belief that the content in the manner complained of is not authorized by the copyright owner, or its agent, or by the operation of any law; (5) a statement by you, signed under penalty of perjury, that the information in the notification is accurate and that you have the authority to enforce the copyrights that are claimed to be infringed; and (6) a physical or electronic signature of the copyright owner or a person authorized to act on the copyright owner's behalf. Failure to include all of the above information may result in the delay of the processing of your complaint.</p>
                </div>-->
            </div>
        </div>
        <footer class="site-footer footer">
            <div class="container">
                <div class="copyright-cred-text">
                    <img src="/includes/images/icon-black-realtor-housing.png" alt="Realtor &amp; Housing"><br>Licensed In Minnesota<br><p class="cct-middle">All information deemed reliable but not guaranteed and should be independently verified.</p><p class="user-agreement">By searching you agree to the <a class="external-links" href="/eula/">end user license agreement</a>.</p><p class="user-agreement"><a class="external-links" href="/dmca/">DMCA Copyright Notice</a>.</p><p class="cct-bottom">Copyright
                    &copy;&nbsp;<?php echo $year;?> | <a href="https://mightyagent.com/">MSLLC</a></p>
                </div>
            </div>
        </footer>
<!--
<script src="/includes/js/jquery-1.9.1-min.js"></script>
<script src="/includes/js/responsive-menu.js"></script>
-->
<!--
<script type="text/javascript">
window.addEventListener('load', function() {
    //let message = { height: document.body.scrollHeight, width: document.body.scrollWidth };
    let message = { height: document.body.scrollHeight };
    // window.top refers to parent window
    window.top.postMessage(message, "*");
});
</script>
<script>
    let iframe = document.querySelector("#child-iframe");
    iframe.addEventListener('load', function() {
        setInterval(function() {
            iframe.style.height = iframe.contentDocument.body.scrollHeight + 'px';
            //iframe.style.width = iframe.contentDocument.body.scrollWidth + 'px';
        }, 500);
    }); 
</script>-->
<!-- FOR PROPERTY SLIDER ONLY -->
<script src="/includes/js/splide.min.js"></script>
<!-- PROPERTY SLIDER END -->

<!-- SEARCH FORM FOR M -->
<script src="/includes/js/jquery-ui.js"></script>
<script src="/includes/js/suggest.js?v=1.0.1"></script>
<!-- SEARCH FORM FOR M END -->

<script type="text/javascript">
    $(document).ready(function(){
        var listingID = $("#propertyId").val();
        if(listingID){
            $([document.documentElement, document.body]).animate({
                scrollTop: $("#"+listingID).offset().top
            }, 2000);
        }
        
        var isInIFrame = (window.location != window.parent.location);
        if(isInIFrame==true){
            $('.top-bar').css({"display": "none"});
            $('.site-header').css({"display": "none"});
            $('.nav-primary').css({"display": "none"});
            $('#mobile-main-nav').css({"display": "none"});
            $('#main-nav').css({"display": "none"});
            $('.before-footer').css({"display": "none"});
            $('.footer-widgets').css({"display": "none"});
            $('.site-footer').css({"display": "none"});
            $('.modal').css({"top": "auto"});
            $('.page').css({"padding": "0"});
            $('.container').css({"padding": "0"});
            $('.content-full-width .sidebar').css({"display": "none"});
            $('.pl-number-of-items').css({"display": "none"});
            $('.pagination-box').css({"display": "none"});
            $('.pl-result-content').css({"margin": "0 auto","border": "none"});
            $('.gform_confirmation_message').css({"font-size": "20px !important","line-height": "1.4 !important","text-align": "center !important"});
            //$('.gform_button').css({"padding": "12px 24px !important","font-size": "16px !important","line-height": "1 !important","background-color": "#232323 !important","color": "#fff !important","margin": "0 !important"});

        }
    });
</script>
<!-- FOR PROPERTY SEARCH BAR ONLY - FOR INDEX PAGE -->
<?php
$staticSearch  = chop($current_page,".php");
$staticSearch = substr($staticSearch, 0, -1);
if($staticSearch == 'static-results' || $staticSearch == 'static-grid'){
    $current_page = $staticSearch;
}
$skipAutoCompleteFilesArray= array('details-page.php', 'propertyDetails.php', 'propertySearch.php', 'new-result-page.php', 'static-results', 'static-grid', 'static-list1.php', 'static-grid1.php', 'static-details3.php', 'static-agentgrid3.php', 'search-details1s.php', 'search-details1.php' );
if(!in_array($current_page, $skipAutoCompleteFilesArray)){ ?>
    <script src="/includes/js/jquery-ui.js"></script>
    <!--<script src="/includes/js/suggest.js"></script>-->
    <script type="text/javascript">   
        function showHideFunction() {
            var x = document.getElementById("msllcidx-price-range");
            if (x.style.display === "block") {
                x.style.display = "none";
            } else {
                x.style.display = "block";
            }
        }
        function showHideFunction2() {
            var x = document.getElementById("msllcidx-type");
            if (x.style.display === "block") {
                x.style.display = "none";
            } else {
                x.style.display = "block";
            }
        }
        function showHideFunction3() {
            var x = document.getElementById("msllcidx-bed-bath");
            if (x.style.display === "block") {
                x.style.display = "none";
            } else {
                x.style.display = "block";
            }
        } 
        function hideFunction() {
            var x = document.getElementById("msllcidx-price-range");
            if (x.style.display === "block") {
                x.style.display = "none";
            }
        }
        function hideFunction2() {
            var x = document.getElementById("msllcidx-type");
            if (x.style.display === "block") {
                x.style.display = "none";
            }
        }
        function hideFunction3() {
            var x = document.getElementById("msllcidx-bed-bath");
            if (x.style.display === "block") {
                x.style.display = "none";
            }
        }

        var mulForm = searchListing;
        $(document).ready(function(){
            var availableTagsNew = mulForm;                
            $( "#allProperties" ).autocomplete({
                autoFocus: false,
                source: function(request, response) {                           
                    var val = $("#allProperties").val();
                    if(val.length >= 1){
                        var new_val = val.substr(0, 1).toUpperCase() + val.substr(1);
                        $("#allProperties").val(new_val);
                        var re = $.ui.autocomplete.escapeRegex(request.term);
                        var matchStart    = new RegExp("^" + re, "i");  // starts with typed text
                        var matchAnywhere = new RegExp(re, "i");         // contains typed text
                        var startsWith = $.grep(availableTagsNew, function(item) {
                            return matchStart.test(item);
                        });
                        var containsOnly = $.grep(availableTagsNew, function(item) {
                            return !matchStart.test(item) && matchAnywhere.test(item);
                        });
                        var results = startsWith.concat(containsOnly);
                        response(results.slice(0, 10));             
                    }
                },
                minLength: 2
            }).data("ui-autocomplete")._renderItem = function( ul, item ) {
                let txt = String(item.value).replace(new RegExp(this.term, "gi"),"<b style='color:red'>$&</b>");
                    return $("<li></li>")
                    .data("ui-autocomplete-item", item)
                    .append("<a>" + txt + "</a>")
                    .appendTo(ul);
            };

            // Prevent dropdown from closing when mouse moves over suggestions
            $(document).on('mousedown', '.ui-autocomplete', function(e) {
                e.preventDefault();
            });
        });
    </script>
<?php } ?>
<script src="/includes/js/sortable.min.js"></script>

    </body>
</html>