﻿(function() {
    function execute() {
        // create scope
        //Notice that creating scope in such way intellisense will generate errors.
        //If it possible use Type.registrynemspace.
        
        if (typeof (Common) === "undefined") {
            Common = {}
        }

        if (Common.Componets == null) {
            Common.Componets = {}
        }

        if (Common.Componets.Helpers == null) {
            Common.Componets.Helpers = {}
        }

        Common.Componets.Helpers.MiniMaskHelper = (function() {
            var _setCabinClassSelectorVisibility = function(params) {
                var _params = {
                    cabinClassDivId: "",
                    isFareFamilySearchSelected: false
                }

                if (params && params != null) {
                    $.extend(_params, params);
                }

                var _cabinClassDivElement = document.getElementById(_params.cabinClassDivId);

                if (_cabinClassDivElement == null) {
                    return;
                }

                if (_params.isFareFamilySearchSelected) {
                    _cabinClassDivElement.style.display = 'none';
                } else {
                    _cabinClassDivElement.style.display = 'block';
                }
            }

            return {
                SetCabinClassSelectorVisibility: _setCabinClassSelectorVisibility
            }
        })();
    }

    if (window.Sys && Sys.loader && !Sys.scripts.miniMaskHelper._composite) {
        Sys.loader.registerScript("miniMaskHelper", null, execute);
    }
    else {
        execute();
    }
})();
