﻿// dependency: pb.Web.js

function initializeAdminPanel() {
    $(document).ready(function() {
        $(".styleSwitch").click(function() {
            $('.pnlSwitcher').toggle();
        });

        $(".controlSwitch").click(function() {
            var loginForm = $('.loginForm');
            loginForm.toggle();

            if (loginForm.is(':visible')) {
                loginForm.find("input[type='text']").each(function() {
                    $(this).focus();
                });
            }
        });
    });
}

function onPreviewChange(textbox, preViewClientId) {
    var preview = document.getElementById(preViewClientId);
    preview.innerHTML = textbox.value;
}