﻿function UI_Expose(cssDivClass, cssMaskClass) {
    // execute your scripts when the DOM is ready. this is a good habit
    $(function() {

        // expose the form when it's clicked or cursor is focused
        $("div." + cssDivClass).bind("click keydown", function() {

            $(this).expose({

                // custom mask settings with CSS
                maskId: cssMaskClass,

                // when exposing is done, change form's background color
                //  onLoad: function() {
                //    this.getExposed().css({ backgroundColor: '#ffffff' });
                //},

                // when "unexposed", return to original background color
                onClose: function() {
                    this.getExposed().css({ backgroundColor: null });
                },

                api: true

            }).load();
        });
    });
}