// BIG555JS.js
//


Type.createNamespace('BIG555JS');

////////////////////////////////////////////////////////////////////////////////
// BIG555JS.Core

BIG555JS.Core = function BIG555JS_Core() {
    js.com.JQueryScriptSharp.jQueryUtil.addOnReadyCallback(Delegate.create(this, this._init));
}
BIG555JS.Core.prototype = {
    
    _init: function BIG555JS_Core$_init() {
        this._onResize();
        js.com.cs.v2.Util.WindowUtil.add_onResize(Delegate.create(this, this._windowUtil_onResize));
    },
    
    _windowUtil_onResize: function BIG555JS_Core$_windowUtil_onResize() {
        this._onResize();
    },
    
    _onResize: function BIG555JS_Core$_onResize() {
        var divBottom = new js.com.cs.v2.Controls.Common.MyDivElement(js.com.JQueryScriptSharp.jQueryUtil.select('div.bottom'));
        divBottom.get_style().position = '';
        divBottom.get_style().top = '';
        var topPos = divBottom.get_jQueryElement().position().top;
        var height = divBottom.get_jQueryElement().outerHeight(true);
        var viewportHeight = js.com.cs.v2.Util.WindowUtil.getViewportHeight(false);
        js.com.cs.v2.Util.Console.log(topPos + ' // ' + height);
        if (topPos + height < viewportHeight) {
            divBottom.get_style().position = 'absolute';
            divBottom.get_style().top = (viewportHeight - height) + 'px';
        }
    }
}


BIG555JS.Core.createClass('BIG555JS.Core');

// ---- Do not remove this footer ----
// This script was generated using Script# v0.5.5.0 (http://projects.nikhilk.net/ScriptSharp)
// -----------------------------------

