﻿/// <reference name="MicrosoftAjax.js"/>

Type.registerNamespace("MXA.FP.View.View");

MXA.FP.View.View = function (element) {

    MXA.FP.View.View.initializeBase(this, [element]);
    this.addCssClass('View');
    this._bgManager = null;
}

MXA.FP.View.View.prototype =
{
    initialize: function () {
        MXA.FP.View.View.callBaseMethod(this, 'initialize');
    },

    dispose: function () {
        MXA.FP.View.View.callBaseMethod(this, 'dispose');
    },

    getBackgroundUrl: function () {

    },

    getStaticBackground: function (type) {

        for (var i in document.datasource.backgrounds.background) {
            var item = document.datasource.backgrounds.background[i];
            if (item.type == type) {
                return item.image;
            }

        }

    },

    activate: function (callback) {
        if ($(this._element).hasClass('active') == false) {
            $(this._element).addClass('active');
        }
        if (callback != null) {
            callback();
        }
    },

    deActivate: function (callback) {
        $(this._element).removeClass('active');
        if (callback != null) {
            callback();
        }
    },



    onSelected: function () {


    },

    onResize: function () {


    },

    databind: function () {


    }
}

MXA.FP.View.View.registerClass('MXA.FP.View.View', Sys.UI.Control);
