﻿// namespace Colleague
var Colleague = {}
Colleague._construct = function () {
}
Colleague._construct()

// namespace Colleague.Silverlight
Colleague.Silverlight = {}
Colleague.Silverlight._construct = function () {
}
Colleague.Silverlight.MediaControl = function (c) {
    this.Control = c;
    this.Play = function () {
        this.Control.Content.Js.Play();
    };
    this.Pause = function () {
        this.Control.Content.Js.Pause();
    };
    this.Stop = function () {
        this.Control.Content.Js.Stop();
    };
};
Colleague.Silverlight._construct()

// namespace Colleague.Website
Colleague.Website = {}
Colleague.Website._construct = function () {

}
Colleague.Website._construct()

// namespace Colleague.Website.Controls
Colleague.Website.Forms = {}
Colleague.Website.Forms._construct = function () {
    this.OnAjaxPostBegin = function () {
    };
    this.OnAjaxPostComplete = function () {
    };
}
Colleague.Website.Forms._construct()

// namespace Colleague.Website.Misc
Colleague.Website.Misc = {}
Colleague.Website.Misc._construct = function () {
    this.fc = 20;
    this.fw = function (e) {
        var t = e.target;
        if ($(t).hasClass('selected')) return;
        if (t.timer) clearTimeout(t.timer);
        if (!t.i) t.i = 0;
        $(t).css({ backgroundPosition: '0px -' + 29 * t.i++ + 'px' });
        if (t.i < Colleague.Website.Misc.fc) t.timer = setTimeout(function () { Colleague.Website.Misc.fw(e) }, 30);
    };
    this.bw = function (e) {
        var t = e.target;
        if (!t.i) return;
        if ($(t).hasClass('selected')) return;
        if (t.timer) clearTimeout(t.timer);
        $(t).css({ backgroundPosition: '0px -' + 29 * --t.i + 'px' });

        if (t.i > 0)
            t.timer = setTimeout(function () { Colleague.Website.Misc.bw(e) }, 30);
    }
}
Colleague.Website.Misc._construct()
