<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">$(document).ready(function () {
    if ($('.js-search-panel-label').length != 0)
    {
        searchPagePanel.init();
        searchPagePanel.setCategoryDdlLabel()
    }

});

var searchPagePanel = {
    isObjectInitialized: false,
    $label: '',
    $panel: '',
    cssOpenLabel: 'js-opened',
    init: function () {
        if (!searchPagePanel.isObjectInitialized) {
            searchPagePanel.isObjectInitialized = true;
            this.$label = $('.js-search-panel-label');
            this.$label = $('.js-search-panel-label');
            this.$panel = $('#HeaderSearchPanel');
            this.$label.on('click', function () {
                if ($(this).hasClass(selectLocationPanel.openItemCss)) {//close
                    $(this).removeClass(selectLocationPanel.openItemCss);
                    searchPagePanel.$panel.removeClass(selectLocationPanel.openItemCss);
                    searchPagePanel.$panel.fadeOut();
                }
                else {//open
                    //close Top Links ddl
                    TopLinksFrame.closeEvent();
                    searchPagePanel.openSearchPabel();
                }
            });

            $('#WhereToBtn,#WhatElseBtn,#NetworksLinkBtn,#LocationsLinkBtn, #ChannelsLinkBtn').on('click', function () {//FOR LOCATION, NETWORKS AND CHANNELS SECTIONS
                if ($(this).hasClass(selectLocationPanel.openItemCss)) {//close
                    $(this).removeClass(selectLocationPanel.openItemCss);
                    searchPagePanel.$panel.removeClass(selectLocationPanel.openItemCss);
                    searchPagePanel.$panel.fadeOut();
                }
                else {//open

                    //close Top Links ddl
                    TopLinksFrame.closeEvent();

                    searchPagePanel.openSearchPabel();
                }
            });
        }
    },
    openSearchPabel: function () {
        if (!searchPagePanel.isObjectInitialized) {
            searchPagePanel.init();
        }
        searchPagePanel.$label.addClass(selectLocationPanel.openItemCss);
        searchPagePanel.$panel.addClass(selectLocationPanel.openItemCss);
        searchPagePanel.$panel.fadeIn();
        //close LogIn popup
        logInPopupPanel.closeEvent();
        //close search ddl in the header
        hdrSearchPanel.closeEvent(hdrSearchPanel.$searchTypeList);
        //close gear popup
        gearPopup.close();
        //close profile popup
        profilePopup.close();
        //close SITS tooltip popup and textbox
        searchByTagManager.hideSearchInputAndPopup_Header();
    },
    closeEvent: function () {
        if (searchPagePanel.$panel != "" &amp;&amp; searchPagePanel.$panel.length != 0) {
            if (searchPagePanel.$panel.hasClass(selectLocationPanel.openItemCss)) {
                selectLocationPanel.$locationsPanel.removeClass(selectLocationPanel.openItemCss);
                if (selectLocationPanel.$label == '' || selectLocationPanel.$label == undefined)
                {
                    selectLocationPanel.$label = $('.js-search-panel-label');
                }
                selectLocationPanel.$label.removeClass(selectLocationPanel.openItemCss);
                selectLocationPanel.$locationsPanel.fadeOut();
            }
        }
    },
    setCategoryDdlLabel: function () {
        var title= $('#PgTitle').attr('data-hidden-title-for-ddl');      
        $('#SectionCategoriesDDL').find('ul li span').each(function () {
            if ($(this).html() == title)
            {
                $('#SectionCategoriesDDL').children('span').first().html($(this).html());
            }
        });
    }
}

function ShowLimitBlogsAlert(num)
{    
    if(num == 0)
    {
        var c = confirm('You are unable to upload a blog with your current account type.  Do you wish to upgrade your account?');
        if(c)
        {
            top.window.location = '/premiumpackages/';
        }
    }
    else
    {
        var c = confirm('You have reached the ' + num + ' blog limit. Do you wish to upgrade your account?');
        if(c)
        {
            top.window.location = '/premiumpackages/';
        }
    }
}

</pre></body></html>